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

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

?? getopt.c

?? Gsm手機(短信息,電話簿)開發庫C++源代碼
?? C
字號:
/***************************************************************************** 
 * 
 *  MODULE NAME : GETOPT.C 
 * 
 *  COPYRIGHTS: 
 *             This module contains code made available by IBM 
 *             Corporation on an AS IS basis.  Any one receiving the 
 *             module is considered to be licensed under IBM copyrights 
 *             to use the IBM-provided source code in any way he or she 
 *             deems fit, including copying it, compiling it, modifying 
 *             it, and redistributing it, with or without 
 *             modifications.  No license under any IBM patents or 
 *             patent applications is to be implied from this copyright 
 *             license. 
 * 
 *             A user of the module should understand that IBM cannot 
 *             provide technical support for the module and will not be 
 *             responsible for any consequences of use of the program. 
 * 
 *             Any notices, including this one, are not to be removed 
 *             from the module without the prior written consent of 
 *             IBM. 
 * 
 *  AUTHOR:   Original author: 
 *                 G. R. Blair (BOBBLAIR at AUSVM1) 
 *                 Internet: bobblair@bobblair.austin.ibm.com 
 * 
 *            Extensively revised by: 
 *                 John Q. Walker II, Ph.D. (JOHHQ at RALVM6) 
 *                 Internet: johnq@ralvm6.vnet.ibm.com 
 * 
 *****************************************************************************/ 
 
/****************************************************************************** 
 * getopt() 
 * 
 * The getopt() function is a command line parser.  It returns the next 
 * option character in argv that matches an option character in opstring. 
 * 
 * The argv argument points to an array of argc+1 elements containing argc 
 * pointers to character strings followed by a null pointer. 
 * 
 * The opstring argument points to a string of option characters; if an 
 * option character is followed by a colon, the option is expected to have 
 * an argument that may or may not be separated from it by white space. 
 * The external variable optarg is set to point to the start of the option 
 * argument on return from getopt(). 
 * 
 * The getopt() function places in optind the argv index of the next argument 
 * to be processed.  The system initializes the external variable optind to 
 * 1 before the first call to getopt(). 
 * 
 * When all options have been processed (that is, up to the first nonoption 
 * argument), getopt() returns EOF.  The special option "--" may be used to 
 * delimit the end of the options; EOF will be returned, and "--" will be 
 * skipped. 
 * 
 * The getopt() function returns a question mark (?) when it encounters an 
 * option character not included in opstring.  This error message can be 
 * disabled by setting opterr to zero.  Otherwise, it returns the option 
 * character that was detected. 
 * 
 * If the special option "--" is detected, or all options have been 
 * processed, EOF is returned. 
 * 
 * Options are marked by either a minus sign (-) or a slash (/). 
 * 
 * No errors are defined. 
 *****************************************************************************/ 
 
