ekg2
compat/getopt.h
Idź do dokumentacji tego pliku.
00001 /* Declarations for getopt.
00002    Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 /* Excessive comments removed by Wojtek Kaniewski <wojtekka@irc.pl> */
00021   
00022 #ifndef _GETOPT_H
00023 
00024 #ifndef __need_getopt
00025 # define _GETOPT_H 1
00026 #endif
00027 
00028 #if !defined __GNU_LIBRARY__
00029 # include <ctype.h>
00030 #endif
00031 
00032 #ifdef  __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036 extern char *optarg;
00037 
00038 extern int optind;
00039 
00040 extern int opterr;
00041 
00042 extern int optopt;
00043 
00044 #ifndef __need_getopt
00045 struct option
00046 {
00047 # if (defined __STDC__ && __STDC__) || defined __cplusplus
00048   const char *name;
00049 # else
00050   char *name;
00051 # endif
00052   int has_arg;
00053   int *flag;
00054   int val;
00055 };
00056 
00057 # define no_argument            0
00058 # define required_argument      1
00059 # define optional_argument      2
00060 #endif  /* need getopt */
00061 
00062 #if (defined __STDC__ && __STDC__) || defined __cplusplus
00063 # ifdef __GNU_LIBRARY__
00064 extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
00065 # else /* not __GNU_LIBRARY__ */
00066 extern int getopt ();
00067 # endif /* __GNU_LIBRARY__ */
00068 
00069 # ifndef __need_getopt
00070 extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
00071                         const struct option *__longopts, int *__longind);
00072 extern int getopt_long_only (int __argc, char *const *__argv,
00073                              const char *__shortopts,
00074                              const struct option *__longopts, int *__longind);
00075 
00076 /* Internal only.  Users should not call this directly.  */
00077 extern int _getopt_internal (int __argc, char *const *__argv,
00078                              const char *__shortopts,
00079                              const struct option *__longopts, int *__longind,
00080                              int __long_only);
00081 # endif
00082 #else /* not __STDC__ */
00083 extern int getopt ();
00084 # ifndef __need_getopt
00085 extern int getopt_long ();
00086 extern int getopt_long_only ();
00087 
00088 extern int _getopt_internal ();
00089 # endif
00090 #endif /* __STDC__ */
00091 
00092 #ifdef  __cplusplus
00093 }
00094 #endif
00095 
00096 #undef __need_getopt
00097 
00098 #endif /* getopt.h */
00099 
00100 /*
00101  * Local Variables:
00102  * mode: c
00103  * c-file-style: "k&r"
00104  * c-basic-offset: 8
00105  * indent-tabs-mode: t
00106  * End:
00107  */
 All Struktury Danych Pliki Funkcje Zmienne Definicje typów Wyliczenia Wartości wyliczeń Definicje