Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

lib/rpmrc.c File Reference

#include "system.h"
#include <stdarg.h>
#include <rpmlib.h>
#include <rpmmacro.h>
#include "misc.h"
#include "debug.h"

Go to the source code of this file.

Data Structures

struct  canonEntry
struct  defaultEntry
struct  machCache
struct  machCacheEntry
struct  machEquivInfo
struct  machEquivTable
struct  rpmOption
struct  rpmvarValue
struct  tableType

Defines

#define __power_pc()   0
#define OS   0
#define ARCH   1
#define _TOPDIRMACRO   "%{_topdir}/"

Typedefs

typedef const char* cptr_t

Functions

int doReadRC (FD_t fd, const char *urlfn)
void rpmSetVarArch (int var, const char *val, const char *arch)
void rebuildCompatTables (int type, const char *name)
int optionCompare (const void *a, const void *b)
void rpmRebuildTargetVars (const char **target, const char **canontarget)
struct machCacheEntrymachCacheFindEntry (struct machCache *cache, const char *key)
int machCompatCacheAdd (char *name, const char *fn, int linenum, struct machCache *cache)
struct machEquivInfomachEquivSearch (const struct machEquivTable *table, const char *name)
void machAddEquiv (struct machEquivTable *table, const char *name, int distance)
void machCacheEntryVisit (struct machCache *cache, struct machEquivTable *table, const char *name, int distance)
void machFindEquivs (struct machCache *cache, struct machEquivTable *table, const char *key)
int addCanon (struct canonEntry **table, int *tableLen, char *line, const char *fn, int lineNum)
int addDefault (struct defaultEntry **table, int *tableLen, char *line, const char *fn, int lineNum)
const struct canonEntrylookupInCanonTable (const char *name, const struct canonEntry *table, int tableLen)
const char* lookupInDefaultTable (const char *name, const struct defaultEntry *table, int tableLen)
int rpmReadConfigFiles (const char *file, const char *target)
void setVarDefault (int var, const char *macroname, const char *val, const char *body)
void setPathDefault (int var, const char *macroname, const char *subdir)
void setDefaults (void)
int rpmReadRC (const char *rcfiles)
void defaultMachine (const char **arch, const char **os)
const char* rpmGetVarArch (int var, const char *arch)
const char* rpmGetVar (int var)
void freeRpmVar (struct rpmvarValue *orig)
void rpmSetVar (int var, const char *val)
void rpmSetTables (int archTable, int osTable)
int rpmMachineScore (int type, const char *name)
void rpmGetMachine (const char **arch, const char **os)
void rpmSetMachine (const char *arch, const char *os)
void getMachineInfo (int type, const char **name, int *num)
void rpmGetArchInfo (const char **name, int *num)
void rpmGetOsInfo (const char **name, int *num)
void rpmFreeRpmrc (void)
int rpmShowRC (FILE *fp)

Variables

const char* defrcfiles = LIBRPMRC_FILENAME ":/etc/rpmrc:~/.rpmrc"
const char* macrofiles = MACROFILES
struct tableType tables [RPM_MACHTABLE_COUNT]
struct rpmOption optionTable []
int optionTableSize = sizeof(optionTable) / sizeof(*optionTable)
cptr_t current [2]
int currTables [2] = { RPM_MACHTABLE_INSTOS, RPM_MACHTABLE_INSTARCH }
struct rpmvarValue values [RPMVAR_NUM]
int defaultsInitialized = 0
const char* prescriptenviron


Define Documentation

#define ARCH   1
 

Definition at line 109 of file rpmrc.c.

#define OS   0
 

Definition at line 108 of file rpmrc.c.

#define _TOPDIRMACRO   "%{_topdir}/"
 

#define __power_pc( )   0
 

Definition at line 8 of file rpmrc.c.


Typedef Documentation

typedef const char * cptr_t
 

Definition at line 23 of file rpmrc.c.


Function Documentation

int addCanon ( struct canonEntry ** table,
int * tableLen,
char * line,
const char * fn,
int lineNum ) [static]
 

Definition at line 285 of file rpmrc.c.

Referenced by doReadRC().

int addDefault ( struct defaultEntry ** table,
int * tableLen,
char * line,
const char * fn,
int lineNum ) [static]
 

Definition at line 337 of file rpmrc.c.

Referenced by doReadRC().

void defaultMachine ( const char ** arch,
const char ** os ) [static]
 

Definition at line 951 of file rpmrc.c.

Referenced by rpmRebuildTargetVars(), rpmSetMachine(), and rpmSetTables().

int doReadRC ( FD_t fd,
const char * urlfn ) [static]
 

Definition at line 597 of file rpmrc.c.

Referenced by rpmReadRC().

void freeRpmVar ( struct rpmvarValue * orig ) [static]
 

Definition at line 1191 of file rpmrc.c.

Referenced by rpmSetVar().

void getMachineInfo ( int type,
const char ** name,
int * num ) [static]
 

Definition at line 1329 of file rpmrc.c.

Referenced by rpmGetArchInfo(), and rpmGetOsInfo().

const struct canonEntry * lookupInCanonTable ( const char * name,
const struct canonEntry * table,
int tableLen ) [static]
 

Definition at line 370 of file rpmrc.c.

Referenced by defaultMachine(), and getMachineInfo().

const char * lookupInDefaultTable ( const char * name,
const struct defaultEntry * table,
int tableLen ) [static]
 

Definition at line 383 of file rpmrc.c.

