| 82 | } |
| 83 | |
| 84 | static std::string MakeQuotedString( const std::string& str ) |
| 85 | { |
| 86 | std::string result; |
| 87 | result.reserve( str.size() + 3u ); |
| 88 | result+= "\""; |
| 89 | |
| 90 | const char* s= str.c_str(); |
| 91 | while( *s != '\0' ) |
| 92 | { |
| 93 | if( *s == '"' || *s == '\\' ) |
| 94 | result+= '\\'; |
| 95 | result+= *s; |
| 96 | s++; |
| 97 | } |
| 98 | |
| 99 | result += "\""; |
| 100 | return result; |
| 101 | } |
| 102 | |
| 103 | Settings::Settings( const char* file_name ) |
| 104 | : file_name_(file_name) |