ifdef.c File Reference

#include <sys/types.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>

Include dependency graph for ifdef.c:

Go to the source code of this file.

Data Structures

struct  DEFINE

Defines

#define DEF   1
#define UNDEF   2
#define IGN   3
#define MUTABLE   1
#define IMMUTABLE   2
#define NO   0
#define YES   1
#define Define(x, y)   defit(x,y,DEF)
#define Undefine(x, y)   defit(x,y,UNDEF)
#define Ignore(x, y)   defit(x,y,IGN)
#define Goto   { line++; if (ch!='\n') gotoeoln(); }
#define Print   { line++; if (ch!='\n') prteoln(); }

Functions

 _PROTOTYPE (int main,(int argc, char **argv))
 _PROTOTYPE (char fgetarg,(FILE *stream, char *cbuf))
 _PROTOTYPE (int find,(char *symd))
 _PROTOTYPE (void defit,(char *sym, int redef, int typed))
 _PROTOTYPE (void stop,(void))
 _PROTOTYPE (char getendif,(void))
char fgetarg (FILE *stream, char *cbuf)
int find (char *sym)
void defit (char *sym, char redef, char type)
void stop ()
void gotoeoln ()
void prteoln ()
void printtable ()
char getendif ()
void gettable ()
void parse ()
void usage ()
int main (int argc, argv)

Variables

FILEzin
DEFINEdefptr
DEFINEdefend
DEFINEdeftemp
int line = 1
int table = 0
int optind
char * optarg


Define Documentation

#define DEF   1
 

Definition at line 24 of file ifdef.c.

Referenced by gettable(), parse(), and printtable().

#define Define x,
y   )     defit(x,y,DEF)
 

Definition at line 117 of file ifdef.c.

#define Goto   { line++; if (ch!='\n') gotoeoln(); }
 

Definition at line 181 of file ifdef.c.

Referenced by Block_Pointers(), Block_Type(), Draw_Block(), Draw_Info(), Draw_Map(), Draw_Offset(), Draw_Pointers(), Draw_Prompt(), Draw_Strings(), Draw_Words(), Draw_Zone_Numbers(), Erase_Prompt(), gettable(), Map_Pointers(), parse(), Warning(), and Word_Pointers().

#define IGN   3
 

Definition at line 26 of file ifdef.c.

#define Ignore x,
y   )     defit(x,y,IGN)
 

Definition at line 119 of file ifdef.c.

Referenced by main().

#define IMMUTABLE   2
 

Definition at line 30 of file ifdef.c.

Referenced by defit(), and main().

#define MUTABLE   1
 

Definition at line 29 of file ifdef.c.

Referenced by gettable(), main(), and parse().

#define NO   0
 

Definition at line 33 of file ifdef.c.

Referenced by slave().

#define Print   { line++; if (ch!='\n') prteoln(); }
 

Definition at line 182 of file ifdef.c.

#define UNDEF   2
 

Definition at line 25 of file ifdef.c.

#define Undefine x,
y   )     defit(x,y,UNDEF)
 

Definition at line 118 of file ifdef.c.

Referenced by gettable(), main(), and parse().

#define YES   1
 

Definition at line 34 of file ifdef.c.

Referenced by ask(), and slave().


Function Documentation

_PROTOTYPE char  getendif,
(void) 
 

_PROTOTYPE void  stop,
(void) 
 

_PROTOTYPE void  defit,
(char *sym, int redef, int typed) 
 

_PROTOTYPE int  find,
(char *symd) 
 

_PROTOTYPE char  fgetarg,
(FILE *stream, char *cbuf
 

_PROTOTYPE int  main,
(int argc, char **argv) 
 

void defit char *  sym,
char  redef,
char  type
 

Definition at line 124 of file ifdef.c.

References c, defend, defptr, deftemp, exit(), find(), fprintf(), IMMUTABLE, malloc(), DEFINE::next, NULL, DEFINE::redef, stderr, strcpy(), strlen(), DEFINE::symbol, and DEFINE::type.

char fgetarg FILE stream,
char *  cbuf
 

Definition at line 72 of file ifdef.c.

References EOF, feof, fgetc(), and i.

Referenced by getendif(), gettable(), and parse().

int find char *  sym  ) 
 

Definition at line 101 of file ifdef.c.

References defptr, deftemp, DEFINE::next, strcmp, DEFINE::symbol, and DEFINE::type.

char getendif  ) 
 

Definition at line 240 of file ifdef.c.

References EOF, fgetarg(), fgetc(), Print, printf, putchar, skip, stop(), strcmp, and zin.

Referenced by parse().

void gettable  ) 
 

Definition at line 274 of file ifdef.c.

References DEF, Define, EOF, fgetarg(), fgetc(), find(), Goto, MUTABLE, stop(), strcmp, Undefine, and zin.

Referenced by getfile(), and main().

void gotoeoln  ) 
 

Definition at line 187 of file ifdef.c.

References EOF, fgetc(), stop(), and zin.

int main int  argc,
argv 
 

Definition at line 451 of file ifdef.c.

References c, Define, EOF, exit(), fclose(), fopen(), getopt(), gettable(), Ignore, IMMUTABLE, MUTABLE, NULL, optarg, parse(), perror(), stdin, strcpy(), Undefine, usage, and zin.

void parse  ) 
 

Definition at line 319 of file ifdef.c.

References DEF, Define, EOF, fgetarg(), fgetc(), find(), getendif(), Goto, IGN, MUTABLE, Print, printf, putchar, skip, stop(), strcmp, Undefine, and zin.

Referenced by main(), and read_config().

void printtable  ) 
 

Definition at line 215 of file ifdef.c.

References DEF, defptr, DEFINE::next, printf, DEFINE::symbol, DEFINE::type, and UNDEF.

Referenced by stop().

void prteoln  ) 
 

Definition at line 199 of file ifdef.c.

References EOF, fgetc(), putchar, stop(), and zin.

void stop  ) 
 

Definition at line 173 of file ifdef.c.

References exit(), fclose(), printtable(), and zin.

Referenced by asc_ul(), asc_uqd(), delete(), doargs(), getendif(), gettable(), gotoeoln(), l_strncpy(), matcher(), parse(), prteoln(), and tar_chksm().

void usage void   ) 
 

Definition at line 440 of file ifdef.c.

References exit(), fprintf(), and stderr.


Variable Documentation

struct DEFINE* defend
 

Definition at line 47 of file ifdef.c.

Referenced by defit().

struct DEFINE* defptr
 

Definition at line 46 of file ifdef.c.

Referenced by defit(), find(), and printtable().

struct DEFINE* deftemp
 

Definition at line 48 of file ifdef.c.

Referenced by defit(), and find().

int line = 1
 

Definition at line 49 of file ifdef.c.

char* optarg
 

Definition at line 59 of file options.c.

int optind
 

Definition at line 29 of file getopt.c.

int table = 0
 

Definition at line 50 of file ifdef.c.

FILE* zin
 

Definition at line 45 of file ifdef.c.

Referenced by getendif(), gettable(), gotoeoln(), main(), parse(), prteoln(), and stop().


Generated on Fri Apr 14 23:06:43 2006 for minix by  doxygen 1.4.6