#include "system.h"
Go to the source code of this file.
Defines | |
#define | POPT_ARGV_ARRAY_GROW_DELTA 5 |
Functions | |
int | poptDupArgv (int argc, const char **argv, int *argcPtr, const char ***argvPtr) |
int | poptParseArgvString (const char *s, int *argcPtr, const char ***argvPtr) |
int | poptConfigFileToString (FILE *fp, char **argstrp, int flags) |
Definition in file poptparse.c.
|
Definition at line 11 of file poptparse.c. Referenced by poptParseArgvString(). |
|
Parses an input configuration file and returns an string that is a command line. For use with popt. You must free the return value when done. Given the file: # this line is ignored # this one too aaa bbb ccc bla=bla this_is = fdsafdas bad_line= reall bad line reall bad line = again 5555= 55555 test = with lots of spaces The result is: --aaa --bbb --ccc --bla="bla" --this_is="fdsafdas" --5555="55555" --test="with lots of spaces" Passing this to poptParseArgvString() yields an argv of: '--aaa' '--bbb' '--ccc' '--bla=bla' '--this_is=fdsafdas' '--5555=55555' '--test=with lots of spaces'
Definition at line 129 of file poptparse.c. References POPT_ERROR_MALLOC, POPT_ERROR_NULLARG, and POPT_ERROR_OVERFLOW. |
|
Duplicate an argument array. @note: The argument array is malloc'd as a single area, so only argv must be free'd.
Definition at line 14 of file poptparse.c. References argv, POPT_ERROR_MALLOC, and POPT_ERROR_NOARG. Referenced by handleAlias(), poptParseArgvString(), and poptStuffArgs(). |
|
Parse a string into an argument array. The parse allows ', ", and \ quoting, but ' is treated the same as " and both may include \ quotes. @note: The argument array is malloc'd as a single area, so only argv must be free'd.
Definition at line 57 of file poptparse.c. References alloca(), argv, POPT_ARGV_ARRAY_GROW_DELTA, POPT_ERROR_BADQUOTE, POPT_ERROR_MALLOC, and poptDupArgv(). Referenced by addOrAppendListEntry(), checkPassPhrase(), configLine(), doScript(), doSetupMacro(), handlePreambleTag(), ignoreDep(), makeGPGSignature(), makePGPSignature(), open_dso(), parseDescription(), parseFiles(), parseScript(), rpmfcExec(), and rpmGlob(). |