diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-05-01 10:47:04 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-12-20 14:19:15 +0100 |
commit | 716f8f39b0a58b7867f3ee76eb5cb934a1db96b8 (patch) | |
tree | 0fabe364ad6c9de4d46fb0f66f31062122765b01 /rsc/source | |
parent | 8a71eacef77c5b45df0078b92893e69b1140bac2 (diff) |
rscpp: make previous FILE_LOCAL functions static
This just move the declaration from the shared header to the
corresponding cpp files to make them static.
Change-Id: I4aed6e23a90d42114d815205db2b741080739ac1
Diffstat (limited to 'rsc/source')
-rw-r--r-- | rsc/source/rscpp/cpp.h | 12 | ||||
-rw-r--r-- | rsc/source/rscpp/cpp2.c | 13 | ||||
-rw-r--r-- | rsc/source/rscpp/cpp3.c | 2 | ||||
-rw-r--r-- | rsc/source/rscpp/cpp4.c | 8 | ||||
-rw-r--r-- | rsc/source/rscpp/cpp5.c | 19 |
5 files changed, 29 insertions, 25 deletions
diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h index 0114c2914c01..98ba2072abe3 100644 --- a/rsc/source/rscpp/cpp.h +++ b/rsc/source/rscpp/cpp.h @@ -278,11 +278,7 @@ int outputEval( int c ); /* cpp2.c */ int control( int counter ); -void doinclude( void ); void dodefine( void ); -void doif( int hash ); -int openinclude( char*, int ); -int hasdirectory( char*, char*, int ); int openfile( char* ); /* cpp3.c */ @@ -296,8 +292,6 @@ int readoptions( char* filename, char*** pfargv ); /* cpp4.c */ void checkparm( int c, DEFBUF* dp ); -int expcollect( void ); -void expstuff( DEFBUF* dp ); void stparmscan( int delim ); #if OSL_DEBUG_LEVEL > 1 @@ -311,12 +305,6 @@ void expand( DEFBUF* tokenp ); /* cpp5.c */ int eval( void ); -int evallex( int ); -int *evaleval( int*, int, int ); -int evalchar( int ); -int dosizeof( void ); -int evalnum( int c ); -int bittest( int ); /* cpp6.c */ diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c index 833e687cd186..c181bef1c285 100644 --- a/rsc/source/rscpp/cpp2.c +++ b/rsc/source/rscpp/cpp2.c @@ -22,6 +22,11 @@ #include "cppdef.h" #include "cpp.h" +static void doinclude( void ); +static void doif( int hash ); +static int openinclude( char*, int ); +static int hasdirectory( char*, char*, int ); + /* * Generate (by hand-inspection) a set of unique values for each control * operator. Note that this is not guaranteed to work for non-Ascii @@ -305,7 +310,7 @@ int control(int counter) * is always suppressed, so we don't need to evaluate anything. This * suppresses unnecessary warnings. */ -void doif(int hash) +static void doif(int hash) { int c; int found; @@ -358,7 +363,7 @@ void doif(int hash) * Note: the November 12 draft forbids '>' in the #include <file> format. * This restriction is unnecessary and not implemented. */ -void doinclude() +static void doinclude() { int c; int delim; @@ -406,7 +411,7 @@ void doinclude() * active files. Returns TRUE if the file was opened, FALSE * if openinclude() fails. No error message is printed. */ -int openinclude(char* filename, int searchlocal) +static int openinclude(char* filename, int searchlocal) { char** incptr; char tmpname[NFWORK]; /* Filename work area */ @@ -500,7 +505,7 @@ int openinclude(char* filename, int searchlocal) * node/device/directory part of the string is copied to result and * hasdirectory returns TRUE. Else, nothing is copied and it returns FALSE. */ -int hasdirectory(char* source, char* result, int max) +static int hasdirectory(char* source, char* result, int max) { #if HOST == SYS_UNIX char* tp; diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index 71c40fe3a7dd..a24812e280de 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -369,7 +369,7 @@ int readoptions(char* filename, char*** pfargv) * This routine forces the -D and -U arguments to uppercase. * It is called only on cpp startup by dooptions(). */ -void zap_uc(char* ap) +static void zap_uc(char* ap) { while (*ap != EOS) { diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c index 6071076bce5a..d8e03453175c 100644 --- a/rsc/source/rscpp/cpp4.c +++ b/rsc/source/rscpp/cpp4.c @@ -22,6 +22,7 @@ #include <ctype.h> #include "cppdef.h" #include "cpp.h" + /* * parm[], parmp, and parlist[] are used to store #define() argument * lists. nargs contains the actual number of parameters stored. @@ -31,6 +32,9 @@ static char* parmp; /* Free space in parm */ static char* parlist[LASTPARM]; /* -> start of each parameter */ static int nargs; /* Parameters for this macro */ +static int expcollect( void ); +static void expstuff( DEFBUF* dp ); + void InitCpp4() { int i; @@ -465,7 +469,7 @@ void expand(DEFBUF* tokenp) /* * Collect the actual parameters for this macro. TRUE if ok. */ -int expcollect() +static int expcollect() { int c; int paren; /* For embedded ()'s */ @@ -533,7 +537,7 @@ int expcollect() /* * Stuff the macro body, replacing formal parameters by actual parameters. */ -void expstuff(DEFBUF* tokenp) +static void expstuff(DEFBUF* tokenp) { int c; /* Current character */ char* inp; /* -> repl string */ diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c index 950830fce4a6..b938fccacffc 100644 --- a/rsc/source/rscpp/cpp5.c +++ b/rsc/source/rscpp/cpp5.c @@ -22,6 +22,13 @@ #include "cppdef.h" #include "cpp.h" +static int evallex(int skip); +static int dosizeof(void); +static int bittest(int value); +static int evalnum(int c); +static int evalchar(int skip); +static int *evaleval(int* valp, int op, int skip); + /* * Evaluate an #if expression. */ @@ -370,7 +377,7 @@ again: * evalchar called to evaluate 'x' * evalnum called to evaluate numbers. */ -int evallex(int skip) +static int evallex(int skip) { int c; int c1; @@ -505,7 +512,7 @@ again: * DIG success * OP_FAIL bad parse or something. */ -int dosizeof() +static int dosizeof(void) { int c; TYPES* tp; @@ -621,7 +628,7 @@ int dosizeof() /* * TRUE if value is zero or exactly one bit is set in value. */ -int bittest(int value) +static int bittest(int value) { /* whoaa!! really worried about non 2's complement machines... * but not at all about cross-compiling ? @@ -640,7 +647,7 @@ int bittest(int value) * Expand number for #if lexical analysis. Note: evalnum recognizes * the unsigned suffix, but only returns a signed int value. */ -int evalnum(int c) +static int evalnum(int c) { int value; int base; @@ -679,7 +686,7 @@ int evalnum(int c) /* * Get a character constant */ -int evalchar(int skip) +static int evalchar(int skip) { int c; int value; @@ -785,7 +792,7 @@ int evalchar(int skip) * * evaleval() returns the new pointer to the top of the value stack. */ -int * evaleval(int* valp, int op, int skip) +static int * evaleval(int* valp, int op, int skip) { int v1; int v2 = 0; |