| 338 | |
| 339 | |
| 340 | cString cInitFile::ReadString(const cString& name, cString def, bool warn_default) const |
| 341 | { |
| 342 | // See if we definately can't find the keyword. |
| 343 | if (name == "") return def; |
| 344 | |
| 345 | // Search for the keyword. |
| 346 | cString cur_line; |
| 347 | if (Find(cur_line, name, 0) == false) { |
| 348 | if (warn_default) { |
| 349 | m_feedback.Error("%s not in '%s', defaulting to: %s", (const char*)name, (const char*)m_filename, (const char*)def); |
| 350 | } |
| 351 | return def; |
| 352 | } |
| 353 | |
| 354 | // Pop off the keyword, and return the remainder of the line. |
| 355 | cur_line.PopWord(); |
| 356 | return cur_line; |
| 357 | } |
| 358 | |
| 359 | |
| 360 | cString cInitFile::ReadString(const Apto::Array<cString>& names, cString def, bool warn_default) const |