Update of /cvsroot/plib/plib/src/psl
In directory usw-pr-cvs1:/tmp/cvs-serv9092/plib/src/psl
Modified Files:
psl.h pslCodeGen.cxx
Log Message:
Added Hex & Octal constants
Index: psl.h
===================================================================
RCS file: /cvsroot/plib/plib/src/psl/psl.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- psl.h 13 Sep 2002 17:37:26 -0000 1.14
+++ psl.h 14 Sep 2002 06:23:27 -0000 1.15
@@ -87,7 +87,7 @@
{
case PSL_INT : return i ;
case PSL_FLOAT : return (int) f ;
- case PSL_STRING : return atoi(s) ;
+ case PSL_STRING : return strtol(s,NULL,0) ;
case PSL_VOID : return 0 ;
}
return 0 ;
@@ -185,7 +185,7 @@
{
switch ( t )
{
- case PSL_INT : i = atoi ( v ) ; return ;
+ case PSL_INT : i = strtol ( v, NULL, 0 ) ; return ;
case PSL_FLOAT : f = (float) atof ( v ) ; return ;
case PSL_STRING : delete [] s ;
s = ulStrDup ( v ) ;
Index: pslCodeGen.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/psl/pslCodeGen.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- pslCodeGen.cxx 14 Sep 2002 06:12:32 -0000 1.21
+++ pslCodeGen.cxx 14 Sep 2002 06:23:27 -0000 1.22
@@ -80,7 +80,7 @@
void pslCompiler::pushIntConstant ( const char *c )
{
- int i = atoi ( c ) ;
+ int i = strtol ( c, NULL, 0 ) ;
pushIntConstant ( i ) ;
}
|