2 * Copyright (C) 1998,1999,2000,2001,2006 Free Software Foundation, Inc.
4 * This file is part of JNLIB.
6 * JNLIB is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 3 of
9 * the License, or (at your option) any later version.
11 * JNLIB is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef LIBJNLIB_ARGPARSE_H
21 #define LIBJNLIB_ARGPARSE_H
27 int *argc
; /* pointer to argc (value subject to change) */
28 char ***argv
; /* pointer to argv (value subject to change) */
29 unsigned flags
; /* Global flags (DO NOT CHANGE) */
30 int err
; /* print error about last option */
31 /* 1 = warning, 2 = abort */
32 int r_opt
; /* return option */
33 int r_type
; /* type of return value (0 = no argument found)*/
37 unsigned long ret_ulong
;
39 } r
; /* Return values */
46 const void *cur_alias
;
47 } internal
; /* DO NOT CHANGE */
54 const char *description
; /* optional option description */
59 int arg_parse( ARGPARSE_ARGS
*arg
, ARGPARSE_OPTS
*opts
);
60 int optfile_parse( FILE *fp
, const char *filename
, unsigned *lineno
,
61 ARGPARSE_ARGS
*arg
, ARGPARSE_OPTS
*opts
);
62 void usage( int level
);
63 const char *strusage( int level
);
64 void set_strusage( const char *(*f
)( int ) );
66 #endif /*LIBJNLIB_ARGPARSE_H*/