build/spec.c File Reference

Handle spec data structure. More...

#include "system.h"
#include "buildio.h"
#include "rpmds.h"
#include "rpmfi.h"
#include "rpmts.h"
#include "debug.h"

Go to the source code of this file.

Defines

#define SKIPWHITE(_x)   {while(*(_x) && (xisspace(*_x) || *(_x) == ',')) (_x)++;}
#define SKIPNONWHITE(_x)   {while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) (_x)++;}

Functions

static struct TriggerFileEntryfreeTriggerFiles (struct TriggerFileEntry *p)
 
Parameters:
p trigger entry chain

static struct SourcefreeSources (struct Source *s)
 Destroy source component chain.
int lookupPackage (Spec spec, const char *name, int flag, Package *pkg)
 Find sub-package control structure by name.
Package newPackage (Spec spec)
 Create and initialize package control structure.
Package freePackage (Package pkg)
 Destroy package control structure.
Package freePackages (Package packages)
 Destroy all packages associated with spec file.
static struct SourcefindSource (Spec spec, int num, int flag)
int parseNoSource (Spec spec, const char *field, int tag)
 
Parameters:
spec spec file control structure

int addSource (Spec spec, Package pkg, const char *field, int tag)
 
Parameters:
spec spec file control structure

static speclines newSl (void)
static speclines freeSl (speclines sl)
static spectags newSt (void)
static spectags freeSt (spectags st)
Spec newSpec (void)
 Create and initialize Spec structure.
Spec freeSpec (Spec spec)
 Destroy Spec structure.
OpenFileInfonewOpenFileInfo (void)
static void printNewSpecfile (Spec spec)
 Print copy of spec file, filling in Group/Description/Summary from specspo.
int rpmspecQuery (rpmts ts, QVA_t qva, const char *arg)
 Function to query spec file(s).

Variables

int specedit


Detailed Description

Handle spec data structure.

Definition in file spec.c.


Define Documentation

#define SKIPNONWHITE ( _x   )     {while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) (_x)++;}

Definition at line 20 of file spec.c.

#define SKIPWHITE ( _x   )     {while(*(_x) && (xisspace(*_x) || *(_x) == ',')) (_x)++;}

Definition at line 19 of file spec.c.


Function Documentation

static struct Source* findSource ( Spec  spec,
int  num,
int  flag 
) [static, read]

Definition at line 199 of file spec.c.

References Source::flags, Source::next, Source::num, and Spec_s::sources.

Referenced by parseNoSource().

static speclines freeSl ( speclines  sl  )  [inline, static]

Definition at line 373 of file spec.c.

References _free(), speclines_s::sl_lines, and speclines_s::sl_nlines.

Referenced by freeSpec().

static struct Source* freeSources ( struct Source s  )  [static, read]

Destroy source component chain.

Parameters:
s source component chain
Returns:
NULL always

Definition at line 52 of file spec.c.

References _free(), Source::fullSource, and Source::next.

Referenced by freePackage(), and freeSpec().

static spectags freeSt ( spectags  st  )  [inline, static]

Definition at line 406 of file spec.c.

References _free(), spectags_s::st_ntags, spectags_s::st_t, and spectag_s::t_lang.

Referenced by freeSpec().

static struct TriggerFileEntry* freeTriggerFiles ( struct TriggerFileEntry p  )  [static, read]

Parameters:
p trigger entry chain

Returns:
NULL always

Definition at line 30 of file spec.c.

References _free(), TriggerFileEntry::fileName, TriggerFileEntry::next, TriggerFileEntry::prog, and TriggerFileEntry::script.

Referenced by freePackage().

static speclines newSl ( void   )  [inline, static]

Definition at line 355 of file spec.c.

References specedit, and xmalloc().

Referenced by newSpec().

static spectags newSt ( void   )  [inline, static]

Definition at line 389 of file spec.c.

References specedit, and xmalloc().

Referenced by newSpec().

static void printNewSpecfile ( Spec  spec  )  [static]

Print copy of spec file, filling in Group/Description/Summary from specspo.

Parameters:
spec spec file control structure

Definition at line 585 of file spec.c.

References _, _free(), Package_s::header, headerNVR(), headerSprintf(), Package_s::next, Spec_s::packages, RPMBUILD_DEFAULT_LANG, RPMERR_QFMT, rpmError, rpmHeaderFormats, RPMTAG_DESCRIPTION, RPMTAG_GROUP, RPMTAG_SUMMARY, rpmTagTable, Spec_s::sl, speclines_s::sl_lines, Spec_s::st, spectags_s::st_ntags, spectags_s::st_t, stpcpy(), tagName(), xmalloc(), and xstrdup().

Referenced by rpmspecQuery().


Variable Documentation

int specedit

Definition at line 18 of file poptQV.c.

Referenced by newSl(), newSt(), and rpmspecQuery().


Generated on Fri Oct 12 08:44:55 2007 for rpm by  doxygen 1.5.2