rpm  5.4.10
Macros | Functions | Variables
rpmtcl.c File Reference
#include "system.h"
#include <argv.h>
#include "rpmtcl.h"
#include "debug.h"
Include dependency graph for rpmtcl.c:

Go to the source code of this file.

Macros

#define _RPMTCL_INTERNAL

Functions

static void rpmtclFini (void *_tcl)
static rpmtcl rpmtclGetPool (rpmioPool pool)
static rpmtcl rpmtclI (void)
rpmtcl rpmtclNew (char **av, uint32_t flags)
 Create and load a tcl interpreter.
rpmRC rpmtclRunFile (rpmtcl tcl, const char *fn, const char **resultp)
 Execute tcl from a file.
rpmRC rpmtclRun (rpmtcl tcl, const char *str, const char **resultp)
 Execute tcl string.

Variables

int _rpmtcl_debug = 0
rpmtcl _rpmtclI = NULL
rpmioPool _rpmtclPool

Macro Definition Documentation

#define _RPMTCL_INTERNAL

Definition at line 15 of file rpmtcl.c.

Function Documentation

static void rpmtclFini ( void *  _tcl)
static

Definition at line 33 of file rpmtcl.c.

References rpmiobFree().

Referenced by rpmtclGetPool().

static rpmtcl rpmtclGetPool ( rpmioPool  pool)
static

Definition at line 50 of file rpmtcl.c.

References _rpmtcl_debug, _rpmtclPool, rpmioGetPool(), rpmioNewPool(), and rpmtclFini().

Referenced by rpmtclNew().

static rpmtcl rpmtclI ( void  )
static

Definition at line 130 of file rpmtcl.c.

References _rpmtclI, and rpmtclNew().

Referenced by rpmtclNew(), rpmtclRun(), and rpmtclRunFile().

rpmtcl rpmtclNew ( char **  av,
uint32_t  flags 
)

Create and load a tcl interpreter.

Parameters
avtcl interpreter args (or NULL)
flagstcl interpreter flags ((1<<31): use global interpreter)
Returns
new tcl interpreter

Definition at line 165 of file rpmtcl.c.

References argvCount(), rpmiobNew(), rpmtclGetPool(), rpmtclI(), and rpmtclLink().

Referenced by expandMacro(), and rpmtclI().

rpmRC rpmtclRun ( rpmtcl  tcl,
const char *  str,
const char **  resultp 
)

Execute tcl string.

Parameters
tcltcl interpreter (NULL uses global interpreter)
strtcl string to execute (NULL returns RPMRC_FAIL)
*resultptcl exec result
Returns
RPMRC_OK on success

Definition at line 225 of file rpmtcl.c.

References _rpmtcl_debug, rpmiobStr(), RPMRC_FAIL, RPMRC_OK, and rpmtclI().

Referenced by expandMacro().

rpmRC rpmtclRunFile ( rpmtcl  tcl,
const char *  fn,
const char **  resultp 
)

Execute tcl from a file.

Parameters
tcltcl interpreter (NULL uses global interpreter)
fntcl file to run (NULL returns RPMRC_FAIL)
*resultptcl exec result
Returns
RPMRC_OK on success

Definition at line 203 of file rpmtcl.c.

References _rpmtcl_debug, rpmiobStr(), RPMRC_FAIL, RPMRC_OK, and rpmtclI().

Variable Documentation

int _rpmtcl_debug = 0

Definition at line 21 of file rpmtcl.c.

Referenced by rpmtclGetPool(), rpmtclRun(), and rpmtclRunFile().

rpmtcl _rpmtclI = NULL

Definition at line 24 of file rpmtcl.c.

Referenced by rpmioClean(), and rpmtclI().

rpmioPool _rpmtclPool

Definition at line 48 of file rpmtcl.c.

Referenced by rpmioClean(), and rpmtclGetPool().