Changeset 413 for cpp/frams/param/multiparamload.cpp
- Timestamp:
- 07/12/15 00:47:33 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/param/multiparamload.cpp
r375 r413 94 94 SString buf; 95 95 if (status==OnError) return status; 96 int unexpected_line = 0; 96 97 while (!finished()) 97 98 { … … 103 104 if ((status!=Finished) && maybeBreak(AfterObject)) 104 105 break; 106 unexpected_line = 0; 105 107 continue; 106 108 } … … 113 115 if (!loadSStringLine(file,buf)) 114 116 { 117 unexpected_line = 0; 115 118 if (!returnFromIncluded()) 116 119 { … … 124 127 if (buf[0]=='#') 125 128 { 129 unexpected_line = 0; 126 130 if (buf.startsWith("#include")) 127 131 { … … 150 154 } 151 155 buf=trim(buf); 152 if ((buf.len()>1)&&(buf[buf.len()-1]==':')) 153 { 156 if (buf.len()==0) 157 unexpected_line = 0; 158 else if ((buf.len()>1)&&(buf[buf.len()-1]==':')) 159 { 160 unexpected_line = 0; 154 161 lastunknown=0; 155 162 lastunknown=buf.substr(0,buf.len()-1); … … 170 177 } 171 178 179 } 180 else 181 { 182 switch(unexpected_line) 183 { 184 case 0: 185 { 186 const char* thisfilename=file->VgetPath(); 187 logPrintf("MultiParamLoader","go", LOG_WARN, "Ignored unexpected line %d%s", 188 linenum, 189 thisfilename ? SString::sprintf(" while reading '%s'",thisfilename).c_str():""); 190 } 191 break; 192 193 case 1: 194 logPrintf("MultiParamLoader","go", LOG_WARN, "The following line(s) were also unexpected and were ignored"); 195 break; 196 } 197 unexpected_line++; 172 198 } 173 199 }
Note: See TracChangeset
for help on using the changeset viewer.