21 static const char *
name = NULL;
23 static const char *
lang = NULL;
27 { NULL,
'n', POPT_ARG_STRING, &
name, 0, NULL, NULL},
28 { NULL,
'l', POPT_ARG_STRING, &
lang, 0, NULL, NULL},
29 { 0, 0, 0, 0, 0, NULL, NULL}
43 const char **argv = NULL;
44 poptContext optCon = NULL;
48 {
char * se = strchr(spec->
line,
'#');
51 while (--se >= spec->
line && strchr(
" \t\n\r", *se) != NULL)
56 if ((rc = poptParseArgvString(spec->
line, &argc, &argv))) {
58 spec->
lineNum, poptStrerror(rc));
64 optCon = poptGetContext(NULL, argc, argv,
optionsTable, 0);
65 while ((arg = poptGetNextOpt(optCon)) > 0)
73 poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
78 if (poptPeekArg(optCon)) {
80 name = poptGetArg(optCon);
81 if (poptPeekArg(optCon)) {
131 #if defined(SUPPORT_I18NSTRING_TYPE) 148 optCon = poptFreeContext(optCon);
rpmiob rpmiobRTrim(rpmiob iob)
Trim trailing white space.
rpmParseState isPart(Spec spec)
Check line for section separator, return next parser state.
static struct poptOption optionsTable[]
int parseDescription(Spec spec)
Parse %description section of a spec file.
rpmRC lookupPackage(Spec spec, const char *name, int flag, Package *pkg)
Find sub-package control structure by name.
rpmiob rpmiobFree(rpmiob iob)
Destroy a I/O buffer instance.
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.
spectag stashSt(Spec spec, Header h, rpmTag tag, const char *lang)
stashSt.
rpmiob rpmiobNew(size_t len)
Create an I/O buffer.
char * rpmiobStr(rpmiob iob)
Return I/O buffer (as string).
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.
#define RPMBUILD_DEFAULT_LANG