Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

wgetopt.h

Go to the documentation of this file.
00001 
00026 /* Declarations for getopt.
00027    Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
00028 
00029 This file is part of the GNU C Library.  Its master source is NOT part of
00030 the C library, however.  The master source lives in /gd/gnu/lib.
00031 
00032 The GNU C Library is free software; you can redistribute it and/or
00033 modify it under the terms of the GNU Library General Public License as
00034 published by the Free Software Foundation; either version 2 of the
00035 License, or (at your option) any later version.
00036 
00037 The GNU C Library is distributed in the hope that it will be useful,
00038 but WITHOUT ANY WARRANTY; without even the implied warranty of
00039 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00040 Library General Public License for more details.
00041 
00042 You should have received a copy of the GNU Library General Public
00043 License along with the GNU C Library; see the file COPYING.LIB.  If
00044 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
00045 Cambridge, MA 02139, USA.  */
00046 
00047 #ifndef FISH_WGETOPT_H
00048 #define FISH_WGETOPT_H
00049 
00050 #include <wchar.h>
00051 
00052 #ifdef  __cplusplus
00053 extern "C" {
00054 #endif
00055 
00062 extern wchar_t *woptarg;
00063 
00076 extern int woptind;
00077 
00081 extern int wopterr;
00082 
00085 extern int woptopt;
00086 
00108 struct woption
00109 {
00113 #if defined (__STDC__) && __STDC__
00114   const wchar_t *name;
00115 #else
00116   wchar_t *name;
00117 #endif
00118 
00125   int has_arg;
00126 
00130   int *flag;
00131 
00136   int val;
00137 };
00138 
00139 /* Names for the values of the `has_arg' field of `struct option'.  */
00140 
00144 #define no_argument             0
00145 
00148 #define required_argument       1
00149 
00152 #define optional_argument       2
00153 
00154 #if defined (__STDC__) && __STDC__
00155 #ifdef __GNU_LIBRARY__
00156 
00159 extern int wgetopt (int argc, wchar_t *const *argv, const wchar_t *shortopts);
00160 #else /* not __GNU_LIBRARY__ */
00161 
00162 extern int wgetopt ();
00163 #endif /* __GNU_LIBRARY__ */
00164 
00167 extern int wgetopt_long (int argc, wchar_t *const *argv, const wchar_t *shortopts,
00168                         const struct woption *longopts, int *longind);
00172 extern int wgetopt_long_only (int argc, wchar_t *const *argv,
00173                              const wchar_t *shortopts,
00174                              const struct woption *longopts, int *longind);
00175 
00179 extern int _wgetopt_internal (int argc, wchar_t *const *argv,
00180                              const wchar_t *shortopts,
00181                              const struct woption *longopts, int *longind,
00182                              int long_only);
00183 #else /* not __STDC__ */
00184 
00188 extern int wgetopt ();
00189 
00193 extern int wgetopt_long ();
00194 
00198 extern int wgetopt_long_only ();
00199 
00203 extern int _wgetopt_internal ();
00204 #endif /* __STDC__ */
00205 
00206 #ifdef  __cplusplus
00207 }
00208 #endif
00209 
00210 #endif /* FISH_WGETOPT_H */

Generated on Sun Jan 13 02:52:29 2008 for fish by  doxygen 1.4.4