Changeset 413 for cpp/frams/param/param.cpp
- Timestamp:
- 07/12/15 00:47:33 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/param/param.cpp
r412 r413 400 400 bool loaded; 401 401 int fields_loaded = 0; 402 int unexpected_line = 0; 402 403 if ((i=findId("beforeLoad"))>=0) 403 404 call(i,NULL,NULL); … … 406 407 if (linenum) (*linenum)++; 407 408 const char* t = buf.c_str(); 408 p0 = t; while ( (*p0 == ' ') || (*p0 == '\t')) p0++;409 p0 = t; while (isblank(*p0)) p0++; 409 410 if (!*p0) break; 410 if (p0[0] == '#') continue; 411 p = strchr(p0, ':'); if (!p) continue; 411 if (p0[0] == '#') { unexpected_line = 0; continue; } 412 p = strchr(p0, ':'); 413 if (!p) 414 { 415 switch(unexpected_line) 416 { 417 case 0: 418 logPrintf("ParamInterface", "load", LOG_WARN, "Ignored unexpected line %s while reading object '%s'", 419 linenum ? 420 SString::sprintf("%d",*linenum).c_str() 421 : SString::sprintf("'%s'", p0).c_str(), 422 getName()); 423 break; 424 case 1: 425 logPrintf("ParamInterface", "load", LOG_WARN, "The following line(s) were also unexpected and were ignored"); 426 break; 427 } 428 unexpected_line++; 429 continue; 430 } 431 unexpected_line = 0; 412 432 p_len = (int)(p - p0); 413 433 loaded = false;
Note: See TracChangeset
for help on using the changeset viewer.