fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ini: Add a conditional "include?" statement

The "include?" statement includes a file if it exists and
silently skips it if it doesn't.

Hampa Hug 4493932d a3b876d6

+9 -3
+9 -3
src/libini/read.c
··· 287 287 } 288 288 } 289 289 else if (strcmp (buf, "include") == 0) { 290 + int noerr; 291 + 292 + noerr = (scn_match (scn, "?") != 0); 293 + 290 294 if (scn_match_string (scn, buf, 256) == 0) { 291 295 return (1); 292 296 } 293 297 294 298 if (scn_add_file (scn, buf, NULL, 1)) { 295 - parse_error (scn, "can't open include file:", 0); 296 - parse_error (scn, buf, 0); 297 - return (1); 299 + if (noerr == 0) { 300 + parse_error (scn, "can't open include file:", 0); 301 + parse_error (scn, buf, 0); 302 + return (1); 303 + } 298 304 } 299 305 } 300 306 else {