Annotation of embedaddon/hping2/antigetopt.h, revision 1.1.1.1

1.1       misho       1: #ifndef __ANTIGETOPT_H
                      2: #define __ANTIGETOPT_H
                      3: 
                      4: /* special return codes */
                      5: enum { AGO_EOF=4000, AGO_ALONE, AGO_UNKNOWN, AGO_REQARG, AGO_RESET, AGO_AMBIG };
                      6: 
                      7: /* option flags */
                      8: #define AGO_NOARG (1<<0)               /* no argument */
                      9: #define AGO_NEEDARG (1<<1)             /* required argument */
                     10: #define AGO_OPTARG (1<<2)              /* optional argument */
                     11: #define AGO_EXCEPT0 (1<<3)             /* exception #0 */
                     12: #define AGO_EXCEPT1 (1<<4)             /* exception #1 */
                     13: #define AGO_EXCEPT2 (1<<5)             /* exception #3 */
                     14: #define AGO_ENDOFLIST (1<<15)          /* end of argument list marker */
                     15: 
                     16: /* option list null term */
                     17: #define AGO_LIST_TERM {'\0',NULL,0,AGO_ENDOFLIST}
                     18: 
                     19: /* The structure that defines an argument */
                     20: struct ago_optlist {
                     21:        char ao_short;
                     22:        char *ao_long;
                     23:        int ao_id;
                     24:        int ao_flags;
                     25: };
                     26: 
                     27: extern char *ago_optarg;
                     28: extern char *ago_optname;
                     29: extern char ago_optchar;
                     30: 
                     31: int    antigetopt(int argc, char **argv, struct ago_optlist *list);
                     32: void   ago_gnu_error(char *pname, int error);
                     33: int    ago_set_exception(int except_nr, int (*tester)(void), char *msg);
                     34: 
                     35: #endif /* __ANTIGETOPT_H */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>