Referenced by rpmSetMachine().

void machAddEquiv ( struct machEquivTable * table,
const char * name,
int distance ) [static]
 

Definition at line 219 of file rpmrc.c.

Referenced by machCacheEntryVisit(), and machFindEquivs().

void machCacheEntryVisit ( struct machCache * cache,
struct machEquivTable * table,
const char * name,
int distance ) [static]
 

Definition at line 237 of file rpmrc.c.

Referenced by machFindEquivs().

struct machCacheEntry * machCacheFindEntry ( struct machCache * cache,
const char * key ) [static]
 

Definition at line 129 of file rpmrc.c.

Referenced by machCacheEntryVisit(), and machCompatCacheAdd().

int machCompatCacheAdd ( char * name,
const char * fn,
int linenum,
struct machCache * cache ) [static]
 

Definition at line 139 of file rpmrc.c.

Referenced by doReadRC().

struct machEquivInfo * machEquivSearch ( const struct machEquivTable * table,
const char * name ) [static]
 

Definition at line 208 of file rpmrc.c.

Referenced by machAddEquiv().

void machFindEquivs ( struct machCache * cache,
struct machEquivTable * table,
const char * key ) [static]
 

Definition at line 259 of file rpmrc.c.

Referenced by rebuildCompatTables().

int optionCompare ( const void * a,
const void * b ) [static]
 

Definition at line 121 of file rpmrc.c.

void rebuildCompatTables ( int type,
const char * name ) [static]
 

Definition at line 1323 of file rpmrc.c.

Referenced by rpmSetMachine(), and rpmSetTables().

const char * rpmGetVarArch ( int var,
const char * arch ) [static]
 

Definition at line 1166 of file rpmrc.c.

Referenced by rpmGetVar(), and rpmRebuildTargetVars().

void rpmRebuildTargetVars ( const char ** buildtarget,
const char ** canontarget ) [static]
 

Definition at line 1364 of file rpmrc.c.

Referenced by doReadRC(), and rpmReadConfigFiles().

void rpmSetVarArch ( int var,
const char * val,
const char * arch ) [static]
 

Definition at line 1215 of file rpmrc.c.

Referenced by doReadRC().

void setDefaults ( void ) [static]
 

Definition at line 478 of file rpmrc.c.

Referenced by rpmReadRC().

void setPathDefault ( int var,
const char * macroname,
const char * subdir ) [static]
 

Definition at line 430 of file rpmrc.c.

Referenced by setDefaults().

void setVarDefault ( int var,
const char * macroname,
const char * val,
const char * body ) [static]
 

Definition at line 419 of file rpmrc.c.

Referenced by setDefaults().


Variable Documentation

int currTables = { RPM_MACHTABLE_INSTOS, RPM_MACHTABLE_INSTARCH } [static]
 

Definition at line 112 of file rpmrc.c.

cptr_t current [static]
 

Definition at line 111 of file rpmrc.c.

int defaultsInitialized = 0 [static]
 

Definition at line 114 of file rpmrc.c.

const char * defrcfiles = LIBRPMRC_FILENAME ":/etc/rpmrc:~/.rpmrc" [static]
 

Definition at line 19 of file rpmrc.c.

const char* macrofiles = MACROFILES
 

List of macro files to read when configuring rpm. This is a colon separated list of files. URI's are permitted as well, identified by the token '://', so file paths must not begin with '//'.

Definition at line 21 of file rpmrc.c.

struct rpmOption optionTable [static]
 

Initial value:

 {
    { "include",                RPMVAR_INCLUDE,                 0, 1,   0, 2 },
    { "macrofiles",             RPMVAR_MACROFILES,              0, 0,   0, 1 },
    { "optflags",               RPMVAR_OPTFLAGS,                1, 0,   1, 0 },
    { "provides",               RPMVAR_PROVIDES,                0, 0,   0, 0 },
}

Definition at line 99 of file rpmrc.c.

int optionTableSize = sizeof(optionTable) / sizeof(*optionTable) [static]
 

Definition at line 106 of file rpmrc.c.

const char * prescriptenviron [static]
 

Initial value:

 "\n\
RPM_SOURCE_DIR=\"%{_sourcedir}\"\n\
RPM_BUILD_DIR=\"%{_builddir}\"\n\
RPM_OPT_FLAGS=\"%{optflags}\"\n\
RPM_ARCH=\"%{_arch}\"\n\
RPM_OS=\"%{_os}\"\n\
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\n\
RPM_DOC_DIR=\"%{_docdir}\"\n\
export RPM_DOC_DIR\n\
RPM_PACKAGE_NAME=\"%{name}\"\n\
RPM_PACKAGE_VERSION=\"%{version}\"\n\
RPM_PACKAGE_RELEASE=\"%{release}\"\n\
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\n\
%{?buildroot:RPM_BUILD_ROOT=\"%{buildroot}\"\n\
export RPM_BUILD_ROOT\n}\
"

Definition at line 461 of file rpmrc.c.

struct tableType tables [static]
 

Initial value:

 {
    { "arch", 1, 0 },
    { "os", 1, 0 },
    { "buildarch", 0, 1 },
    { "buildos", 0, 1 }
}

Definition at line 89 of file rpmrc.c.

struct rpmvarValue values [static]
 

Definition at line 113 of file rpmrc.c.


Generated at Thu Apr 19 15:29:47 2001 for rpm by doxygen1.2.6-20010408 written by Dimitri van Heesch, © 1997-2001