Changeset 1427 in MondoRescue
- Timestamp:
- May 9, 2007, 12:15:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/lib/mr_conf.c
r1426 r1427 58 58 #define MRCONF_STR_CALL_BUT_NOT_OPEN _("attempt to use mr_conf when it has not been opened yet") 59 59 #define MRCONF_STR_STRING_QUOTE _("string should be surrounded by quotes") 60 #define MRCONF_STR_STRING_ENDQUOTE _("a string is not finished by a quote") 60 61 61 62 /*Flags of internal state*/ … … 293 294 i = 0; 294 295 while (i < length) { 295 /* Handle quotes */296 /* Handle quotes to detect strings */ 296 297 if (buffer[i] == '"') { 297 298 if (found_quote) { … … 301 302 } 302 303 } 303 if ((buffer[i] != MRCONF_COMM_CHAR) && (! found_quote)){304 if ((buffer[i] != MRCONF_COMM_CHAR) || (found_quote)) { 304 305 k++; 305 306 i++; 306 307 } else { 308 /* Skip comment as it's not inside a string */ 307 309 while ((buffer[i] != '\n') && (buffer[i] != (char) 0)) { 308 310 i++; 311 } 312 if (buffer[i] == (char) 0) { 313 mr_conf_error_msg(MRCONF_STRING_ENDQUOTE, ""); 309 314 } 310 315 } … … 323 328 } 324 329 } 325 if ((buffer[i] != MRCONF_COMM_CHAR) && (! found_quote)){330 if ((buffer[i] != MRCONF_COMM_CHAR) || (found_quote)) { 326 331 tmp_buf[k++] = buffer[i++]; 327 332 } else { 333 /* Skip comment as it's not inside a string */ 328 334 while ((buffer[i] != '\n') && (buffer[i] != (char) 0)) { 329 335 i++;
Note:
See TracChangeset
for help on using the changeset viewer.