initial load of upstream version 1.06.32
[xmlrpc-c] / lib / util / getoptx.h
1 /* Interface to getopt_long_onlyx() */
2
3
4 enum argreq {no_argument, required_argument, optional_argument};
5
6 struct optionx {
7     /* This describes an option.  If the field `flag' is nonzero, it
8        points to a variable that is to be set to the value given in
9        the field `val' when the option is found, but left unchanged if
10        the option is not found.  
11     */
12     const char * name;
13     enum argreq has_arg;
14     int * flag;
15     int val;
16 };
17
18 /* long_options[] is a list terminated by an element that contains
19    a NULL 'name' member.
20 */
21 void
22 getopt_long_onlyx(int              const argc, 
23                   char **          const argv, 
24                   const char *     const options, 
25                   struct optionx * const long_options, 
26                   unsigned int *   const opt_index, 
27                   int              const opterrArg,
28                   int *            const end_of_options,
29                   const char **    const optarg_arg,
30                   const char **    const unrecognized_option);
31
32 unsigned int
33 getopt_argstart(void);
34
35 /* 
36    Copyright (C) 1989 Free Software Foundation, Inc.
37
38    This program is free software; you can redistribute it and/or modify
39    it under the terms of the GNU General Public License as published by
40    the Free Software Foundation; either version 1, or (at your option)
41    any later version.
42
43    This program is distributed in the hope that it will be useful,
44    but WITHOUT ANY WARRANTY; without even the implied warranty of
45    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
46    GNU General Public License for more details.
47
48    You should have received a copy of the GNU General Public License
49    along with this program; if not, write to the Free Software
50    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
51