Commit a60cbb91 authored by dickelbeck's avatar dickelbeck

specctra export: quote toks with % in them for freerouting.net

parent d44f1c0d
...@@ -3398,9 +3398,13 @@ const char* OUTPUTFORMATTER::GetQuoteChar( const char* wrapee, const char* quote ...@@ -3398,9 +3398,13 @@ const char* OUTPUTFORMATTER::GetQuoteChar( const char* wrapee, const char* quote
for( ; *wrapee; ++wrapee ) for( ; *wrapee; ++wrapee )
{ {
static const char quoteThese[] = "\t ()"
"%" // per Alfons of freerouting.net, he does not like this unquoted as of 1-Feb-2008
;
// if the string to be wrapped (wrapee) has a delimiter in it, // if the string to be wrapped (wrapee) has a delimiter in it,
// return the quote_char so caller wraps the wrapee. // return the quote_char so caller wraps the wrapee.
if( strchr( "\t ()", *wrapee ) ) if( strchr( quoteThese, *wrapee ) )
return quote_char; return quote_char;
if( !strchr( "01234567890.-+", *wrapee ) ) if( !strchr( "01234567890.-+", *wrapee ) )
...@@ -3561,7 +3565,7 @@ void STRINGFORMATTER::StripUseless() ...@@ -3561,7 +3565,7 @@ void STRINGFORMATTER::StripUseless()
{ {
for( std::string::iterator i=mystring.begin(); i!=mystring.end(); ) for( std::string::iterator i=mystring.begin(); i!=mystring.end(); )
{ {
if( isspace( *i ) || *i==')' || *i=='(' ) if( isspace( *i ) || *i==')' || *i=='(' || *i=='"' )
mystring.erase(i); mystring.erase(i);
else else
++i; ++i;
......
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