rpm  5.4.15
Macros | Functions | Variables
rpmwf.c File Reference
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmtypes.h>
#include <rpmxar.h>
#include <rpmwf.h>
#include "debug.h"
Include dependency graph for rpmwf.c:

Go to the source code of this file.

Macros

#define _RPMWF_INTERNAL
 

Functions

rpmRC rpmwfPushXAR (rpmwf wf, const char *fn)
 
rpmRC rpmwfPullXAR (rpmwf wf, const char *fn)
 
rpmRC rpmwfFini (rpmwf wf)
 
static size_t hSize (rpmuint32_t *p)
 
rpmRC rpmwfInit (rpmwf wf, const char *fn, const char *fmode)
 
rpmRC rpmwfPushRPM (rpmwf wf, const char *fn)
 
static void rpmwfScrub (void *_wf)
 
static rpmwf rpmwfGetPool (rpmioPool pool)
 
rpmwf rpmwfNew (const char *fn)
 
static void rpmwfDumpItem (const char *item, unsigned char *b, size_t bsize)
 
static void rpmwfDump (rpmwf wf, const char *msg, const char *fn)
 
rpmwf rdRPM (const char *rpmfn)
 
rpmwf rdXAR (const char *xarfn)
 
rpmRC wrXAR (const char *xarfn, rpmwf wf)
 
rpmRC wrRPM (const char *rpmfn, rpmwf wf)
 

Variables

int _rpmwf_debug = 0
 
rpmioPool _rpmwfPool
 

Macro Definition Documentation

#define _RPMWF_INTERNAL

Definition at line 9 of file rpmwf.c.

Function Documentation

static size_t hSize ( rpmuint32_t p)
static

Definition at line 106 of file rpmwf.c.

Referenced by rpmwfInit().

rpmwf rdRPM ( const char *  rpmfn)

Definition at line 269 of file rpmwf.c.

References _rpmwf_debug, RPMRC_OK, rpmwfDump(), rpmwfFree(), rpmwfInit(), and rpmwfNew().

rpmwf rdXAR ( const char *  xarfn)
static void rpmwfDump ( rpmwf  wf,
const char *  msg,
const char *  fn 
)
static

Definition at line 255 of file rpmwf.c.

References rpmwfDumpItem().

Referenced by rdRPM(), rdXAR(), and wrXAR().

static void rpmwfDumpItem ( const char *  item,
unsigned char *  b,
size_t  bsize 
)
static

Definition at line 247 of file rpmwf.c.

Referenced by rpmwfDump().

rpmRC rpmwfFini ( rpmwf  wf)

Definition at line 88 of file rpmwf.c.

References _rpmwf_debug, Fclose(), and RPMRC_OK.

Referenced by rpmwfInit(), rpmwfScrub(), and wrRPM().

static rpmwf rpmwfGetPool ( rpmioPool  pool)
static

Definition at line 216 of file rpmwf.c.

References _rpmwf_debug, _rpmwfPool, rpmioGetPool(), rpmioNewPool(), and rpmwfScrub().

Referenced by rpmwfNew().

rpmRC rpmwfInit ( rpmwf  wf,
const char *  fn,
const char *  fmode 
)

Definition at line 112 of file rpmwf.c.

References _rpmwf_debug, Ferror(), Fileno(), Fopen(), hSize(), L, RPMRC_NOTFOUND, RPMRC_OK, and rpmwfFini().

Referenced by rdRPM(), and wrRPM().

rpmwf rpmwfNew ( const char *  fn)

Definition at line 230 of file rpmwf.c.

References rpmwfGetPool(), rpmwfLink(), Stat(), and xstrdup().

Referenced by rdRPM(), and rdXAR().

rpmRC rpmwfPullXAR ( rpmwf  wf,
const char *  fn 
)

Definition at line 52 of file rpmwf.c.

References _rpmwf_debug, b, RPMRC_NOTFOUND, RPMRC_OK, rpmxarPull(), and rpmxarSwapBuf().

Referenced by rdXAR().

rpmRC rpmwfPushRPM ( rpmwf  wf,
const char *  fn 
)

Definition at line 156 of file rpmwf.c.

References _rpmwf_debug, b, Fwrite(), RPMRC_FAIL, RPMRC_NOTFOUND, and RPMRC_OK.

Referenced by wrRPM().

rpmRC rpmwfPushXAR ( rpmwf  wf,
const char *  fn 
)

Definition at line 20 of file rpmwf.c.

References _rpmwf_debug, b, RPMRC_FAIL, RPMRC_OK, and rpmxarPush().

Referenced by wrXAR().

static void rpmwfScrub ( void *  _wf)
static

Definition at line 191 of file rpmwf.c.

References _free(), rpmwfFini(), and rpmxarFree().

Referenced by rpmwfGetPool().

rpmRC wrRPM ( const char *  rpmfn,
rpmwf  wf 
)

Definition at line 340 of file rpmwf.c.

References _rpmwf_debug, RPMRC_OK, rpmwfFini(), rpmwfInit(), and rpmwfPushRPM().

rpmRC wrXAR ( const char *  xarfn,
rpmwf  wf 
)

Definition at line 314 of file rpmwf.c.

References _rpmwf_debug, RPMRC_FAIL, RPMRC_OK, rpmwfDump(), rpmwfPushXAR(), rpmxarFree(), and rpmxarNew().

Variable Documentation

int _rpmwf_debug = 0
rpmioPool _rpmwfPool

Definition at line 214 of file rpmwf.c.

Referenced by rpmcliFini(), and rpmwfGetPool().