feisty meow concerns codebase  2.140
def.h File Reference
#include <stdio.h>
#include "Xosdefs.h"
#include "Xfuncproto.h"
#include <ctype.h>
#include <sys/types.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <stdlib.h>
Include dependency graph for def.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  symtab
 
struct  inclist
 
struct  filepointer
 

Macros

#define _POSIX_SOURCE
 
#define MAXDEFINES   512
 
#define MAXFILES   4000
 
#define MAXDIRS   640
 
#define SYMTABINC   10 /* must be > 1 for define() to work right */
 
#define IF   0
 
#define IFDEF   1
 
#define IFNDEF   2
 
#define ELSE   3
 
#define ENDIF   4
 
#define DEFINE   5
 
#define UNDEF   6
 
#define INCLUDE   7
 
#define LINE   8
 
#define PRAGMA   9
 
#define ERROR   10
 
#define IDENT   11
 
#define SCCS   12
 
#define ELIF   13
 
#define EJECT   14
 
#define IMPORT   15
 
#define IFFALSE   16 /* pseudo value --- never matched */
 
#define ELIFFALSE   17 /* pseudo value --- never matched */
 
#define INCLUDEDOT   18 /* pseudo value --- never matched */
 
#define IFGUESSFALSE   19 /* pseudo value --- never matched */
 
#define ELIFGUESSFALSE   20 /* pseudo value --- never matched */
 
#define debug(level, arg)   {}
 define DEBUG More...
 

Functions

int cppsetup (register char *line, register filepointer *filep, register inclist *inc)
 
inclistnewinclude (register char *newfile, register char *incstring)
 
void inc_clean ()
 
inclistinc_path (register char *file, register char *include, bool dot, bool &failure_okay)
 
void included_by (register inclist *ip, register inclist *newfile)
 
char * base_name (register char *file)
 
char * copy (register char *str)
 
filepointergetfile (char *file)
 
void freefile (filepointer *fp)
 
char * getline (register filepointer *filep)
 
int match (register const char *str, register const char **list)
 
void redirect (char *line, char *makefile)
 
void define (char *def, inclist *file)
 
void define2 (char *name, char *val, inclist *file)
 
int deftype (register char *line, register filepointer *filep, register inclist *file_red, register inclist *file, int parse_it)
 
symtabfdefined (register char *symbol, inclist *file, inclist **srcfile)
 
int find_includes (filepointer *filep, inclist *file, inclist *file_red, int recursion, bool failOK)
 
int gobble (register filepointer *filep, inclist *file, inclist *file_red)
 
symtabisdefined (register char *symbol, inclist *file, inclist **srcfile)
 
symtabslookup (register char *symbol, register inclist *file)
 
void undefine (char *symbol, register inclist *file)
 
int zero_value (register char *exp, register filepointer *filep, register inclist *file_red)
 
void add_include (filepointer *filep, inclist *file, inclist *file_red, char *include, bool dot, bool failOK)
 
void pr (register inclist *ip, char *file, char *base, bool rc_file)
 
void recursive_pr_include (register inclist *head, register char *file, register char *base)
 

Macro Definition Documentation

◆ _POSIX_SOURCE

#define _POSIX_SOURCE

Definition at line 41 of file def.h.

◆ debug

#define debug (   level,
  arg 
)    {}

define DEBUG

Definition at line 93 of file def.h.

◆ DEFINE

#define DEFINE   5

Definition at line 59 of file def.h.

◆ EJECT

#define EJECT   14

Definition at line 68 of file def.h.

◆ ELIF

#define ELIF   13

Definition at line 67 of file def.h.

◆ ELIFFALSE

#define ELIFFALSE   17 /* pseudo value --- never matched */

Definition at line 72 of file def.h.

◆ ELIFGUESSFALSE

#define ELIFGUESSFALSE   20 /* pseudo value --- never matched */

Definition at line 75 of file def.h.

◆ ELSE

#define ELSE   3

Definition at line 57 of file def.h.

◆ ENDIF

#define ENDIF   4

Definition at line 58 of file def.h.

◆ ERROR

#define ERROR   10

Definition at line 64 of file def.h.

◆ IDENT

#define IDENT   11

Definition at line 65 of file def.h.

◆ IF

#define IF   0

Definition at line 54 of file def.h.

◆ IFDEF

#define IFDEF   1

Definition at line 55 of file def.h.

◆ IFFALSE

#define IFFALSE   16 /* pseudo value --- never matched */

Definition at line 71 of file def.h.

◆ IFGUESSFALSE

#define IFGUESSFALSE   19 /* pseudo value --- never matched */

Definition at line 74 of file def.h.

◆ IFNDEF

#define IFNDEF   2

Definition at line 56 of file def.h.

◆ IMPORT

