|
feisty meow concerns codebase
2.140
|
#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>

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 (char *line, filepointer *filep, inclist *inc) |
| inclist * | newinclude (char *newfile, char *incstring) |
| void | inc_clean () |
| inclist * | inc_path (char *file, char *include, bool dot, bool &failure_okay) |
| void | included_by (inclist *ip, inclist *newfile) |
| char * | base_name (char *file) |
| char * | copy (char *str) |
| filepointer * | getfile (char *file) |
| void | freefile (filepointer *fp) |
| char * | getline (filepointer *filep) |
| int | match (const char *str, 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 (char *line, filepointer *filep, inclist *file_red, inclist *file, int parse_it) |
| symtab * | fdefined (char *symbol, inclist *file, inclist **srcfile) |
| int | find_includes (filepointer *filep, inclist *file, inclist *file_red, int recursion, bool failOK) |
| int | gobble (filepointer *filep, inclist *file, inclist *file_red) |
| symtab * | isdefined (char *symbol, inclist *file, inclist **srcfile) |
| symtab * | slookup (char *symbol, inclist *file) |
| void | undefine (char *symbol, inclist *file) |
| int | zero_value (char *exp, filepointer *filep, inclist *file_red) |
| void | add_include (filepointer *filep, inclist *file, inclist *file_red, char *include, bool dot, bool failOK) |
| void | pr (inclist *ip, char *file, char *base, bool rc_file) |
| void | recursive_pr_include (inclist *head, char *file, char *base) |
| void add_include | ( | filepointer * | filep, |
| inclist * | file, | ||
| inclist * | file_red, | ||
| char * | include, | ||
| bool | dot, | ||
| bool | failOK | ||
| ) |
Definition at line 44 of file pr.cpp.
References filepointer::f_line, fatalerr(), find_includes(), freefile(), getfile(), inclist::i_file, inclist::i_searched, inc_path(), included_by(), show_where_not, warning(), and warning1().
Referenced by find_includes().
| char* base_name | ( | char * | file | ) |
Definition at line 653 of file makedep.cpp.
References copy().
Referenced by configuration::application_configuration::make_logfile_name().
| char* copy | ( | char * | str | ) |
Definition at line 554 of file makedep.cpp.
Referenced by base_name(), octopi::recursive_file_copy::copy_hierarchy(), define2(), cromp::cromp_transaction::flatten(), issymbolic(), and newinclude().
| int cppsetup | ( | char * | line, |
| filepointer * | filep, | ||
| inclist * | inc | ||
| ) |
Definition at line 207 of file cppsetup.cpp.
References IfParser::funcs, and IfParser::handle_error.
Referenced by zero_value().
| void define | ( | char * | def, |
| inclist * | file | ||
| ) |
Definition at line 416 of file parse.cpp.
References define2().
Referenced by find_includes(), and main().
| void define2 | ( | char * | name, |
| char * | val, | ||
| inclist * | file | ||
| ) |
Definition at line 434 of file parse.cpp.
References copy(), fatalerr(), inclist::i_deflen, inclist::i_defs, inclist::i_ndefs, filename_helper::name, symtab::s_name, symtab::s_value, and SYMTABINC.
| int deftype | ( | char * | line, |
| filepointer * | filep, | ||
| inclist * | file_red, | ||
| inclist * | file, | ||
| int | parse_it | ||
| ) |
Definition at line 218 of file parse.cpp.
References debug, DEFINE, directives, EJECT, ELIF, ELIFFALSE, ELIFGUESSFALSE, ELSE, ENDIF, ERROR, filepointer::f_line, inclist::i_file, inclist::i_included_sym, inclist::i_incstring, IDENT, IF, IFDEF, IFFALSE, IFNDEF, IMPORT, INCLUDE, INCLUDEDOT, isdefined(), match(), PRAGMA, symtab::s_name, symtab::s_value, SCCS, UNDEF, and zero_value().
Referenced by find_includes(), and gobble().
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().
| int find_includes | ( | filepointer * | filep, |
| inclist * | file, | ||
| inclist * | file_red, | ||
| int | recursion, | ||
| bool | failOK | ||
| ) |
Definition at line 40 of file parse.cpp.
References add_include(), debug, DEFINE, define(), deftype(), EJECT, ELIF, ELIFFALSE, ELIFGUESSFALSE, ELSE, ENDIF, ERROR, filepointer::f_line, find_includes(), getline(), gobble(), inclist::i_file, IDENT, IF, IFDEF, IFFALSE, IFGUESSFALSE, IFNDEF, IMPORT, INCLUDE, INCLUDEDOT, isdefined(), PRAGMA, SCCS, UNDEF, undefine(), warning(), and warning1().
Referenced by add_include(), and find_includes().
| void freefile | ( | filepointer * | fp | ) |
Definition at line 547 of file makedep.cpp.
References filepointer::f_base, and filepointer::f_name.
Referenced by add_include().
| filepointer* getfile | ( | char * | file | ) |
Definition at line 518 of file makedep.cpp.
References close, filepointer::f_base, filepointer::f_end, filepointer::f_len, filepointer::f_line, filepointer::f_name, filepointer::f_p, fatalerr(), fstat, O_RDONLY, open, read, stat, translate_cygwin(), and warning().
Referenced by add_include().
| char* getline | ( | filepointer * | filep | ) |
no count, since we'll see it again. lineno++;
Definition at line 576 of file makedep.cpp.
References filepointer::f_end, filepointer::f_line, filepointer::f_p, and fatalerr().
Referenced by find_includes(), configuration::application_configuration::get_cmdline_from_proc(), and gobble().
| int gobble | ( | filepointer * | filep, |
| inclist * | file, | ||
| inclist * | file_red | ||
| ) |
Definition at line 165 of file parse.cpp.
References debug, DEFINE, deftype(), directives, EJECT, ELIF, ELIFFALSE, ELIFGUESSFALSE, ELSE, ENDIF, ERROR, filepointer::f_line, getline(), gobble(), inclist::i_file, IDENT, IF, IFDEF, IFFALSE, IFGUESSFALSE, IFNDEF, IMPORT, INCLUDE, INCLUDEDOT, PRAGMA, SCCS, UNDEF, and warning().
Referenced by find_includes(), and gobble().
| void inc_clean | ( | ) |
Definition at line 340 of file include.cpp.
References inclist::i_marked, inc_list, and inclistp.
| inclist* inc_path | ( | char * | file, |
| char * | include, | ||
| bool | dot, | ||
| bool & | failure_okay | ||
| ) |
Definition at line 58 of file include.cpp.
References excludedirs, inclist::i_file, inclist::i_included_sym, inclist::i_incstring, inc_list, includedirs, newinclude(), eml_to_txt::path, remove_dotdot(), show_where_not, stat, and warning1().
Referenced by add_include().
Definition at line 296 of file include.cpp.
References inclist::i_file, inclist::i_included_sym, inclist::i_list, inclist::i_listlen, warn_multiple, warning(), and warning1().
Referenced by add_include().
Definition at line 362 of file parse.cpp.
References debug, fdefined(), inclist::i_file, maininclist, and slookup().
Referenced by deftype(), find_includes(), and undefine().
| int match | ( | const char * | str, |
| const char ** | list | ||
| ) |
Definition at line 562 of file makedep.cpp.
Referenced by deftype(), and org.feistymeow.textual.WordBreakFinder::main().
| inclist* newinclude | ( | char * | newfile, |
| char * | incstring | ||
| ) |
Definition at line 276 of file include.cpp.
References copy(), fatalerr(), inclist::i_file, inclist::i_included_sym, inclist::i_incstring, inc_list, inclistp, and MAXFILES.
Referenced by inc_path().
| void pr | ( | inclist * | ip, |
| char * | file, | ||
| char * | base, | ||
| bool | rc_file | ||
| ) |
Definition at line 98 of file pr.cpp.
References inclist::i_file, inclist::i_incstring, inclist::i_list, inclist::i_listlen, inclist::i_notified, objprefix, objsuffix, printed, verbose, and width.
Referenced by recursive_pr_include().
| void recursive_pr_include | ( | inclist * | head, |
| char * | file, | ||
| char * | base | ||
| ) |
Definition at line 80 of file pr.cpp.
References inclist::i_file, inclist::i_list, inclist::i_listlen, inclist::i_marked, pr(), and recursive_pr_include().
Referenced by recursive_pr_include().
| 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().
Definition at line 510 of file parse.cpp.
References inclist::i_defs, inclist::i_ndefs, and symtab::s_name.
Referenced by fdefined(), and isdefined().
| void undefine | ( | char * | symbol, |
| inclist * | file | ||
| ) |
Definition at line 548 of file parse.cpp.
References inclist::i_defs, inclist::i_ndefs, and isdefined().
Referenced by find_includes().
| int zero_value | ( | char * | exp, |
| filepointer * | filep, | ||
| inclist * | file_red | ||
| ) |