From a60cbb91b509906e3acbb72a4628bbd9cb10989b Mon Sep 17 00:00:00 2001 From: dickelbeck Date: Fri, 1 Feb 2008 21:19:51 +0000 Subject: [PATCH] specctra export: quote toks with % in them for freerouting.net --- pcbnew/specctra.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pcbnew/specctra.cpp b/pcbnew/specctra.cpp index 605b8735c7..fda75445f5 100644 --- a/pcbnew/specctra.cpp +++ b/pcbnew/specctra.cpp @@ -3398,9 +3398,13 @@ const char* OUTPUTFORMATTER::GetQuoteChar( const char* wrapee, const char* quote 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, // return the quote_char so caller wraps the wrapee. - if( strchr( "\t ()", *wrapee ) ) + if( strchr( quoteThese, *wrapee ) ) return quote_char; if( !strchr( "01234567890.-+", *wrapee ) ) @@ -3561,7 +3565,7 @@ void STRINGFORMATTER::StripUseless() { for( std::string::iterator i=mystring.begin(); i!=mystring.end(); ) { - if( isspace( *i ) || *i==')' || *i=='(' ) + if( isspace( *i ) || *i==')' || *i=='(' || *i=='"' ) mystring.erase(i); else ++i;