4 * Command line argument parser.
6 * Copyright 1996-2002 Glyph & Cog, LLC
22 argFlag, /* flag (present / not-present) */
24 argInt, /* integer arg */
26 argFP, /* floating point arg */
28 argString, /* string arg */
30 /* dummy entries -- these show up in the usage listing only; */
31 /* useful for X args, for example */
39 * Argument descriptor.
42 char *arg; /* the command line switch */
43 ArgKind kind; /* kind of arg */
44 void *val; /* place to store value */
45 int size; /* for argString: size of string */
46 char *usage; /* usage string */
50 * Parse command line. Removes all args which are found in the arg
51 * descriptor list <args>. Stops parsing if "--" is found (and removes
52 * it). Returns gFalse if there was an error.
54 extern GBool parseArgs(ArgDesc *args, int *argc, char *argv[]);
57 * Print usage message, based on arg descriptor list.
59 extern void printUsage(char *program, char *otherArgs, ArgDesc *args);
62 * Check if a string is a valid integer or floating point number.
64 extern GBool isInt(char *s);
65 extern GBool isFP(char *s);