Changeset 199 for trunk/src/sh_readconf.c
- Timestamp:
- Nov 26, 2008, 11:46:43 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_readconf.c
r197 r199 270 270 char * p = str; 271 271 ++p; while (isspace((int)*p)) ++p; 272 if (0 == strcmp (p, _("end") ) || 273 0 == strncmp(p, _("end "), 4) || /* Comment to follow */ 274 0 == strcmp (p, _("endif") ) || 275 0 == strncmp(p, _("endif "),6) || 276 0 == strcmp (p, _("fi") ) || 277 0 == strncmp(p, _("fi "), 3) 278 ) 272 if ( 273 (0 == strncmp (p, _("end"), 3) && (p[3] == '\0' || isspace((int)p[3]))) || 274 (0 == strncmp (p, _("fi"), 2) && (p[2] == '\0' || isspace((int)p[2]))) 275 ) 276 { 277 return 1; 278 } 279 } 280 return retval; 281 } 282 283 static int sh_readconf_is_else (char * str) 284 { 285 int retval = 0; 286 287 if (str[0] == '@') 288 { 289 char * p = str; 290 ++p; while (isspace((int)*p)) ++p; 291 if ( 0 == strncmp (p, _("else"), 4) && (p[4] == '\0' || isspace((int)p[4])) ) 279 292 { 280 293 return 1; … … 509 522 } 510 523 } 524 else if (sh_readconf_is_else(line)) 525 { 526 if (0 == cond_depth) { 527 sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_EINVALD, 528 _("config file"), 529 (long) conf_line); 530 } 531 else if (cond_excl == cond_depth) { 532 cond_excl = 0; 533 } 534 else if (cond_excl == 0) { 535 cond_excl = cond_depth; 536 } 537 } 511 538 else 512 539 {
Note:
See TracChangeset
for help on using the changeset viewer.