- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

# build/parseSpec.c File Reference

Top level dispatcher for spec file parsing. More...

`#include "system.h"`
`#include <rpmio_internal.h>`
`#include <rpmbuild.h>`
`#include "debug.h"`

Go to the source code of this file.

## Data Structures
struct | PartRec
## Functions
static void | initParts (struct PartRec *p)
rpmParseState | isPart (const char *line)
| Check line for section separator, return next parser state.
static int | matchTok (const char *token, const char *line)
void | handleComments (char *s)
| Truncate comment lines.
static void | forceIncludeFile (Spec spec, const char *fileName)
static int | copyNextLine (Spec spec, OFI_t *ofi, int strip)
int | readLine (Spec spec, int strip)
| Read next line from spec file.
void | closeSpec (Spec spec)
| Stop reading from spec file, freeing resources.
int | parseSpec (Spec *specp, const char *specFile, const char *rootURL, const char *buildRootURL, int recursing, const char *passPhrase, char *cookie, int anyarch, int force)
| Parse spec file into spec control structure.
## Variables
static int | _debug = 0
static struct PartRec | partList []
int | noLang

## Detailed Description

Top level dispatcher for spec file parsing.

Definition in file parseSpec.c.

## Function Documentation

static int copyNextLine | ( | Spec | spec,
|  | OFI_t * | ofi,
|  | int | strip |
| ) |  |  | `[static]`

Definition at line 119 of file parseSpec.c.

References _, expandMacros(), handleComments(), SpecStruct::lbuf, SpecStruct::line, SpecStruct::lineNum, SpecStruct::macros, SpecStruct::nextline, SpecStruct::nextpeekc, ReadLevelEntry::reading, OpenFileInfo::readPtr, SpecStruct::readStack, RPMERR_BADSPEC, rpmError, STRIP_COMMENTS, STRIP_TRAILINGSPACE, and xisspace().

Referenced by readLine().

static void forceIncludeFile | ( | Spec | spec,
|  | const char * | fileName |
| ) |  |  | `[static]`

Definition at line 106 of file parseSpec.c.

References OpenFileInfo::fileName, SpecStruct::fileStack, newOpenFileInfo(), OpenFileInfo::next, and xstrdup().

Referenced by readLine().

static void initParts | ( | struct PartRec * | p | ) | `[inline, static]`

Definition at line 47 of file parseSpec.c.

References PartRec::len, and PartRec::token.

Referenced by isPart().

static int matchTok | ( | const char * | token,
|  | const char * | line |
| ) |  |  | `[static]`

Definition at line 75 of file parseSpec.c.

References SKIPNONSPACE, SKIPSPACE, and xstrncasecmp().

Referenced by readLine().

## Variable Documentation

int _debug = 0`[static]`

Definition at line 9 of file parseSpec.c.

Referenced by db1cdel(), db1cget(), db1close(), db1cput(), db1sync(), db3c_close(), db3c_del(), db3c_dup(), db3c_get(), db3c_open(), db3c_put(), db3ccount(), db3cdel(), db3cget(), db3close(), db3cput(), db3open(), db3stat(), db3sync(), db_fini(), db_init(), dbiVerify(), parseSpec(), pgpHexSet(), pgpPrtPubkeyParams(), pgpPrtSig(), pgpPrtSigParams(), rpmGenPath(), and rpmGlob().

int noLang

Definition at line 59 of file poptBT.c.

struct PartRec partList[]`[static]`

Referenced by isPart().