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
This commit is contained in:
@@ -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 */
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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 */
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user