Diff for libcfg+/src/cfgfile.c between version 1.27 and 1.28
| version 1.27, 2004/03/15 10:25:14 |
version 1.28, 2004/03/26 13:41:00 |
|
|
| * http://platon.sk/projects/libcfg+/ |
* http://platon.sk/projects/libcfg+/ |
| */ |
*/ |
| |
|
| /* $Platon: libcfg+/src/cfgfile.c,v 1.26 2003/11/07 17:26:48 nepto Exp $ */ |
/* $Platon: libcfg+/src/cfgfile.c,v 1.27 2004/03/15 10:25:14 nepto Exp $ */ |
| |
|
| /* Includes {{{ */ |
/* Includes {{{ */ |
| #ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
| Line 138 cfg_cfgfile_get_next_opt(con) |
|
| Line 138 cfg_cfgfile_get_next_opt(con) |
|
| } |
} |
| } |
} |
| |
|
| /* Finished? */ |
/* Finished? Is `end_pos' reached, are we `size' from beginning? */ |
| if ((con->size >= 0 && cfg_get_cur_idx(con) >= con->begin_pos + con->size) |
if (con->size >= 0 && cfg_get_cur_idx(con) >= con->begin_pos + con->size) { |
| || feof(con->fhandle)) { |
|
| if (buf != NULL) |
if (buf != NULL) |
| free(buf); |
free(buf); |
| |
|
| return con->error_code; /* always CFG_OK */ |
return con->error_code; /* always CFG_OK */ |
| } |
} |
| |
|
| |
/* Finished? Is end-of-file reached and buffer is empty? */ |
| |
if (buf == NULL && feof(con->fhandle)) |
| |
return con->error_code; /* always CFG_OK */ |
| |
|
| __cfg_free_currents(con); |
__cfg_free_currents(con); |
| |
|
| if (__cfg_cfgfile_set_currents(con, buf) != CFG_OK) { |
if (__cfg_cfgfile_set_currents(con, buf) != CFG_OK) { |
Platon Group <platon@platon.org> http://platon.org/
|
|