getopt.h

来自「ftpserver very good sample」· C头文件 代码 · 共 68 行

H
68
字号
/* getopt.h *  * Reimplemented in relatively portable code, so that Win32 * and other platforms can share the joy. *  * Copyright 2000 Jarle (jgaa) Aase * Released under Jgaa's Public License (JPL) * * Homepage: http://clib.jgaa.com * Authors homepage: http://www.jgaa.com * Bug-reports: http://support.jgaa.com */#ifndef GETOPT_H_INCLUDED#define GETOPT_H_INCLUDED#ifdef __cplusplusextern "C"{#endif /* __cplusplus */    /* ---------------- START OF C HEADER -------------- */#ifdef HAVE_GETOPT_LONG#   ifndef WAR_GETOPT_H_INCLUDED#       define WAR_GETOPT_H_INCLUDED#       include <getopt.h>#   endif#else    int getopt_long(int argc,                    char * const argv[],                    const char *optstring,                    const struct option *longopts,                    int *longindex);    struct option    {        const char *name;        int has_arg;        int *flag;        int val;    };    enum {no_argument, required_argument, optional_argument};#endif#ifdef HAVE_GETOPT_H#   ifndef WAR_GETOPT_H_INCLUDED#       define WAR_GETOPT_H_INCLUDED#       include <getopt.h>#   endif#else    extern const char *optarg;    extern int optind, opterr, optopt;#endif    /* ---------------- END OF C HEADER -------------- */#ifdef __cplusplus}#endif /* __cplusplus */#ifndef WAR_GETOPT_CLASS#   endif /* GETOPT_H_INCLUDED */#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?