rpm  5.4.4
Data Structures | Defines | Typedefs | Functions | Variables
ruby/trb.c File Reference
#include "system.h"
#include <rpmio.h>
#include <argv.h>
#include <rpmruby.h>
#include "rpm-rb.h"
#include "rpmds-rb.h"
#include "rpmfi-rb.h"
#include "rpmhdr-rb.h"
#include "rpmmc-rb.h"
#include "rpmmi-rb.h"
#include "rpmps-rb.h"
#include "rpmte-rb.h"
#include "rpmts-rb.h"
#include <rpmcli.h>
#include "debug.h"
Include dependency graph for trb.c:

Go to the source code of this file.

Data Structures

struct  rpmrbClassTable_s

Defines

#define _RPMRUBY_INTERNAL

Typedefs

typedef struct rpmrbClassTable_srpmrbClassTable

Functions

static rpmRC rpmrbLoadFile (rpmruby rb, const char *pre, const char *fn)
static void rpmrbLoadClasses (void)
int main (int argc, char *argv[])

Variables

static int _debug = 0
static int _loglvl = 0
static int _test = 1
static struct rpmrbClassTable_s classTable []
static size_t nclassTable = sizeof(classTable) / sizeof(classTable[0])
static const char tscripts [] = "./tscripts/"
static const char * _acknack
static struct poptOption optionsTable []

Define Documentation

#define _RPMRUBY_INTERNAL

Definition at line 6 of file trb.c.


Typedef Documentation


Function Documentation

int main ( int  argc,
char *  argv[] 
)
static void rpmrbLoadClasses ( void  ) [static]
static rpmRC rpmrbLoadFile ( rpmruby  rb,
const char *  pre,
const char *  fn 
) [static]

Definition at line 82 of file trb.c.

References _debug, _free(), rpmExpand(), and rpmrubyRun().

Referenced by main(), and rpmrbLoadClasses().


Variable Documentation

const char* _acknack [static]
Initial value:
"\
def ack(cmd, expected)\n\
  begin\n\
    actual = eval(cmd)\n\
  rescue\n\
    print(\"NACK:  ack(\"+cmd.to_s+\")\tcaught '\"+\"#{$!}\"+\"'\n\")\n\
    return\n\
  end\n\
  if (actual != expected && expected != nil)\n\
    print(\"NACK:  ack(\"+cmd.to_s+\")\tgot '\"+actual.to_s+\"' not '\"+expected.to_s+\"'\n\")\n\
  elsif ($loglvl)\n\
    print(\"       ack(\"+cmd.to_s+\")\tgot '\"+actual.to_s+\"'\n\")\n\
  end\n\
end\n\
"

Definition at line 65 of file trb.c.

int _debug = 0 [static]

Definition at line 30 of file trb.c.

Referenced by main(), rpmrbLoadClasses(), and rpmrbLoadFile().

int _loglvl = 0 [static]

Definition at line 33 of file trb.c.

Referenced by main(), and rpmrbLoadClasses().

int _test = 1 [static]

Definition at line 36 of file trb.c.

Referenced by main().

struct rpmrbClassTable_s classTable[] [static]
Initial value:
 {
    { "Ps",                Init_rpmps,    9 },
    { "Mc",                Init_rpmmc,    8 },
    { "Te",                Init_rpmte,    7 },
    { "Fi",                Init_rpmfi,    6 },
    { "Ds",                Init_rpmds,    5 },
    { "Hdr",               Init_rpmhdr,   4 },
    { "Mi",                Init_rpmmi,    3 },
    { "Ts",                Init_rpmts,    2 },
    { "Rpm",               Init_rpm,      1 },
}

Definition at line 46 of file trb.c.

size_t nclassTable = sizeof(classTable) / sizeof(classTable[0]) [static]

Definition at line 59 of file trb.c.

Referenced by rpmrbLoadClasses().

struct poptOption optionsTable[] [static]
Initial value:
 {
 { "debug", 'd', POPT_ARG_VAL,  &_debug, -1,            NULL, NULL },
 { "test", 't', POPT_ARG_VAL,   &_test, -1,             NULL, NULL },

 { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0,
        N_("Common options for all rpm executables:"), NULL },

  POPT_AUTOHELP
  POPT_TABLEEND
}

Definition at line 159 of file trb.c.

const char tscripts[] = "./tscripts/" [static]

Definition at line 62 of file trb.c.