tdef_main.c File Reference

#include "sxunix.h"
#include "put_edit.h"
#include "sxversion.h"
Include dependency graph for tdef_main.c:

Go to the source code of this file.

Defines

#define OPTION(opt)   (1l << (opt - 1))
#define noOPTION(opt)   (~OPTION (opt))
#define OPT_NB   ((sizeof(option_tbl)/sizeof(*option_tbl))-1)
#define UNKNOWN_ARG   ((SXINT)0)
#define VERBOSE   ((SXINT)1)
#define SOURCE   ((SXINT)2)
#define C   ((SXINT)3)
#define PASCAL   ((SXINT)4)
#define LANGUAGE_NAME   ((SXINT)5)
#define LAST_OPTION   LANGUAGE_NAME

Functions

static SXINT option_get_kind (char *arg)
static charoption_get_text (SXINT kind)
static SXVOID extract_language_name (char *path_name)
static SXVOID tdef_run (char *pathname)
int main (int argc, char *argv[])
charoptions_text (char *line)
SXVOID sxvoid (void)

Variables

char WHAT_TDEFMAIN [] = "@(#)SYNTAX - $Id: tdef_main.c 1579 2008-09-16 11:24:22Z sagot $" WHAT_DEBUG
char by_mess [] = "the SYNTAX \"terminal symbol to #define\" translator TDEF"
FILE * sxstdout
FILE * sxstderr
FILE * sxtty
SXBOOLEAN sxverbosep
struct sxtables tdef_tables
long options_set
SXBOOLEAN is_source
SXBOOLEAN is_c
SXBOOLEAN is_pascal
charprgentname
static char ME [] = "tdef"
static char Usage []
static charoption_tbl []
static SXINT option_kind []

Define Documentation

#define C   ((SXINT)3)

Definition at line 69 of file tdef_main.c.

Referenced by main().

#define LANGUAGE_NAME   ((SXINT)5)

Definition at line 71 of file tdef_main.c.

Referenced by gen_header(), main(), and make_proper_semact().

#define LAST_OPTION   LANGUAGE_NAME

Definition at line 72 of file tdef_main.c.

Referenced by options_text().

#define noOPTION ( opt   )     (~OPTION (opt))

Definition at line 62 of file tdef_main.c.

#define OPT_NB   ((sizeof(option_tbl)/sizeof(*option_tbl))-1)

Definition at line 64 of file tdef_main.c.

#define OPTION ( opt   )     (1l << (opt - 1))

Definition at line 61 of file tdef_main.c.

#define PASCAL   ((SXINT)4)

Definition at line 70 of file tdef_main.c.

Referenced by main().

#define SOURCE   ((SXINT)2)

Definition at line 68 of file tdef_main.c.

Referenced by main().

#define UNKNOWN_ARG   ((SXINT)0)

Definition at line 66 of file tdef_main.c.

#define VERBOSE   ((SXINT)1)

Definition at line 67 of file tdef_main.c.


Function Documentation

static SXVOID extract_language_name ( char path_name  )  [static]

Definition at line 112 of file tdef_main.c.

References char, p, and prgentname.

Referenced by tdef_run().

int main ( int  argc,
char argv[] 
)
static SXINT option_get_kind ( char arg  )  [static]

Definition at line 81 of file tdef_main.c.

References OPT_NB, option_kind, option_tbl, and UNKNOWN_ARG.

Referenced by main().

static char* option_get_text ( SXINT  kind  )  [static]

Definition at line 98 of file tdef_main.c.

References OPT_NB, option_kind, and option_tbl.

Referenced by main(), and options_text().

char* options_text ( char line  ) 

Definition at line 317 of file tdef_main.c.

References LAST_OPTION, OPTION, option_get_text(), options_set, SXBOOLEAN, SXFALSE, and SXTRUE.

SXVOID sxvoid ( void   ) 

Definition at line 339 of file tdef_main.c.

static SXVOID tdef_run ( char pathname  )  [static]

Variable Documentation

char by_mess[] = "the SYNTAX \"terminal symbol to #define\" translator TDEF"

Definition at line 33 of file tdef_main.c.

SXBOOLEAN is_c

Definition at line 45 of file tdef_main.c.

Referenced by main().

SXBOOLEAN is_pascal

Definition at line 45 of file tdef_main.c.

Referenced by main().

SXBOOLEAN is_source

Definition at line 45 of file tdef_main.c.

Referenced by main().

char ME[] = "tdef" [static]

Definition at line 52 of file tdef_main.c.

Referenced by main(), and tdef_run().

SXINT option_kind[] [static]
Initial value:
 {UNKNOWN_ARG, VERBOSE, VERBOSE, -VERBOSE, -VERBOSE, SOURCE, SOURCE, -SOURCE, -SOURCE, C,
     PASCAL, LANGUAGE_NAME, LANGUAGE_NAME,}

Definition at line 76 of file tdef_main.c.

Referenced by option_get_kind(), and option_get_text().

char* option_tbl[] [static]
Initial value:
 {"", "sc", "source", "nsc", "nosource", "v", "verbose", "nv", "noverbose", "c", "pascal"
     , "ln", "language_name",}

Definition at line 74 of file tdef_main.c.

Referenced by option_get_kind(), and option_get_text().

Definition at line 44 of file tdef_main.c.

Referenced by main(), and options_text().

Definition at line 46 of file tdef_main.c.

Referenced by extract_language_name(), main(), and tdef_run().

FILE * sxstderr

Definition at line 39 of file tdef_main.c.

FILE* sxstdout

Definition at line 39 of file tdef_main.c.

FILE * sxtty

Definition at line 39 of file tdef_main.c.

SXBOOLEAN sxverbosep

Definition at line 40 of file tdef_main.c.

Referenced by main(), and tdef_run().

char Usage[] [static]
Initial value:
 "\
Usage:\t%s [options] [files]\n\
options=\t-v, -verbose, -nv, -noverbose,\n\
\t\t-sc, -source, -nsc, -nosource,\n\
\t\t(-c | -pascal),\n\
\t\t-ln name, -language_name name\n\
\tThe \"-ln\" option is mandatory if no file is given.\n"

Definition at line 53 of file tdef_main.c.

Referenced by main().

char WHAT_TDEFMAIN[] = "@(#)SYNTAX - $Id: tdef_main.c 1579 2008-09-16 11:24:22Z sagot $" WHAT_DEBUG

Definition at line 30 of file tdef_main.c.


Generated on Wed Apr 21 16:39:39 2010 for syntax-6.0b7 by  doxygen 1.6.1