diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-04-10 17:04:57 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-04-10 17:04:57 +0000 |
commit | bdd7f1a32fe59ea3930d825f43c02795edb5c816 (patch) | |
tree | a0d8f658e6599d794d6f06c5d1bebc9141bdc41e /soltools/mkdepend | |
parent | 92c6776a9ec8480c444d9566408040b697804f11 (diff) |
INTEGRATION: CWS changefileheader (1.3.142); FILE MERGED
2008/04/01 09:43:43 thb 1.3.142.1: #i73081# Improve mkdepends runtime complexity by using better data structures (fix from kendy, merged from incguards01)
Diffstat (limited to 'soltools/mkdepend')
-rw-r--r-- | soltools/mkdepend/cppsetup.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/soltools/mkdepend/cppsetup.c b/soltools/mkdepend/cppsetup.c index 12a2971d23a3..b75a2ed5b26e 100644 --- a/soltools/mkdepend/cppsetup.c +++ b/soltools/mkdepend/cppsetup.c @@ -95,20 +95,6 @@ cppsetup(line, filep, inc) return(value); } -struct symtab *lookup(symbol) - char *symbol; -{ - static struct symtab undefined; - struct symtab *sp; - - sp = isdefined(symbol, currentinc, NULL); - if (sp == NULL) { - sp = &undefined; - sp->s_value = NULL; - } - return (sp); -} - pperror(tag, x0,x1,x2,x3,x4) int tag,x0,x1,x2,x3,x4; { @@ -163,7 +149,7 @@ _my_if_errors (ip, cp, expecting) #define MAXNAMELEN 256 -static struct symtab * +char * _lookup_variable (ip, var, len) IfParser *ip; const char *var; @@ -177,7 +163,7 @@ _lookup_variable (ip, var, len) strncpy (tmpbuf, var, len); tmpbuf[len] = '\0'; - return isdefined (tmpbuf, pd->inc, NULL); + return isdefined(tmpbuf); } @@ -201,13 +187,13 @@ _my_eval_variable (ip, var, len) const char *var; int len; { - struct symtab *s; + char *s; s = _lookup_variable (ip, var, len); if (!s) return 0; do { - var = s->s_value; + var = s; if (!isvarfirstletter(*var)) break; s = _lookup_variable (ip, var, strlen(var)); @@ -217,7 +203,7 @@ _my_eval_variable (ip, var, len) } -cppsetup(line, filep, inc) +int cppsetup(line, filep, inc) register char *line; register struct filepointer *filep; register struct inclist *inc; |