Commit 39473ff0 authored by dickelbeck's avatar dickelbeck

handle XX-1-1 as "XX-1"-1

parent 40e69c9b
...@@ -3477,7 +3477,7 @@ int SPECCTRA_DB::Print( int nestLevel, const char* fmt, ... ) throw( IOError ) ...@@ -3477,7 +3477,7 @@ int SPECCTRA_DB::Print( int nestLevel, const char* fmt, ... ) throw( IOError )
const char* OUTPUTFORMATTER::GetQuoteChar( const char* wrapee, const char* quote_char ) const char* OUTPUTFORMATTER::GetQuoteChar( const char* wrapee, const char* quote_char )
{ {
// I include '#' so a symbol is not confused with a comment. We intend // Include '#' so a symbol is not confused with a comment. We intend
// to wrap any symbol starting with a '#'. // to wrap any symbol starting with a '#'.
// Our LEXER class handles comments, and comments appear to be an extension // Our LEXER class handles comments, and comments appear to be an extension
// to the SPECCTRA DSN specification. // to the SPECCTRA DSN specification.
...@@ -3487,9 +3487,9 @@ const char* OUTPUTFORMATTER::GetQuoteChar( const char* wrapee, const char* quote ...@@ -3487,9 +3487,9 @@ const char* OUTPUTFORMATTER::GetQuoteChar( const char* wrapee, const char* quote
if( strlen(wrapee)==0 ) if( strlen(wrapee)==0 )
return quote_char; return quote_char;
// bool isNumber = true; bool isFirst = true;
for( ; *wrapee; ++wrapee ) for( ; *wrapee; ++wrapee, isFirst=false )
{ {
static const char quoteThese[] = "\t ()" static const char quoteThese[] = "\t ()"
"%" // per Alfons of freerouting.net, he does not like this unquoted as of 1-Feb-2008 "%" // per Alfons of freerouting.net, he does not like this unquoted as of 1-Feb-2008
...@@ -3501,14 +3501,11 @@ const char* OUTPUTFORMATTER::GetQuoteChar( const char* wrapee, const char* quote ...@@ -3501,14 +3501,11 @@ const char* OUTPUTFORMATTER::GetQuoteChar( const char* wrapee, const char* quote
if( strchr( quoteThese, *wrapee ) ) if( strchr( quoteThese, *wrapee ) )
return quote_char; return quote_char;
// if( !strchr( "01234567890.-+", *wrapee ) ) if( !isFirst && '-' == *wrapee )
// isNumber = false; return quote_char;
} }
// if( isNumber ) return ""; // caller does not need to wrap, can use an unwrapped string.
// return quote_char;
return ""; // can use an unwrapped string.
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment