18 static const char *
name = NULL;
20 static const char *
file = NULL;
23 { NULL,
'n', POPT_ARG_STRING, &
name,
'n', NULL, NULL},
24 { NULL,
'f', POPT_ARG_STRING, &
file,
'f', NULL, NULL},
25 { 0, 0, 0, 0, 0, NULL, NULL}
34 const char ** argv = NULL;
36 poptContext optCon = NULL;
43 if ((rc = poptParseArgvString(spec->
line, &argc, &argv))) {
45 spec->
lineNum, poptStrerror(rc));
50 optCon = poptGetContext(NULL, argc, argv,
optionsTable, 0);
51 while ((arg = poptGetNextOpt(optCon)) > 0) {
60 poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
66 if (poptPeekArg(optCon)) {
69 name = poptGetArg(optCon);
71 if (poptPeekArg(optCon)) {
117 #if defined(RPM_VENDOR_MANDRIVA) 126 optCon = poptFreeContext(optCon);
rpmParseState isPart(Spec spec)
Check line for section separator, return next parser state.
char * rpmGetPath(const char *path,...)
Return (malloc'ed) expanded, canonicalized, file path.
rpmRC lookupPackage(Spec spec, const char *name, int flag, Package *pkg)
Find sub-package control structure by name.
static void rpmlog(int code, const char *fmt,...)
rpmiob rpmiobAppend(rpmiob iob, const char *s, size_t nl)
Append string to I/O buffer.
int readLine(Spec spec, rpmStripFlags strip)
Read next line from spec file.
Yet Another syslog(3) API clone.
The structure used to store values parsed from a spec file.
int parseFiles(Spec spec)
Parse %files section of a spec file.
rpmiob rpmiobNew(size_t len)
Create an I/O buffer.
This is the only module users of librpmbuild should need to include.
static void * _free(const void *p)
Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
enum rpmParseState_e rpmParseState
The structure used to store values for a package.
static struct poptOption optionsTable[]