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 */
|
/* cpp2.c */
|
||||||
int control( int counter );
|
int control( int counter );
|
||||||
void doinclude( void );
|
|
||||||
void dodefine( void );
|
void dodefine( void );
|
||||||
void doif( int hash );
|
|
||||||
int openinclude( char*, int );
|
|
||||||
int hasdirectory( char*, char*, int );
|
|
||||||
int openfile( char* );
|
int openfile( char* );
|
||||||
|
|
||||||
/* cpp3.c */
|
/* cpp3.c */
|
||||||
@@ -296,8 +292,6 @@ int readoptions( char* filename, char*** pfargv );
|
|||||||
|
|
||||||
/* cpp4.c */
|
/* cpp4.c */
|
||||||
void checkparm( int c, DEFBUF* dp );
|
void checkparm( int c, DEFBUF* dp );
|
||||||
int expcollect( void );
|
|
||||||
void expstuff( DEFBUF* dp );
|
|
||||||
|
|
||||||
void stparmscan( int delim );
|
void stparmscan( int delim );
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
#if OSL_DEBUG_LEVEL > 1
|
||||||
@@ -311,12 +305,6 @@ void expand( DEFBUF* tokenp );
|
|||||||
|
|
||||||
/* cpp5.c */
|
/* cpp5.c */
|
||||||
int eval( void );
|
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 */
|
/* cpp6.c */
|
||||||
|
|
||||||
|
@@ -22,6 +22,11 @@
|
|||||||
#include "cppdef.h"
|
#include "cppdef.h"
|
||||||
#include "cpp.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
|
* Generate (by hand-inspection) a set of unique values for each control
|
||||||
* operator. Note that this is not guaranteed to work for non-Ascii
|
* 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
|
* is always suppressed, so we don't need to evaluate anything. This
|
||||||
* suppresses unnecessary warnings.
|
* suppresses unnecessary warnings.
|
||||||
*/
|
*/
|
||||||
void doif(int hash)
|
static void doif(int hash)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
int found;
|
int found;
|
||||||
@@ -358,7 +363,7 @@ void doif(int hash)
|
|||||||
* Note: the November 12 draft forbids '>' in the #include <file> format.
|
* Note: the November 12 draft forbids '>' in the #include <file> format.
|
||||||
* This restriction is unnecessary and not implemented.
|
* This restriction is unnecessary and not implemented.
|
||||||
*/
|
*/
|
||||||
void doinclude()
|
static void doinclude()
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
int delim;
|
int delim;
|
||||||
@@ -406,7 +411,7 @@ void doinclude()
|
|||||||
* active files. Returns TRUE if the file was opened, FALSE
|
* active files. Returns TRUE if the file was opened, FALSE
|
||||||
* if openinclude() fails. No error message is printed.
|
* if openinclude() fails. No error message is printed.
|
||||||
*/
|
*/
|
||||||
int openinclude(char* filename, int searchlocal)
|
static int openinclude(char* filename, int searchlocal)
|
||||||
{
|
{
|
||||||
char** incptr;
|
char** incptr;
|
||||||
char tmpname[NFWORK]; /* Filename work area */
|
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
|
* node/device/directory part of the string is copied to result and
|
||||||
* hasdirectory returns TRUE. Else, nothing is copied and it returns FALSE.
|
* 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
|
#if HOST == SYS_UNIX
|
||||||
char* tp;
|
char* tp;
|
||||||
|
@@ -369,7 +369,7 @@ int readoptions(char* filename, char*** pfargv)
|
|||||||
* This routine forces the -D and -U arguments to uppercase.
|
* This routine forces the -D and -U arguments to uppercase.
|
||||||
* It is called only on cpp startup by dooptions().
|
* It is called only on cpp startup by dooptions().
|
||||||
*/
|
*/
|
||||||
void zap_uc(char* ap)
|
static void zap_uc(char* ap)
|
||||||
{
|
{
|
||||||
while (*ap != EOS)
|
while (*ap != EOS)
|
||||||
{
|
{
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "cppdef.h"
|
#include "cppdef.h"
|
||||||
#include "cpp.h"
|
#include "cpp.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* parm[], parmp, and parlist[] are used to store #define() argument
|
* parm[], parmp, and parlist[] are used to store #define() argument
|
||||||
* lists. nargs contains the actual number of parameters stored.
|
* 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 char* parlist[LASTPARM]; /* -> start of each parameter */
|
||||||
static int nargs; /* Parameters for this macro */
|
static int nargs; /* Parameters for this macro */
|
||||||
|
|
||||||
|
static int expcollect( void );
|
||||||
|
static void expstuff( DEFBUF* dp );
|
||||||
|
|
||||||
void InitCpp4()
|
void InitCpp4()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -465,7 +469,7 @@ void expand(DEFBUF* tokenp)
|
|||||||
/*
|
/*
|
||||||
* Collect the actual parameters for this macro. TRUE if ok.
|
* Collect the actual parameters for this macro. TRUE if ok.
|
||||||
*/
|
*/
|
||||||
int expcollect()
|
static int expcollect()
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
int paren; /* For embedded ()'s */
|
int paren; /* For embedded ()'s */
|
||||||
@@ -533,7 +537,7 @@ int expcollect()
|
|||||||
/*
|
/*
|
||||||
* Stuff the macro body, replacing formal parameters by actual parameters.
|
* Stuff the macro body, replacing formal parameters by actual parameters.
|
||||||
*/
|
*/
|
||||||
void expstuff(DEFBUF* tokenp)
|
static void expstuff(DEFBUF* tokenp)
|
||||||
{
|
{
|
||||||
int c; /* Current character */
|
int c; /* Current character */
|
||||||
char* inp; /* -> repl string */
|
char* inp; /* -> repl string */
|
||||||
|
@@ -22,6 +22,13 @@
|
|||||||
#include "cppdef.h"
|
#include "cppdef.h"
|
||||||
#include "cpp.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.
|
* Evaluate an #if expression.
|
||||||
*/
|
*/
|
||||||
@@ -370,7 +377,7 @@ again:
|
|||||||
* evalchar called to evaluate 'x'
|
* evalchar called to evaluate 'x'
|
||||||
* evalnum called to evaluate numbers.
|
* evalnum called to evaluate numbers.
|
||||||
*/
|
*/
|
||||||
int evallex(int skip)
|
static int evallex(int skip)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
int c1;
|
int c1;
|
||||||
@@ -505,7 +512,7 @@ again:
|
|||||||
* DIG success
|
* DIG success
|
||||||
* OP_FAIL bad parse or something.
|
* OP_FAIL bad parse or something.
|
||||||
*/
|
*/
|
||||||
int dosizeof()
|
static int dosizeof(void)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
TYPES* tp;
|
TYPES* tp;
|
||||||
@@ -621,7 +628,7 @@ int dosizeof()
|
|||||||
/*
|
/*
|
||||||
* TRUE if value is zero or exactly one bit is set in value.
|
* 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...
|
/* whoaa!! really worried about non 2's complement machines...
|
||||||
* but not at all about cross-compiling ?
|
* but not at all about cross-compiling ?
|
||||||
@@ -640,7 +647,7 @@ int bittest(int value)
|
|||||||
* Expand number for #if lexical analysis. Note: evalnum recognizes
|
* Expand number for #if lexical analysis. Note: evalnum recognizes
|
||||||
* the unsigned suffix, but only returns a signed int value.
|
* the unsigned suffix, but only returns a signed int value.
|
||||||
*/
|
*/
|
||||||
int evalnum(int c)
|
static int evalnum(int c)
|
||||||
{
|
{
|
||||||
int value;
|
int value;
|
||||||
int base;
|
int base;
|
||||||
@@ -679,7 +686,7 @@ int evalnum(int c)
|
|||||||
/*
|
/*
|
||||||
* Get a character constant
|
* Get a character constant
|
||||||
*/
|
*/
|
||||||
int evalchar(int skip)
|
static int evalchar(int skip)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
int value;
|
int value;
|
||||||
@@ -785,7 +792,7 @@ int evalchar(int skip)
|
|||||||
*
|
*
|
||||||
* evaleval() returns the new pointer to the top of the value stack.
|
* 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 v1;
|
||||||
int v2 = 0;
|
int v2 = 0;
|
||||||
|
Reference in New Issue
Block a user