亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? getopt.c

?? huffman 編碼原代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* Getopt for GNU.
   NOTE: getopt is now part of the C library, so if you don't know what
   "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
   before changing it!

   Copyright (C) 1987, 88, 89, 90, 91, 92, 1993
   	Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
   Free Software Foundation; either version 2, or (at your option) any
   later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifndef __STDC__
#  ifndef const
#    define const
#  endif
#endif

/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.  */
#ifndef _NO_PROTO
#define _NO_PROTO
#endif

#include <stdio.h>
//#include "tailor.h"

/* Comment out all this code if we are using the GNU C Library, and are not
   actually compiling the library itself.  This code is part of the GNU C
   Library, but also included in many other GNU distributions.  Compiling
   and linking in this code is a waste when using the GNU C library
   (especially if it is a shared library).  Rather than having every GNU
   program understand `configure --with-gnu-libc' and omit the object files,
   it is simpler to just do this in the source for each such file.  */

#if defined (_LIBC) || !defined (__GNU_LIBRARY__)


/* This needs to come after some library #include
   to get __GNU_LIBRARY__ defined.  */
#ifdef	__GNU_LIBRARY__
/* Don't include stdlib.h for non-GNU C libraries because some of them
   contain conflicting prototypes for getopt.  */
#include <stdlib.h>
#endif	/* GNU C library.  */
 
/* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a
   long-named option.  Because this is not POSIX.2 compliant, it is
   being phased out.  */
/* #define GETOPT_COMPAT */

/* This version of `getopt' appears to the caller like standard Unix `getopt'
   but it behaves differently for the user, since it allows the user
   to intersperse the options with the other arguments.

   As `getopt' works, it permutes the elements of ARGV so that,
   when it is done, all the options precede everything else.  Thus
   all application programs are extended to handle flexible argument order.

   Setting the environment variable POSIXLY_CORRECT disables permutation.
   Then the behavior is completely standard.

   GNU application programs can use a third alternative mode in which
   they can distinguish the relative order of options and other arguments.  */

#include "getopt.h"

/* For communication from `getopt' to the caller.
   When `getopt' finds an option that takes an argument,
   the argument value is returned here.
   Also, when `ordering' is RETURN_IN_ORDER,
   each non-option ARGV-element is returned here.  */

char *optarg = 0;

/* Index in ARGV of the next element to be scanned.
   This is used for communication to and from the caller
   and for communication between successive calls to `getopt'.

   On entry to `getopt', zero means this is the first call; initialize.

   When `getopt' returns EOF, this is the index of the first of the
   non-option elements that the caller should itself scan.

   Otherwise, `optind' communicates from one call to the next
   how much of ARGV has been scanned so far.  */

/* XXX 1003.2 says this must be 1 before any call.  */
int optind = 0;

/* The next char to be scanned in the option-element
   in which the last option character we returned was found.
   This allows us to pick up the scan where we left off.

   If this is zero, or a null string, it means resume the scan
   by advancing to the next ARGV-element.  */

static char *nextchar;

/* Callers store zero here to inhibit the error message
   for unrecognized options.  */

int opterr = 1;

/* Set to an option character which was unrecognized.
   This must be initialized on some systems to avoid linking in the
   system's own getopt implementation.  */

#define BAD_OPTION '\0'
int optopt = BAD_OPTION;

/* Describe how to deal with options that follow non-option ARGV-elements.

   If the caller did not specify anything,
   the default is REQUIRE_ORDER if the environment variable
   POSIXLY_CORRECT is defined, PERMUTE otherwise.

   REQUIRE_ORDER means don't recognize them as options;
   stop option processing when the first non-option is seen.
   This is what Unix does.
   This mode of operation is selected by either setting the environment
   variable POSIXLY_CORRECT, or using `+' as the first character
   of the list of option characters.

   PERMUTE is the default.  We permute the contents of ARGV as we scan,
   so that eventually all the non-options are at the end.  This allows options
   to be given in any order, even with programs that were not written to
   expect this.

   RETURN_IN_ORDER is an option available to programs that were written
   to expect options and other ARGV-elements in any order and that care about
   the ordering of the two.  We describe each non-option ARGV-element
   as if it were the argument of an option with character code 1.
   Using `-' as the first character of the list of option characters
   selects this mode of operation.

   The special argument `--' forces an end of option-scanning regardless
   of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
   `--' can cause `getopt' to return EOF with `optind' != ARGC.  */

static enum
{
  REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
} ordering;

