| libcfg+ - Viewing Bug Advanced Details | [ Go Back ] | ||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 199 | library core | major | sometimes | 2004-03-08 10:37 | 2004-03-26 14:41 |
|
|
|||||
| Reporter: | admin | Platform: | |||
| Assigned To: | nepto | OS: | |||
| Priority: | normal | Version: | |||
| Status: | resolved | Product Version: | 0.6.2 (stable) | ||
| Product Build: | Resolution: | fixed | |||
| Projection: | none | Duplicate ID: | |||
| ETA: | none | ||||
|
|
|||||
| Summary: | last line in config file is not parsed | ||||
| Description: |
thanks for the ecellent library, by far the best features and best usabilty for option and command line parsing I have seen so far. There is a little bug in config file parsing, apparently a missing newline on last line screws up: {NULL, 0, "threading", CFG_ULONG, (void *) &threading, 0}, ... ... con = cfg_get_context(acct_options); cfg_set_cfgfile_context(con, 0, -1, cfg_file); ret = cfg_parse(con); if (ret != CFG_OK) { printf("error parsing config file %s: ",acct); cfg_fprint_error(con, stdout); putchar('\n'); exit(1); } Now when "threading=1" is the last line in config file (without newline) it doesn't set "threading" and it doesnt complain either. After adding a newline in the config file it works as expected. |
||||
| Steps To Reproduce: | |||||
| Additional Information / Solution: |
This bug was reported via e-mail by Richard Zidlicky <rz AT linux-m68k.org> |
||||
| Attached Files: |
0000199-threading.tgz.txt (2 KB) 1970-01-01 01:33 0000199-libcfgbug.tar.bz2.txt (1 KB) 1970-01-01 01:33 0000199-big-199-patch.diff.txt (1 KB) 1970-01-01 01:33 |
||||
| Bug Notes | ||||
|
|
||||
|
|
|||
|
|
||||
|
|
|||
|
|
||||
|
|
|||
|
|
||||
|
|
|||