r669 - trunk
black at icculus.org
black at icculus.org
Sun Mar 12 17:02:12 EST 2006
Author: black
Date: 2006-03-12 17:02:12 -0500 (Sun, 12 Mar 2006)
New Revision: 669
Modified:
trunk/shell.c
Log:
Fixed a bug in the shell parser and some typos in comments.
Modified: trunk/shell.c
===================================================================
--- trunk/shell.c 2006-03-08 22:07:58 UTC (rev 668)
+++ trunk/shell.c 2006-03-12 22:02:12 UTC (rev 669)
@@ -304,7 +304,7 @@
decimalPoint = false;
current = text;
- if( IsSign( current[0] ) || IsDigit( current[1] ) ) {
+ if( IsSign( current[0] ) && IsDigit( current[1] ) ) {
current += 2;
}
for( ; *current ; current++ ) {
@@ -369,7 +369,8 @@
static inline Nbool Shell_Parser_MatchValue( Shell_Parser *parser ) {
if( Shell_Parser_MatchDigit( parser ) ||
Shell_Parser_MatchSignedDigit( parser ) ) {
- while( Shell_Parser_MatchDigit( parser ) );
+ while( Shell_Parser_MatchDigit( parser ) )
+ ;
if( Shell_Parser_MatchChar( parser, '.' ) ) {
while( Shell_Parser_MatchDigit( parser ) );
}
@@ -409,7 +410,7 @@
}
// skips whitespace and // comments and /* */ comments
-// result: you'll have a meaningfull char in currentChar
+// result: you'll have a meaningful char in currentChar
static void Shell_Parser_SkipStuff( Shell_Parser *parser ) {
while( 1 ) {
while( IsWhitespace( *parser->currentChar ) ) {
@@ -689,7 +690,7 @@
from->type = SHELL_TOKENTYPE_EOF;
}
-// formal makes it put "" around strings, etc. and always return something that can be print
+// formal makes it put "" around strings, etc. and always return something that can be printed
// otherwise it can return "" sometimes
static inline char * Shell_Item_ToString( Shell_Item *item, Nbool formal ) {
char *out = NULL;
More information about the neither-commits
mailing list