rpm 5.2.1
Defines | Functions | Variables

rpmio/rpmxar.c File Reference

#include "system.h"
#include <rpmxar.h>
#include <rpmio_internal.h>
#include "debug.h"
Include dependency graph for rpmxar.c:

Go to the source code of this file.

Defines

#define READ   0
#define WRITE   1
#define xar_open(_fn, _f)   (NULL)
#define xar_close(_x)   (1)
#define xar_iter_new()   (NULL)
#define xar_iter_free(_i)
#define xar_file_first(_x, _i)   (NULL)
#define xar_file_next(_i)   (NULL)
#define xar_add_frombuffer(_x, _parent, _fn, _b, _bsize)   (NULL)
#define xar_extract_tobuffersz(_x, _f, _b, _bsize)   (1)
#define xar_get_path(_f)   "*No XAR*"
#define xar_opt_set(_a1, _a2, _a3)   (1)
#define XAR_OPT_COMPRESSION   0
#define XAR_OPT_VAL_NONE   0
#define XAR_OPT_VAL_GZIP   0
#define _RPMXAR_INTERNAL

Functions

static void rpmxarFini (void *_xar)
static rpmxar rpmxarGetPool (rpmioPool pool)
rpmxar rpmxarNew (const char *fn, const char *fmode)
int rpmxarNext (rpmxar xar)
int rpmxarPush (rpmxar xar, const char *fn, unsigned char *b, size_t bsize)
int rpmxarPull (rpmxar xar, const char *fn)
int rpmxarSwapBuf (rpmxar xar, unsigned char *b, size_t bsize, unsigned char **obp, size_t *obsizep)
ssize_t xarRead (void *cookie, char *buf, size_t count)

Variables

int _xar_debug = 0
rpmioPool _xarPool

Define Documentation

#define _RPMXAR_INTERNAL

Definition at line 59 of file rpmxar.c.

#define READ   0

Definition at line 42 of file rpmxar.c.

Referenced by rpmxarNew().

#define WRITE   1

Definition at line 43 of file rpmxar.c.

Referenced by rpmxarNew().

#define xar_add_frombuffer (   _x,
  _parent,
  _fn,
  _b,
  _bsize 
)    (NULL)

Definition at line 50 of file rpmxar.c.

Referenced by rpmxarPush().

#define xar_close (   _x)    (1)

Definition at line 45 of file rpmxar.c.

Referenced by rpmxarFini().

#define xar_extract_tobuffersz (   _x,
  _f,
  _b,
  _bsize 
)    (1)

Definition at line 51 of file rpmxar.c.

Referenced by rpmxarPull().

#define xar_file_first (   _x,
  _i 
)    (NULL)

Definition at line 48 of file rpmxar.c.

Referenced by rpmxarNext().

#define xar_file_next (   _i)    (NULL)

Definition at line 49 of file rpmxar.c.

Referenced by rpmxarNext().

#define xar_get_path (   _f)    "*No XAR*"

Definition at line 52 of file rpmxar.c.

Referenced by rpmxarPull().

#define xar_iter_free (   _i)

Definition at line 47 of file rpmxar.c.

Referenced by rpmxarFini().

#define xar_iter_new ( )    (NULL)

Definition at line 46 of file rpmxar.c.

Referenced by rpmxarNew().

#define xar_open (   _fn,
  _f 
)    (NULL)

Definition at line 44 of file rpmxar.c.

Referenced by rpmxarNew().

#define XAR_OPT_COMPRESSION   0

Definition at line 54 of file rpmxar.c.

Referenced by rpmxarPush().

#define xar_opt_set (   _a1,
  _a2,
  _a3 
)    (1)

Definition at line 53 of file rpmxar.c.

Referenced by rpmxarPush().

#define XAR_OPT_VAL_GZIP   0

Definition at line 56 of file rpmxar.c.

Referenced by rpmxarPush().

#define XAR_OPT_VAL_NONE   0

Definition at line 55 of file rpmxar.c.

Referenced by rpmxarPush().


Function Documentation

static void rpmxarFini ( void *  _xar) [static]

Definition at line 74 of file rpmxar.c.

References _free(), xar_close, and xar_iter_free.

Referenced by rpmxarGetPool().

static rpmxar rpmxarGetPool ( rpmioPool  pool) [static]

Definition at line 94 of file rpmxar.c.

References _xar_debug, _xarPool, rpmioGetPool(), rpmioNewPool(), and rpmxarFini().

Referenced by rpmxarNew().

rpmxar rpmxarNew ( const char *  fn,
const char *  fmode 
)

Definition at line 108 of file rpmxar.c.

References READ, rpmxarGetPool(), rpmxarLink(), WRITE, xar_iter_new, and xar_open.

Referenced by rdLead().

int rpmxarNext ( rpmxar  xar)

Definition at line 122 of file rpmxar.c.

References _xar_debug, xar_file_first, and xar_file_next.

Referenced by rdLead(), rdSignature(), readFile(), rpmReadHeader(), and xarRead().

int rpmxarPull ( rpmxar  xar,
const char *  fn 
)

Definition at line 157 of file rpmxar.c.

References _free(), _xar_debug, xar_extract_tobuffersz, and xar_get_path.

Referenced by rdLead(), rdSignature(), readFile(), rpmReadHeader(), and xarRead().

int rpmxarPush ( rpmxar  xar,
const char *  fn,
unsigned char *  b,
size_t  bsize 
)
int rpmxarSwapBuf ( rpmxar  xar,
unsigned char *  b,
size_t  bsize,
unsigned char **  obp,
size_t *  obsizep 
)

Definition at line 189 of file rpmxar.c.

References _free(), and _xar_debug.

Referenced by rdLead(), and xarRead().

ssize_t xarRead ( void *  cookie,
char *  buf,
size_t  count 
)

Definition at line 215 of file rpmxar.c.

References _xar_debug, fdGetXAR(), RPMRC_FAIL, rpmxarNext(), rpmxarPull(), and rpmxarSwapBuf().

Referenced by __fdRead().


Variable Documentation

int _xar_debug = 0

Definition at line 68 of file rpmxar.c.

Referenced by rpmxarGetPool(), rpmxarNext(), rpmxarPull(), rpmxarPush(), rpmxarSwapBuf(), and xarRead().

Definition at line 71 of file rpmxar.c.

Referenced by rpmioClean(), and rpmxarGetPool().