|
rpm
5.4.10
|
#include "system.h"#include "rpmio_internal.h"#include <argv.h>#include <popt.h>#include "rpmjs.h"#include "debug.h"
Go to the source code of this file.
Macros | |
| #define | _RPMJS_OPTIONS 0 |
| #define | _RPMJS_INTERNAL |
| #define | F_ISSET(_flags, _FLAG) ((_flags) & RPMJS_FLAGS_##_FLAG) |
| #define | DBG(_t, _l) if ((_t) || _rpmjs_debug) fprintf _l |
Typedefs | |
| typedef void * | JSI_t |
Functions | |
| static void | rpmjsFini (void *_js) |
| static rpmjs | rpmjsGetPool (rpmioPool pool) |
| static rpmjs | rpmjsI (void) |
| rpmjs | rpmjsNew (char **av, uint32_t flags) |
| Create and load a js interpreter. | |
| rpmRC | rpmjsRunFile (rpmjs js, const char *fn, char *const *Iargv, const char **resultp) |
| Execute js from a file. | |
| rpmRC | rpmjsRun (rpmjs js, const char *str, const char **resultp) |
| Execute js string. | |
Variables | |
| char ** | environ |
| int | _rpmjs_debug = 0 |
| rpmjs | _rpmjsI = NULL |
| uint32_t | _rpmjs_options = 0 |
| int | _rpmjs_zeal = 2 |
| struct rpmjs_s | _rpmjs |
| struct poptOption | rpmjsIPoptTable [] |
| rpmioPool | _rpmjsPool |
| #define DBG | ( | _t, | |
| _l | |||
| ) | if ((_t) || _rpmjs_debug) fprintf _l |
Definition at line 76 of file rpmjs.c.
Referenced by rpmjsFini(), rpmjsI(), rpmjsRun(), and rpmjsRunFile().
| #define F_ISSET | ( | _flags, | |
| _FLAG | |||
| ) | ((_flags) & RPMJS_FLAGS_##_FLAG) |
Definition at line 71 of file rpmjs.c.
Referenced by rpmjsNew(), and rpmjsRunFile().
|
static |
Definition at line 142 of file rpmjs.c.
References _rpmjs_debug, _rpmjsPool, rpmioGetPool(), rpmioNewPool(), and rpmjsFini().
Referenced by rpmjsNew().
|
static |
Definition at line 156 of file rpmjs.c.
References _rpmjsI, DBG, and rpmjsNew().
Referenced by rpmjsNew(), rpmjsRun(), and rpmjsRunFile().
| rpmjs rpmjsNew | ( | char ** | av, |
| uint32_t | flags | ||
| ) |
Create and load a js interpreter.
| av | js interpreter args (or NULL) |
| flags | js interpreter flags ((1<<31): use global interpreter) |
Definition at line 171 of file rpmjs.c.
References _rpmjs_options, _rpmjs_zeal, F_ISSET, getenv(), rpmjsGetPool(), rpmjsI(), and rpmjsLink().
Referenced by expandMacro(), and rpmjsI().
Execute js string.
| js | js interpreter (NULL uses global interpreter) |
| str | js string to execute (NULL returns RPMRC_FAIL) |
| *resultp | js exec result |
Definition at line 410 of file rpmjs.c.
References DBG, rpmjsI(), RPMRC_FAIL, RPMRC_OK, and xmalloc.
Referenced by expandMacro().
Execute js from a file.
| js | js interpreter (NULL uses global interpreter) |
| fn | js file to run (NULL returns RPMRC_FAIL) |
| Iargv | js script argv |
| *resultp | js exec result |
Definition at line 317 of file rpmjs.c.
References DBG, environ, F_ISSET, rpmjsI(), RPMRC_FAIL, and RPMRC_OK.
| int _rpmjs_debug = 0 |
Definition at line 74 of file rpmjs.c.
Referenced by rpmjsGetPool().
| uint32_t _rpmjs_options = 0 |
Definition at line 83 of file rpmjs.c.
Referenced by rpmjsNew().
| int _rpmjs_zeal = 2 |
Definition at line 86 of file rpmjs.c.
Referenced by rpmjsNew().
| rpmjs _rpmjsI = NULL |
Definition at line 80 of file rpmjs.c.
Referenced by rpmcliFini(), rpmioClean(), and rpmjsI().
| rpmioPool _rpmjsPool |
Definition at line 140 of file rpmjs.c.
Referenced by rpmcliFini(), rpmioClean(), and rpmjsGetPool().
| char** environ |
Referenced by main(), makeGPGSignature(), open_dso(), rpmCheckPassPhrase(), rpmjsRunFile(), rpmperlNew(), rpmsqExecve(), and rpmsxExec().
| struct poptOption rpmjsIPoptTable[] |
1.8.1.2