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 2.1 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, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 #ifndef LIBJNLIB_ARGPARSE_H
23 #define LIBJNLIB_ARGPARSE_H
29 int *argc
; /* pointer to argc (value subject to change) */
30 char ***argv
; /* pointer to argv (value subject to change) */
31 unsigned flags
; /* Global flags (DO NOT CHANGE) */
32 int err
; /* print error about last option */
33 /* 1 = warning, 2 = abort */
34 int r_opt
; /* return option */
35 int r_type
; /* type of return value (0 = no argument found)*/
39 unsigned long ret_ulong
;
41 } r
; /* Return values */
48 const void *cur_alias
;
49 } internal
; /* DO NOT CHANGE */
56 const char *description
; /* optional option description */
61 int arg_parse( ARGPARSE_ARGS
*arg
, ARGPARSE_OPTS
*opts
);
62 int optfile_parse( FILE *fp
, const char *filename
, unsigned *lineno
,
63 ARGPARSE_ARGS
*arg
, ARGPARSE_OPTS
*opts
);
64 void usage( int level
);
65 const char *strusage( int level
);
66 void set_strusage( const char *(*f
)( int ) );
68 #endif /*LIBJNLIB_ARGPARSE_H*/