#ifdef	__GNU_LIBRARY__
/* We want to avoid inclusion of string.h with non-GNU libraries
   because there are many ways it can cause trouble.
   On some systems, it contains special magic macros that don't work
   in GCC.  */
#include <string.h>
#define	my_index	strchr
#define	my_strlen	strlen
#else

/* Avoid depending on library functions or files
   whose names are inconsistent.  */

#if __STDC__ || defined(PROTO)
extern char *getenv(const char *name);
extern int  strcmp (const char *s1, const char *s2);
extern int  strncmp(const char *s1, const char *s2, int n);

static int my_strlen(const char *s);
static char *my_index (const char *str, int chr);
#else
extern char *getenv ();
#endif

static int
my_strlen (str)
     const char *str;
{
  int n = 0;
  while (*str++)
    n++;
  return n;
}

static char *
my_index (str, chr)
     const char *str;
     int chr;
{
  while (*str)
    {
      if (*str == chr)
	return (char *) str;
      str++;
    }
  return 0;
}

#endif				/* GNU C library.  */


/* Handle permutation of arguments.  */

/* Describe the part of ARGV that contains non-options that have
   been skipped.  `first_nonopt' is the index in ARGV of the first of them;
   `last_nonopt' is the index after the last of them.  */

static int first_nonopt;
static int last_nonopt;

/* Exchange two adjacent subsequences of ARGV.
   One subsequence is elements [first_nonopt,last_nonopt)
   which contains all the non-options that have been skipped so far.
   The other is elements [last_nonopt,optind), which contains all
   the options processed since those non-options were skipped.

   `first_nonopt' and `last_nonopt' are relocated so that they describe
   the new indices of the non-options in ARGV after they are moved.

   To perform the swap, we first reverse the order of all elements. So
   all options now come before all non options, but they are in the
   wrong order. So we put back the options and non options in original
   order by reversing them again. For example:
       original input:      a b c -x -y
       reverse all:         -y -x c b a
       reverse options:     -x -y c b a
       reverse non options: -x -y a b c
*/

#if __STDC__ || defined(PROTO)
static void exchange (char **argv);
#endif

static void
exchange (argv)
     char **argv;
{
  char *temp, **first, **last;

  /* Reverse all the elements [first_nonopt, optind) */
  first = &argv[first_nonopt];
  last  = &argv[optind-1];
  while (first < last) {
    temp = *first; *first = *last; *last = temp; first++; last--;
  }
  /* Put back the options in order */
  first = &argv[first_nonopt];
  first_nonopt += (optind - last_nonopt);
  last  = &argv[first_nonopt - 1];
  while (first < last) {
    temp = *first; *first = *last; *last = temp; first++; last--;
  }

  /* Put back the non options in order */
  first = &argv[first_nonopt];
  last_nonopt = optind;
  last  = &argv[last_nonopt-1];
  while (first < last) {
    temp = *first; *first = *last; *last = temp; first++; last--;
  }
}


/* Scan elements of ARGV (whose length is ARGC) for option characters
   given in OPTSTRING.

   If an element of ARGV starts with '-', and is not exactly "-" or "--",
   then it is an option element.  The characters of this element
   (aside from the initial '-') are option characters.  If `getopt'
   is called repeatedly, it returns successively each of the option characters
   from each of the option elements.

   If `getopt' finds another option character, it returns that character,
   updating `optind' and `nextchar' so that the next call to `getopt' can
   resume the scan with the following option character or ARGV-element.

   If there are no more option characters, `getopt' returns `EOF'.
   Then `optind' is the index in ARGV of the first ARGV-element
   that is not an option.  (The ARGV-elements have been permuted
   so that those that are not options now come last.)

   OPTSTRING is a string containing the legitimate option characters.
   If an option character is seen that is not listed in OPTSTRING,
   return BAD_OPTION after printing an error message.  If you set `opterr' to
   zero, the error message is suppressed but we still return BAD_OPTION.

   If a char in OPTSTRING is followed by a colon, that means it wants an arg,
   so the following text in the same ARGV-element, or the text of the following
   ARGV-element, is returned in `optarg'.  Two colons mean an option that
   wants an optional arg; if there is text in the current ARGV-element,
   it is returned in `optarg', otherwise `optarg' is set to zero.

   If OPTSTRING starts with `-' or `+', it requests different methods of
   handling the non-option ARGV-elements.
   See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.

   Long-named options begin with `--' instead of `-'.
   Their names may be abbreviated as long as the abbreviation is unique
   or is an exact match for some defined option.  If they have an
   argument, it follows the option name in the same ARGV-element, separated
   from the option name by a `=', or else the in next ARGV-element.
   When `getopt' finds a long-named option, it returns 0 if that option's
   `flag' field is nonzero, the value of the option's `val' field
   if the `flag' field is zero.

   The elements of ARGV aren't really const, because we permute them.
   But we pretend they're const in the prototype to be compatible
   with other systems.

   LONGOPTS is a vector of `struct option' terminated by an
   element containing a name which is zero.

   LONGIND returns the index in LONGOPT of the long-named option found.
   It is only valid when a long-named option has been found by the most
   recent call.

   If LONG_ONLY is nonzero, '-' as well as '--' can introduce
   long-named options.  */