#define IMPORT   15

Definition at line 69 of file def.h.

◆ INCLUDE

#define INCLUDE   7

Definition at line 61 of file def.h.

◆ INCLUDEDOT

#define INCLUDEDOT   18 /* pseudo value --- never matched */

Definition at line 73 of file def.h.

◆ LINE

#define LINE   8

Definition at line 62 of file def.h.

◆ MAXDEFINES

#define MAXDEFINES   512

Definition at line 48 of file def.h.

◆ MAXDIRS

#define MAXDIRS   640

Definition at line 50 of file def.h.

◆ MAXFILES

#define MAXFILES   4000

Definition at line 49 of file def.h.

◆ PRAGMA

#define PRAGMA   9

Definition at line 63 of file def.h.

◆ SCCS

#define SCCS   12

Definition at line 66 of file def.h.

◆ SYMTABINC

#define SYMTABINC   10 /* must be > 1 for define() to work right */

Definition at line 51 of file def.h.

◆ UNDEF

#define UNDEF   6

Definition at line 60 of file def.h.

Function Documentation

◆ add_include()

void add_include ( filepointer filep,
inclist file,
inclist file_red,
char *  include,
bool  dot,
bool  failOK 
)

◆ base_name()

char* base_name ( register char *  file)

Definition at line 653 of file makedep.cpp.

References copy().

Referenced by configuration::application_configuration::make_logfile_name().

◆ copy()

char* copy ( register char *  str)

◆ cppsetup()

int cppsetup ( register char *  line,
register filepointer filep,
register inclist inc 
)

◆ define()

void define ( char *  def,
inclist file 
)

Definition at line 416 of file parse.cpp.

References define2().

Referenced by find_includes(), and main().

◆ define2()

void define2 ( char *  name,
char *  val,
inclist file 
)

◆ deftype()

int deftype ( register char *  line,
register filepointer filep,
register inclist file_red,
register inclist file,
int  parse_it 
)

◆ fdefined()

symtab* fdefined ( register char *  symbol,
inclist file,
inclist **  srcfile 
)

Definition at line 378 of file parse.cpp.

References debug, fdefined(), inclist::i_defchecked, inclist::i_file, inclist::i_list, symtab::s_value, and slookup().

Referenced by fdefined(), and isdefined().

◆ find_includes()

int find_includes ( filepointer filep,
inclist file,
inclist file_red,
int  recursion,
bool  failOK 
)

◆ freefile()

void freefile ( filepointer fp)

Definition at line 547 of file makedep.cpp.

References filepointer::f_base, and filepointer::f_name.

Referenced by add_include().

◆ getfile()

◆ getline()

◆ gobble()

int gobble ( register filepointer filep,
inclist file,
inclist file_red 
)

◆ inc_clean()

void inc_clean ( )

Definition at line 340 of file include.cpp.

References inclist::i_marked, inc_list, and inclistp.

◆ inc_path()

inclist* inc_path ( register char *  file,
register char *  include,
bool  dot,
bool &  failure_okay 
)

◆ included_by()

void included_by ( register inclist ip,
register inclist newfile 
)

◆ isdefined()

symtab* isdefined ( register char *  symbol,
inclist file,
inclist **  srcfile 
)

Definition at line 362 of file parse.cpp.

References debug, fdefined(), inclist::i_file, maininclist, and slookup().

Referenced by deftype(), find_includes(), and undefine().

◆ match()

int match ( register const char *  str,
register const char **  list 
)

Definition at line 562 of file makedep.cpp.

Referenced by deftype(), and org.feistymeow.textual.WordBreakFinder::main().

◆ newinclude()

inclist* newinclude ( register char *  newfile,
register char *  incstring 
)

◆ pr()

void pr ( register inclist ip,
char *  file,
char *  base,
bool  rc_file 
)

◆ recursive_pr_include()

void recursive_pr_include ( register inclist head,
register char *  file,
register char *  base 
)

◆ redirect()

void redirect ( char *  line,
char *  makefile 
)

Definition at line 678 of file makedep.cpp.

References append, chmod, fatalerr(), fileno, stat, translate_cygwin(), unlink, verbose, and warning().

Referenced by main().

◆ slookup()

symtab* slookup ( register char *  symbol,
register inclist file 
)

Definition at line 510 of file parse.cpp.

References inclist::i_defs, inclist::i_ndefs, and symtab::s_name.

Referenced by fdefined(), and isdefined().

◆ undefine()

void undefine ( char *  symbol,
register inclist file 
)

Definition at line 548 of file parse.cpp.

References inclist::i_defs, inclist::i_ndefs, and isdefined().

Referenced by find_includes().

◆ zero_value()

int zero_value ( register char *  exp,
register filepointer filep,
register inclist file_red 
)