#include "system.h"
#include <stdarg.h>
#include "debug.h"
Go to the source code of this file.
Data Structures | |
struct | symbolTable_t |
Defines | |
#define | MAX_PRINT_TABLE 10000 |
#define | mod4(num) ( (num) & 3 ) |
Functions | |
void | usage (void) |
void | outofmemory (void) |
void | die (char *format,...) |
size_t | my_fread (void *ptr, size_t size, size_t nitems, FILE *stream) |
void | check_range (short entryNum, short value, short poolSize) |
char * | is_lower_equal (char *string, char *pattern) |
int | findJavaMagic (FILE *fileHandle) |
int | my_strcmp (const void *a, const void *b) |
void | print_table_flush (void) |
void | print_table_add (char *str) |
char * | formatClassName (char *pSomeString, char terminator, char print_star) |
void | dumpRefType (char *pSomeString) |
void | genSymbolTable (FILE *fileHandle, symbolTable_t *symbolTable) |
void | freeSymbolTable (symbolTable_t *symbolTable) |
char * | findClassName (FILE *fileHandle, symbolTable_t *symbolTable) |
void | dumpProvides (char *className) |
void | dumpRequires (symbolTable_t *symbolTable) |
void | processJavaFile (FILE *fileHandle) |
static void | print_list (char *in_string) |
int | main (int argc, char **argv) |
Variables | |
char * | PROGRAM_NAME = 0 |
char * | FILE_NAME = 0 |
char * | CLASS_NAME = 0 |
char * | OUTPUT_PREFIX = 0 |
int | ARG_PROVIDES = 0 |
int | ARG_REQUIRES = 0 |
int | ARG_RPMFORMAT = 0 |
int | ARG_DEPSFORMAT = 0 |
int | ARG_KEYWORDS = 0 |
int | ARG_STARPROV = 0 |
char * | KEYWORD_VERSION = 0 |
char * | KEYWORD_REVISION = 0 |
char * | KEYWORD_EPOCH = 0 |
char * | PRINT_TABLE [10000] |
int | SIZE_PRINT_TABLE |
#define MAX_PRINT_TABLE 10000 |
#define mod4 | ( | num | ) | ( (num) & 3 ) |
void check_range | ( | short | entryNum, | |
short | value, | |||
short | poolSize | |||
) |
void die | ( | char * | format, | |
... | ||||
) |
Definition at line 295 of file javadeps.c.
References CLASS_NAME, FILE_NAME, outofmemory(), and PROGRAM_NAME.
Referenced by check_range(), dumpRequires(), findClassName(), findJavaMagic(), formatClassName(), genSymbolTable(), main(), my_fread(), rpmalAdd(), rpmalAllFileSatisfiesDepend(), rpmalDel(), and rpmalFree().
void dumpProvides | ( | char * | className | ) |
Definition at line 1033 of file javadeps.c.
References ARG_STARPROV, formatClassName(), KEYWORD_EPOCH, KEYWORD_REVISION, KEYWORD_VERSION, outofmemory(), and print_table_add().
Referenced by processJavaFile().
void dumpRefType | ( | char * | pSomeString | ) |
Definition at line 723 of file javadeps.c.
References formatClassName(), and print_table_add().
Referenced by dumpRequires().
void dumpRequires | ( | symbolTable_t * | symbolTable | ) |
Definition at line 744 of file javadeps.c.
References symbolTable_t::classRef, die(), dumpRefType(), formatClassName(), symbolTable_t::poolSize, print_table_add(), and symbolTable_t::stringList.
Referenced by processJavaFile().
char * findClassName | ( | FILE * | fileHandle, | |
symbolTable_t * | symbolTable | |||
) |
Definition at line 993 of file javadeps.c.
References die(), my_fread(), and symbolTable_t::stringList.
Referenced by processJavaFile().
int findJavaMagic | ( | FILE * | fileHandle | ) |
char * formatClassName | ( | char * | pSomeString, | |
char | terminator, | |||
char | print_star | |||
) |
Definition at line 631 of file javadeps.c.
References ARG_RPMFORMAT, die(), and outofmemory().
Referenced by dumpProvides(), dumpRefType(), dumpRequires(), and processJavaFile().
void freeSymbolTable | ( | symbolTable_t * | symbolTable | ) |
Definition at line 1123 of file javadeps.c.
References symbolTable_t::poolSize, and symbolTable_t::stringList.
Referenced by processJavaFile().
void genSymbolTable | ( | FILE * | fileHandle, | |
symbolTable_t * | symbolTable | |||
) |
Definition at line 803 of file javadeps.c.
References ARG_KEYWORDS, ARG_PROVIDES, ARG_REQUIRES, check_range(), symbolTable_t::classRef, die(), is_lower_equal(), KEYWORD_EPOCH, KEYWORD_REVISION, KEYWORD_VERSION, my_fread(), outofmemory(), symbolTable_t::poolSize, print_list(), symbolTable_t::stringList, and symbolTable_t::typeRef.
Referenced by processJavaFile().
char * is_lower_equal | ( | char * | string, | |
char * | pattern | |||
) |
int main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 1190 of file javadeps.c.
References ARG_DEPSFORMAT, ARG_KEYWORDS, ARG_PROVIDES, ARG_REQUIRES, ARG_RPMFORMAT, ARG_STARPROV, CLASS_NAME, die(), FILE_NAME, findJavaMagic(), print_table_flush(), processJavaFile(), PROGRAM_NAME, and usage().
size_t my_fread | ( | void * | ptr, | |
size_t | size, | |||
size_t | nitems, | |||
FILE * | stream | |||
) |
Definition at line 354 of file javadeps.c.
References die().
Referenced by findClassName(), and genSymbolTable().
int my_strcmp | ( | const void * | a, | |
const void * | b | |||
) |
void outofmemory | ( | void | ) |
Definition at line 285 of file javadeps.c.
Referenced by die(), dumpProvides(), formatClassName(), genSymbolTable(), print_table_add(), and processJavaFile().
static void print_list | ( | char * | in_string | ) | [static] |
void print_table_add | ( | char * | str | ) |
Definition at line 531 of file javadeps.c.
References MAX_PRINT_TABLE, outofmemory(), OUTPUT_PREFIX, PRINT_TABLE, print_table_flush(), and SIZE_PRINT_TABLE.
Referenced by dumpProvides(), dumpRefType(), and dumpRequires().
void print_table_flush | ( | void | ) |
Definition at line 488 of file javadeps.c.
References my_strcmp(), PRINT_TABLE, and SIZE_PRINT_TABLE.
Referenced by main(), and print_table_add().
void processJavaFile | ( | FILE * | fileHandle | ) |
Definition at line 1152 of file javadeps.c.
References ARG_DEPSFORMAT, ARG_PROVIDES, ARG_REQUIRES, CLASS_NAME, dumpProvides(), dumpRequires(), findClassName(), formatClassName(), freeSymbolTable(), genSymbolTable(), outofmemory(), and OUTPUT_PREFIX.
Referenced by main().
void usage | ( | void | ) |
Definition at line 162 of file javadeps.c.
int ARG_DEPSFORMAT = 0 |
int ARG_KEYWORDS = 0 |
int ARG_PROVIDES = 0 |
Definition at line 100 of file javadeps.c.
Referenced by genSymbolTable(), main(), and processJavaFile().
int ARG_REQUIRES = 0 |
Definition at line 101 of file javadeps.c.
Referenced by genSymbolTable(), main(), and processJavaFile().
int ARG_RPMFORMAT = 0 |
int ARG_STARPROV = 0 |
char* CLASS_NAME = 0 |
char* FILE_NAME = 0 |
char* KEYWORD_EPOCH = 0 |
char* KEYWORD_REVISION = 0 |
char* KEYWORD_VERSION = 0 |
char* OUTPUT_PREFIX = 0 |
char* PRINT_TABLE[10000] |
Definition at line 135 of file javadeps.c.
Referenced by print_table_add(), and print_table_flush().
char* PROGRAM_NAME = 0 |
int SIZE_PRINT_TABLE |
Definition at line 136 of file javadeps.c.
Referenced by print_table_add(), and print_table_flush().