Update of /cvsroot/plib/plib/src/psl
In directory usw-pr-cvs1:/tmp/cvs-serv8193
Modified Files:
pslCodeGen.cxx pslCompiler.cxx pslExpression.cxx pslLocal.h
pslToken.cxx
Log Message:
Removed some global namespace pollution from PSL
Index: pslCodeGen.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/psl/pslCodeGen.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pslCodeGen.cxx 5 Sep 2002 23:23:59 -0000 1.6
+++ pslCodeGen.cxx 5 Sep 2002 23:33:19 -0000 1.7
@@ -46,7 +46,7 @@
int PSL_Parser::parse ( FILE *fd )
{
- setDefaultFile ( fd ) ;
+ PSL_SetDefaultFile ( fd ) ;
pushProgram () ;
return TRUE ;
}
Index: pslCompiler.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/psl/pslCompiler.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pslCompiler.cxx 5 Sep 2002 23:23:59 -0000 1.4
+++ pslCompiler.cxx 5 Sep 2002 23:33:19 -0000 1.5
@@ -29,16 +29,16 @@
{
char c [ MAX_TOKEN ] ;
- getToken ( c ) ;
+ PSL_GetToken ( c ) ;
if ( c [ 0 ] == ';' ) /* Return without data == "return 0" */
{
- ungetToken ( c ) ;
+ PSL_UngetToken ( c ) ;
pushConstant ( "0.0" ) ;
[...219 lines suppressed...]
if ( c[0] != ')' )
{
@@ -412,7 +412,7 @@
return FALSE ;
}
- getToken ( c ) ;
+ PSL_GetToken ( c ) ;
if ( c [ 0 ] != '{' )
ulSetError ( UL_WARNING,
@@ -422,7 +422,7 @@
ulSetError ( UL_WARNING,
"PSL: Missing '}' in function '%s'", fn ) ;
- getToken ( c ) ;
+ PSL_GetToken ( c ) ;
/* If we fall off the end of the function, we still need a return value */
Index: pslExpression.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/psl/pslExpression.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pslExpression.cxx 5 Sep 2002 22:22:38 -0000 1.3
+++ pslExpression.cxx 5 Sep 2002 23:33:19 -0000 1.4
@@ -28,23 +28,23 @@
int PSL_Parser::pushPrimitive ()
{
char c [ MAX_TOKEN ] ;
- getToken ( c ) ;
+ PSL_GetToken ( c ) ;
if ( c [ 0 ] == '(' )
{
if ( ! pushExpression () )
{
ulSetError ( UL_WARNING, "PSL: Missing expression after '('" ) ;
[...100 lines suppressed...]
- getToken ( c2 ) ;
+ PSL_GetToken ( c2 ) ;
if ( c2 [ 0 ] == '=' )
{
@@ -192,11 +192,11 @@
c[2] = '\0' ;
}
else
- ungetToken ( c2 ) ;
+ PSL_UngetToken ( c2 ) ;
if (( c [ 0 ] == '!' || c [ 0 ] == '=' ) && c [ 1 ] != '=' )
{
- ungetToken ( c2 ) ;
+ PSL_UngetToken ( c2 ) ;
return TRUE ;
}
Index: pslLocal.h
===================================================================
RCS file: /cvsroot/plib/plib/src/psl/pslLocal.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- pslLocal.h 5 Sep 2002 23:23:59 -0000 1.6
+++ pslLocal.h 5 Sep 2002 23:33:19 -0000 1.7
@@ -78,9 +78,9 @@
/* Token Parser */
-void ungetToken ( const char *c ) ;
-void getToken ( char *c, FILE *fd = NULL ) ;
-void setDefaultFile ( FILE *fd ) ;
+void PSL_UngetToken ( const char *c ) ;
+void PSL_GetToken ( char *c, FILE *fd = NULL ) ;
+void PSL_SetDefaultFile ( FILE *fd ) ;
/*
Address/Opcodes are:
Index: pslToken.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/psl/pslToken.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pslToken.cxx 5 Sep 2002 22:38:22 -0000 1.4
+++ pslToken.cxx 5 Sep 2002 23:33:19 -0000 1.5
@@ -31,13 +31,13 @@
static int unget_stack_depth = 0 ;
-void setDefaultFile ( FILE *fd )
+void PSL_SetDefaultFile ( FILE *fd )
{
defaultFile = fd ;
}
-void getToken ( char *res, FILE *fd )
+void PSL_GetToken ( char *res, FILE *fd )
{
if ( unget_stack_depth > 0 )
{
@@ -89,7 +89,7 @@
}
-void ungetToken ( const char *s )
+void PSL_UngetToken ( const char *s )
{
if ( unget_stack_depth >= MAX_UNGET-1 )
{
|