4
* Command line argument parser.
6
* Copyright 1996-2003 Glyph & Cog, LLC
9
/*========================================================================
11
Modified under the Poppler project - http://poppler.freedesktop.org
13
All changes made under the Poppler project to this file are licensed
14
under GPL version 2 or later
16
Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
18
To see a description of the changes please see the Changelog file that
19
came with your tarball or type make ChangeLog if you are building from git
21
========================================================================*/
30
#include "goo/gtypes.h"
36
argFlag, /* flag (present / not-present) */
38
argInt, /* integer arg */
40
argFP, /* floating point arg */
42
argString, /* string arg */
44
/* dummy entries -- these show up in the usage listing only; */
45
/* useful for X args, for example */
53
* Argument descriptor.
56
char *arg; /* the command line switch */
57
ArgKind kind; /* kind of arg */
58
void *val; /* place to store value */
59
int size; /* for argString: size of string */
60
char *usage; /* usage string */
64
* Parse command line. Removes all args which are found in the arg
65
* descriptor list <args>. Stops parsing if "--" is found (and removes
66
* it). Returns gFalse if there was an error.
68
extern GBool parseArgs(const ArgDesc *args, int *argc, char *argv[]);
71
* Print usage message, based on arg descriptor list.
73
extern void printUsage(char *program, char *otherArgs, const ArgDesc *args);
76
* Check if a string is a valid integer or floating point number.
78
extern GBool isInt(char *s);
79
extern GBool isFP(char *s);