w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

apinames.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
Include dependency graph for apinames.c:

Go to the source code of this file.

Classes

struct  NameRec_
 

Macros

#define PROGRAM_NAME   "apinames"
 
#define PROGRAM_VERSION   "0.3"
 
#define LINEBUFF_SIZE   1024
 

Typedefs

typedef enum OutputFormat_ OutputFormat
 
typedef struct NameRec_ NameRec
 
typedef struct NameRec_Name
 
typedef enum State_ State
 

Enumerations

enum  OutputFormat_ {
  OUTPUT_LIST = 0 , OUTPUT_WINDOWS_DEF , OUTPUT_BORLAND_DEF , OUTPUT_WATCOM_LBC ,
  OUTPUT_NETWARE_IMP , OUTPUT_GNU_VERMAP , OUTPUT_LIST = 0 , OUTPUT_WINDOWS_DEF ,
  OUTPUT_BORLAND_DEF , OUTPUT_WATCOM_LBC , OUTPUT_NETWARE_IMP , OUTPUT_GNU_VERMAP
}
 
enum  State_ { STATE_START = 0 , STATE_TYPE , STATE_START = 0 , STATE_TYPE }
 

Functions

static void panic (const char *message)
 
static void names_add (const char *name, const char *end)
 
static int name_compare (const void *name1, const void *name2)
 
static void names_sort (void)
 
static void names_dump (FILE *out, OutputFormat format, const char *dll_name)
 
static int read_header_file (FILE *file, int verbose)
 
static void usage (void)
 
int main (int argc, const char *const *argv)
 

Variables

static Name the_names
 
static int num_names
 
static int max_names
 

Macro Definition Documentation

◆ LINEBUFF_SIZE

#define LINEBUFF_SIZE   1024

Definition at line 27 of file apinames.c.

◆ PROGRAM_NAME

#define PROGRAM_NAME   "apinames"

Definition at line 24 of file apinames.c.

◆ PROGRAM_VERSION

#define PROGRAM_VERSION   "0.3"

Definition at line 25 of file apinames.c.

Typedef Documentation

◆ Name

typedef struct NameRec_ * Name

◆ NameRec

typedef struct NameRec_ NameRec

◆ OutputFormat

◆ State

typedef enum State_ State

Enumeration Type Documentation

◆ OutputFormat_

Enumerator
OUTPUT_LIST 
OUTPUT_WINDOWS_DEF 
OUTPUT_BORLAND_DEF 
OUTPUT_WATCOM_LBC 
OUTPUT_NETWARE_IMP 
OUTPUT_GNU_VERMAP 
OUTPUT_LIST 
OUTPUT_WINDOWS_DEF 
OUTPUT_BORLAND_DEF 
OUTPUT_WATCOM_LBC 
OUTPUT_NETWARE_IMP 
OUTPUT_GNU_VERMAP 

Definition at line 30 of file apinames.c.

◆ State_

enum State_
Enumerator
STATE_START 
STATE_TYPE 
STATE_START 
STATE_TYPE 

Definition at line 234 of file apinames.c.

Function Documentation

◆ main()

◆ name_compare()

static int name_compare ( const void name1,
const void name2 
)
static

Definition at line 115 of file apinames.c.

References NameRec_::name, and strcmp().

Referenced by names_sort().

◆ names_add()

static void names_add ( const char *  name,
const char *  end 
)
static

Definition at line 64 of file apinames.c.

References end, h, int(), len, malloc, max_names, memcmp, memcpy, name, check-symbols::nm, nn, num_names, panic(), realloc, and the_names.

Referenced by read_header_file().

◆ names_dump()

static void names_dump ( FILE out,
OutputFormat  format,
const char *  dll_name 
)
static

◆ names_sort()

static void names_sort ( void  )
static

Definition at line 126 of file apinames.c.

References name_compare(), num_names, qsort, and the_names.

Referenced by main().

◆ panic()

static void panic ( const char *  message)
static

Definition at line 43 of file apinames.c.

References exit(), fprintf, and message.

Referenced by main(), and names_add().

◆ read_header_file()

static int read_header_file ( FILE file,
int  verbose 
)
static

Definition at line 243 of file apinames.c.

References buff, feof, fgets, fprintf, isalnum, isalpha, LINEBUFF_SIZE, memcmp, name, names_add(), p, STATE_START, STATE_TYPE, and verbose.

Referenced by main().

◆ usage()

static void usage ( void  )
static

Definition at line 337 of file apinames.c.

References exit(), format, fprintf, PROGRAM_NAME, and PROGRAM_VERSION.

Referenced by main().

Variable Documentation

◆ max_names

int max_names
static

Definition at line 60 of file apinames.c.

Referenced by names_add().

◆ num_names

int num_names
static

◆ the_names

Name the_names
static

Definition at line 58 of file apinames.c.

Referenced by names_add(), names_dump(), and names_sort().