#include <stdio.h>                  /* for EOF */ 
#include <string.h>                 /* for strchr() */ 
 
 
#ifdef __cplusplus
extern "C" {
#endif

/* static (global) variables that are specified as exported by getopt() */ 
char *optarg = NULL;    /* pointer to the start of the option argument  */ 
int   optind = 1;       /* number of the next argv[] to be evaluated    */ 
int   opterr = 1;       /* non-zero if a question mark should be returned 
                           when a non-valid option character is detected */ 
 
/* handle possible future character set concerns by putting this in a macro */ 
#define _next_char(string)  (char)(*(string+1)) 
 
int getopt(int argc, char *argv[], char *opstring) 
{ 
  static char *pIndexPosition = NULL; /* place inside current argv string */ 
  char *pArgString = NULL;        /* where to start from next */ 
  char *pOptString;               /* the string in our program */ 
 
 
  if (pIndexPosition != NULL) { 
    /* we last left off inside an argv string */ 
    if (*(++pIndexPosition)) { 
      /* there is more to come in the most recent argv */ 
      pArgString = pIndexPosition; 
    } 
  } 
 
  if (pArgString == NULL) { 
    /* we didn't leave off in the middle of an argv string */ 
    if (optind >= argc) { 
      /* more command-line arguments than the argument count */ 
      pIndexPosition = NULL;  /* not in the middle of anything */ 
      return EOF;             /* used up all command-line arguments */ 
    } 
 
    /*--------------------------------------------------------------------- 
     * If the next argv[] is not an option, there can be no more options. 
     *-------------------------------------------------------------------*/ 
    pArgString = argv[optind++]; /* set this to the next argument ptr */ 
 
    if (('/' != *pArgString) && /* doesn't start with a slash or a dash? */ 
        ('-' != *pArgString)) { 
      --optind;               /* point to current arg once we're done */ 
      optarg = NULL;          /* no argument follows the option */ 
      pIndexPosition = NULL;  /* not in the middle of anything */ 
      return EOF;             /* used up all the command-line flags */ 
    } 
 
    /* check for special end-of-flags markers */ 
    if ((strcmp(pArgString, "-") == 0) || 
        (strcmp(pArgString, "--") == 0)) { 
      optarg = NULL;          /* no argument follows the option */ 
      pIndexPosition = NULL;  /* not in the middle of anything */ 
      return EOF;             /* encountered the special flag */ 
    } 
 
    pArgString++;               /* look past the / or - */ 
  } 
 
  if (':' == *pArgString) {       /* is it a colon? */ 
    /*--------------------------------------------------------------------- 
     * Rare case: if opterr is non-zero, return a question mark; 
     * otherwise, just return the colon we're on. 
     *-------------------------------------------------------------------*/ 
    return (opterr ? (int)'?' : (int)':'); 
  } 
  else if ((pOptString = strchr(opstring, *pArgString)) == 0) { 
    /*--------------------------------------------------------------------- 
     * The letter on the command-line wasn't any good. 
     *-------------------------------------------------------------------*/ 
    optarg = NULL;              /* no argument follows the option */ 
    pIndexPosition = NULL;      /* not in the middle of anything */ 
    return (opterr ? (int)'?' : (int)*pArgString); 
  } 
  else { 
    /*--------------------------------------------------------------------- 
     * The letter on the command-line matches one we expect to see 
     *-------------------------------------------------------------------*/ 
    if (':' == _next_char(pOptString)) { /* is the next letter a colon? */ 
      /* It is a colon.  Look for an argument string. */ 
      if ('\0' != _next_char(pArgString)) {  /* argument in this argv? */ 
        optarg = &pArgString[1];   /* Yes, it is */ 
      } 
      else { 
        /*------------------------------------------------------------- 
         * The argument string must be in the next argv. 
         * But, what if there is none (bad input from the user)? 
         * In that case, return the letter, and optarg as NULL. 
         *-----------------------------------------------------------*/ 
        if (optind < argc) 
          optarg = argv[optind++]; 
        else { 
          optarg = NULL; 
          return (opterr ? (int)'?' : (int)*pArgString); 
        } 
      } 
      pIndexPosition = NULL;  /* not in the middle of anything */ 
    } 
    else { 
      /* it's not a colon, so just return the letter */ 
      optarg = NULL;          /* no argument follows the option */ 
      pIndexPosition = pArgString;    /* point to the letter we're on */ 
    } 
    return (int)*pArgString;    /* return the letter that matched */ 
  } 
}

#ifdef __cplusplus
}
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av电影在线观看| 欧美一级xxx| 视频一区视频二区在线观看| 久久久精品黄色| 日韩欧美一级精品久久| 在线综合亚洲欧美在线视频| 99热这里都是精品| 成人高清视频在线观看| 欧美一级在线观看| 国产欧美一区视频| 中文字幕av在线一区二区三区| 国产精品国产三级国产aⅴ原创| 国产精品天美传媒| 亚洲午夜免费福利视频| 中文字幕亚洲成人| 亚洲自拍偷拍欧美| 丝袜国产日韩另类美女| 91欧美激情一区二区三区成人| 91精彩视频在线观看| 欧美综合欧美视频| 日韩写真欧美这视频| 午夜精品久久久久久久久久| 国产高清不卡一区二区| 成人av资源在线| 日本一区二区三区视频视频| 精品在线观看免费| 99久久国产免费看| 欧美一级夜夜爽| 日本女人一区二区三区| 国产成人精品免费视频网站| 久久久久久久久久久久久夜| 国内久久婷婷综合| 99久久久久免费精品国产| 一区在线播放视频| 色婷婷综合久久久中文一区二区| 欧美日韩国产精选| 国产精品视频一二三区| 成人av网站在线观看免费| 国产精品毛片久久久久久| 99国产麻豆精品| 一区二区久久久久久| 精品一区二区在线播放| 久久久久久久久久久久久久久99| 国产一区二区三区综合| 欧美三级电影精品| 亚洲国产精品v| 91在线观看下载| 亚洲男人的天堂在线aⅴ视频| 免费亚洲电影在线| 在线观看亚洲专区| 亚洲成在线观看| 91视频.com| 亚洲伊人色欲综合网| 欧美一区二区三区思思人| 国产精品一区二区久久不卡| 欧美一区二区在线免费观看| 懂色av一区二区夜夜嗨| 欧美精品色综合| 一区二区三区91| 日韩一区二区免费在线电影| 国产成都精品91一区二区三| 一区二区三区不卡视频在线观看| 日韩欧美国产一二三区| 国产成人亚洲综合a∨婷婷图片| 亚洲视频1区2区| a在线播放不卡| 日韩av网站在线观看| 国产精品嫩草影院av蜜臀| 91精品免费观看| 99精品久久只有精品| 日本伊人午夜精品| 最新久久zyz资源站| 欧美岛国在线观看| 欧美亚洲高清一区| 亚洲高清视频在线| 国产欧美日韩亚州综合| 欧美日韩国产综合久久| 国产精品亚洲第一区在线暖暖韩国| 亚洲你懂的在线视频| 在线不卡免费av| 色婷婷综合久久久久中文一区二区| 奇米影视在线99精品| 亚洲精品乱码久久久久久黑人| k8久久久一区二区三区| 奇米色777欧美一区二区| 中文字幕佐山爱一区二区免费| 7777精品伊人久久久大香线蕉最新版| 国产成人午夜电影网| 日本网站在线观看一区二区三区| 亚洲男同性恋视频| 成人欧美一区二区三区小说 | 日韩中文字幕1| 中文字幕一区日韩精品欧美| 精品国产乱码久久久久久老虎| 男女激情视频一区| 一区二区高清在线| 亚洲欧美自拍偷拍| 欧美激情在线观看视频免费| 久久久国产综合精品女国产盗摄| 7777精品伊人久久久大香线蕉完整版 | 日韩精品一区二区三区在线播放 | 日韩精品国产精品| 亚洲激情男女视频| 日韩毛片视频在线看| 亚洲欧洲成人av每日更新| 国产日本欧美一区二区| 久久这里都是精品| www.日本不卡| 99久久久久久| 91视视频在线观看入口直接观看www| 成人精品在线视频观看| 一二三区精品福利视频| 亚洲激情综合网| 亚洲精品ww久久久久久p站| 亚洲精品国产第一综合99久久| 亚洲日本丝袜连裤袜办公室| 椎名由奈av一区二区三区| 亚洲精品日日夜夜| 亚洲一区二区三区四区的 | 精品视频1区2区3区| 欧美午夜一区二区| 欧美老肥妇做.爰bbww| 91精品国产一区二区三区| 欧美一区二区在线视频| 欧美精品一区二区三区久久久| 欧美成人艳星乳罩| 欧美中文字幕一区| 91精品国产色综合久久不卡蜜臀 | 亚洲免费大片在线观看| 亚洲精品久久7777| 日韩黄色片在线观看| 美国一区二区三区在线播放| 亚洲伦理在线免费看| 亚洲国产精品久久人人爱蜜臀| 天堂影院一区二区| 国产精品综合久久| 色成年激情久久综合| 欧美一区二区三区色| 久久久久久久久蜜桃| 亚洲线精品一区二区三区八戒| 天天操天天干天天综合网| 国产一区二区三区免费播放| caoporn国产一区二区| 欧美日韩欧美一区二区| 国产亚洲一区字幕| 欧美一区二区美女| 久久久久久久久久电影| 一区二区三区四区在线| 久久99精品国产麻豆婷婷洗澡| 国v精品久久久网| 欧美日韩国产影片| 国产精品天干天干在线综合| 日日夜夜免费精品| 懂色av一区二区在线播放| 欧美伦理影视网| 日韩一区有码在线| 久久成人免费日本黄色| 免费成人结看片| 99久久99久久免费精品蜜臀| 欧美高清一级片在线| 国产精品青草久久| 看片网站欧美日韩| 在线影院国内精品| 国产欧美日韩综合| 另类小说图片综合网| 欧美偷拍一区二区| 国产精品欧美综合在线| 免费在线看成人av| 欧美视频一区在线| 亚洲欧洲成人av每日更新| 韩日精品视频一区| 91精品国产综合久久久久久 | 精品成人一区二区| 亚洲一区二区三区四区五区黄 | 国产精品 欧美精品| 欧美电影免费观看高清完整版| 一区二区三区.www| 91免费精品国自产拍在线不卡 | 国产成人精品一区二| 欧美一级二级在线观看| 亚洲v精品v日韩v欧美v专区| 91片在线免费观看| 专区另类欧美日韩| 99久久er热在这里只有精品66| 日本一区二区三区高清不卡| 精品综合免费视频观看| 日韩美女视频一区二区在线观看| 亚洲国产美女搞黄色| 色天天综合色天天久久| 亚洲免费毛片网站| 一本久道久久综合中文字幕 | 在线观看国产日韩| 亚洲精品你懂的| 色婷婷综合在线| 亚洲自拍与偷拍| 欧美日韩免费一区二区三区视频| 亚洲欧美乱综合| 在线观看视频一区| 一区二区三区不卡视频| 欧美三级蜜桃2在线观看|