ekg2
 All Struktury Danych Pliki Funkcje Zmienne Definicje typów Wyliczenia Wartości wyliczeń Definicje Grupay Strony
getopt.h
Idź do dokumentacji tego pliku.
1 /* Declarations for getopt.
2  Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
3  This file is part of the GNU C Library.
4 
5  The GNU C Library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  The GNU C Library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with the GNU C Library; if not, write to the Free
17  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18  02111-1307 USA. */
19 
20 /* Excessive comments removed by Wojtek Kaniewski <wojtekka@irc.pl> */
21 
22 #ifndef _GETOPT_H
23 
24 #ifndef __need_getopt
25 # define _GETOPT_H 1
26 #endif
27 
28 #if !defined __GNU_LIBRARY__
29 # include <ctype.h>
30 #endif
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 extern char *optarg;
37 
38 extern int optind;
39 
40 extern int opterr;
41 
42 extern int optopt;
43 
44 #ifndef __need_getopt
45 struct option
46 {
47 # if (defined __STDC__ && __STDC__) || defined __cplusplus
48  const char *name;
49 # else
50  char *name;
51 # endif
52  int has_arg;
53  int *flag;
54  int val;
55 };
56 
57 # define no_argument 0
58 # define required_argument 1
59 # define optional_argument 2
60 #endif /* need getopt */
61 
62 #if (defined __STDC__ && __STDC__) || defined __cplusplus
63 # ifdef __GNU_LIBRARY__
64 extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
65 # else /* not __GNU_LIBRARY__ */
66 extern int getopt ();
67 # endif /* __GNU_LIBRARY__ */
68 
69 # ifndef __need_getopt
70 extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
71  const struct option *__longopts, int *__longind);
72 extern int getopt_long_only (int __argc, char *const *__argv,
73  const char *__shortopts,
74  const struct option *__longopts, int *__longind);
75 
76 /* Internal only. Users should not call this directly. */
77 extern int _getopt_internal (int __argc, char *const *__argv,
78  const char *__shortopts,
79  const struct option *__longopts, int *__longind,
80  int __long_only);
81 # endif
82 #else /* not __STDC__ */
83 extern int getopt ();
84 # ifndef __need_getopt
85 extern int getopt_long ();
86 extern int getopt_long_only ();
87 
88 extern int _getopt_internal ();
89 # endif
90 #endif /* __STDC__ */
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #undef __need_getopt
97 
98 #endif /* getopt.h */
99 
100 /*
101  * Local Variables:
102  * mode: c
103  * c-file-style: "k&r"
104  * c-basic-offset: 8
105  * indent-tabs-mode: t
106  * End:
107  */