int
_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
     int argc;
     char *const *argv;
     const char *optstring;
     const struct option *longopts;
     int *longind;
     int long_only;
{
  int option_index;

  optarg = 0;

  /* Initialize the internal data when the first call is made.
     Start processing options with ARGV-element 1 (since ARGV-element 0
     is the program name); the sequence of previously skipped
     non-option ARGV-elements is empty.  */

  if (optind == 0)
    {
      first_nonopt = last_nonopt = optind = 1;

      nextchar = NULL;

      /* Determine how to handle the ordering of options and nonoptions.  */

      if (optstring[0] == '-')
	{
	  ordering = RETURN_IN_ORDER;
	  ++optstring;
	}
      else if (optstring[0] == '+')
	{
	  ordering = REQUIRE_ORDER;
	  ++optstring;
	}
      else if (getenv ("POSIXLY_CORRECT") != NULL)
	ordering = REQUIRE_ORDER;
      else
	ordering = PERMUTE;
    }

  if (nextchar == NULL || *nextchar == '\0')
    {
      if (ordering == PERMUTE)
	{
	  /* If we have just processed some options following some non-options,
	     exchange them so that the options come first.  */

	  if (first_nonopt != last_nonopt && last_nonopt != optind)
	    exchange ((char **) argv);
	  else if (last_nonopt != optind)
	    first_nonopt = optind;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
777色狠狠一区二区三区| 国产精品1区2区3区在线观看| 色呦呦一区二区三区| 亚洲摸摸操操av| 色婷婷国产精品综合在线观看| 亚洲视频在线观看三级| 一本一道久久a久久精品综合蜜臀| 亚洲色图一区二区三区| 欧洲视频一区二区| 日韩综合小视频| 久久综合九色欧美综合狠狠| 国产aⅴ精品一区二区三区色成熟| 国产精品麻豆网站| 在线影院国内精品| 麻豆专区一区二区三区四区五区| 久久久久99精品一区| 99久久免费视频.com| 五月婷婷激情综合| 国产亚洲欧美在线| 91啦中文在线观看| 日韩电影在线免费| 国产精品午夜电影| 欧美三级电影在线观看| 国产一区激情在线| 一区二区三区中文字幕精品精品 | 狠狠色丁香九九婷婷综合五月| 久久免费精品国产久精品久久久久| 高清日韩电视剧大全免费| 一区二区高清免费观看影视大全| 日韩欧美高清一区| 99久久久久久| 另类小说一区二区三区| 国产精品白丝在线| 欧美一区二区在线不卡| 成人av在线播放网站| 午夜av区久久| 亚洲欧美一区二区久久| 久久综合九色综合97婷婷女人 | 国产一区二区在线电影| 亚洲精品成人精品456| 欧美刺激脚交jootjob| 91免费看视频| 国产精品亚洲视频| 香蕉成人伊视频在线观看| 国产精品国产三级国产普通话99| 欧美疯狂性受xxxxx喷水图片| 99久久婷婷国产综合精品电影| 美腿丝袜在线亚洲一区| 一区二区三区欧美亚洲| 亚洲国产精品t66y| 日韩亚洲欧美一区二区三区| 色婷婷综合五月| 成人精品小蝌蚪| 另类的小说在线视频另类成人小视频在线| 亚洲欧洲色图综合| 国产婷婷精品av在线| 日韩亚洲欧美在线观看| 欧美美女视频在线观看| 色婷婷综合久久久中文一区二区 | 国产精品麻豆视频| 2023国产精品自拍| 日韩精品中午字幕| 91麻豆精品国产91久久久资源速度| 99视频热这里只有精品免费| 国产jizzjizz一区二区| 韩国女主播成人在线| 蜜臀久久久99精品久久久久久| 亚洲成人精品一区二区| 一区二区三区日本| 亚洲综合男人的天堂| ...中文天堂在线一区| 国产精品免费免费| 国产欧美va欧美不卡在线| 久久久精品国产免大香伊| 精品国产精品网麻豆系列| 久久免费国产精品 | 老色鬼精品视频在线观看播放| 国产精品精品国产色婷婷| 国产成人av资源| 亚洲福利视频三区| 亚洲国产精品二十页| 亚洲精品一区二区三区福利| 欧美mv日韩mv国产网站| 久久综合网色—综合色88| 亚洲精品一区二区三区蜜桃下载| 久久夜色精品一区| 国产欧美日韩卡一| 国产精品国产馆在线真实露脸| 国产精品成人午夜| 亚洲视频综合在线| 亚洲国产精品一区二区久久恐怖片 | 久久久久国产精品人| 国产三级精品三级| 亚洲欧美一区二区三区国产精品| 亚洲免费在线观看视频| 一区二区免费在线播放| 亚洲国产视频一区二区| 婷婷久久综合九色综合伊人色| 久久国产精品99久久人人澡| 国产精品911| 日本丰满少妇一区二区三区| 91精品国产欧美日韩| 国产欧美一区二区三区沐欲| 亚洲欧美一区二区三区极速播放| 视频一区视频二区中文| 国产精品正在播放| 色呦呦网站一区| 日韩精品一区二区三区中文精品| 久久精品在这里| 亚洲综合一二区| 久久不见久久见中文字幕免费| 成人一区二区视频| 欧美日韩黄视频| 欧美国产禁国产网站cc| 亚洲二区视频在线| 国产精品亚洲一区二区三区妖精| 91麻豆精品一区二区三区| 欧美人妇做爰xxxⅹ性高电影 | 欧美美女bb生活片| 国产精品入口麻豆原神| 日韩成人午夜电影| 成人免费看黄yyy456| 欧美日韩一二三区| 国产精品免费视频观看| 免费看黄色91| 色综合久久99| 久久亚洲综合色| 五月婷婷激情综合网| 9i在线看片成人免费| 日韩欧美国产一区二区三区| 亚洲精品中文在线| 国产精品88888| 日韩一区二区三区精品视频| 亚洲图片激情小说| 国产精品99久久久| 精品噜噜噜噜久久久久久久久试看| 亚洲黄色av一区| 成人妖精视频yjsp地址| 欧美sm极限捆绑bd| 亚洲国产精品精华液网站| 成人精品免费看| 亚洲精品在线一区二区| 亚洲bt欧美bt精品| 色一情一乱一乱一91av| 中文字幕不卡一区| 国产一区二区调教| 日韩视频免费观看高清在线视频| 亚洲一区免费观看| 一本久道中文字幕精品亚洲嫩| 国产人伦精品一区二区| 激情综合网激情| 欧美一区二区三区精品| 香蕉影视欧美成人| 欧美性受xxxx黑人xyx| 国产精品国产成人国产三级| 国产传媒一区在线| 久久众筹精品私拍模特| 久久精品国产一区二区三区免费看| 欧美日韩高清一区二区三区| 一区二区三区欧美日韩| 91麻豆成人久久精品二区三区| 国产精品美女久久久久久久久久久| 国产成人精品一区二区三区四区| 精品久久人人做人人爰| 激情文学综合网| 2020日本不卡一区二区视频| 精品在线亚洲视频| 日韩免费视频一区| 极品少妇一区二区| 久久亚洲精品小早川怜子| 久草这里只有精品视频| 久久综合久久综合久久| 国产呦萝稀缺另类资源| 久久色成人在线| 国产精品一卡二| 国产精品久久久一区麻豆最新章节| 成人午夜激情在线| 国产精品成人在线观看| 在线精品视频免费播放| 亚洲不卡一区二区三区| 欧美一区二区三区思思人| 亚洲国产日日夜夜| 欧美一区二区网站| 国产亚洲欧美色| 2017欧美狠狠色| 国产精品久久久久婷婷| 石原莉奈一区二区三区在线观看| 精品视频一区二区三区免费| 日韩成人一级大片| 久久久久久久久久久电影| 成人综合激情网| 一区二区三区国产豹纹内裤在线| 一本色道久久综合亚洲精品按摩| 亚洲欧美另类久久久精品2019| 欧美中文字幕亚洲一区二区va在线| 午夜欧美2019年伦理| 久久综合久久久久88| 91蝌蚪porny| 日本在线观看不卡视频| 日本一区二区三区高清不卡|