| version 1.19, 2002/08/16 20:31:42 |
version 1.20, 2002/08/27 13:19:18 |
| Line 129 cfg_cfgfile_get_next_opt(con) |
|
| Line 129 cfg_cfgfile_get_next_opt(con) |
|
| |
|
| /* Testing if file stop prefix was found */ |
/* Testing if file stop prefix was found */ |
| if (buf != NULL && con->prop[CFG_FILE_STOP_PREFIX] != NULL) { |
if (buf != NULL && con->prop[CFG_FILE_STOP_PREFIX] != NULL) { |
| if (buf == FUNCTION(strdyn_str2)(buf, |
if (buf == PLATON_FUNC(strdyn_str2)(buf, |
| con->prop[CFG_FILE_STOP_PREFIX], NULL)) { |
con->prop[CFG_FILE_STOP_PREFIX], NULL)) { |
| __cfg_free_currents(con); |
__cfg_free_currents(con); |
| con->cur_opt = buf; |
con->cur_opt = buf; |
| Line 187 get_multi_line(con, buf) |
|
| Line 187 get_multi_line(con, buf) |
|
| |
|
| *buf = NULL; |
*buf = NULL; |
| |
|
| if ((ar = FUNCTION(strdyn_create)()) == NULL) |
if ((ar = PLATON_FUNC(strdyn_create)()) == NULL) |
| return CFG_ERROR_NOMEM; |
return CFG_ERROR_NOMEM; |
| |
|
| while (1) { |
while (1) { |
| Line 197 get_multi_line(con, buf) |
|
| Line 197 get_multi_line(con, buf) |
|
| if (my_buf != NULL) |
if (my_buf != NULL) |
| free(my_buf); |
free(my_buf); |
| |
|
| #ifdef PLATON_PREFIX |
my_buf = PLATON_FUNC(dynamic_fgets)(con->fhandle); |
| my_buf = FUNCTION(dynamic_fgets)(con->fhandle); |
|
| #else |
|
| my_buf = dynamic_fgets(con->fhandle); |
|
| #endif |
|
| if (my_buf == NULL) { |
if (my_buf == NULL) { |
| if (feof(con->fhandle)) |
if (feof(con->fhandle)) |
| return CFG_OK; |
return CFG_OK; |
| Line 250 get_multi_line(con, buf) |
|
| Line 246 get_multi_line(con, buf) |
|
| state = 2; |
state = 2; |
| |
|
| len = strlen(my_buf); |
len = strlen(my_buf); |
| FUNCTION(str_right_trim)(my_buf); |
PLATON_FUNC(str_right_trim)(my_buf); |
| if (len - strlen(my_buf) > 0) { |
if (len - strlen(my_buf) > 0) { |
| /* Could be replaced with |
/* Could be replaced with |
| strcpy(my_buf + strlen(my_buf), " "); */ |
strcpy(my_buf + strlen(my_buf), " "); */ |
| Line 260 get_multi_line(con, buf) |
|
| Line 256 get_multi_line(con, buf) |
|
| } |
} |
| } |
} |
| |
|
| ar = FUNCTION(strdyn_add)(ar, my_buf); |
ar = PLATON_FUNC(strdyn_add)(ar, my_buf); |
| if (ar == NULL) |
if (ar == NULL) |
| return CFG_ERROR_NOMEM; |
return CFG_ERROR_NOMEM; |
| |
|
| Line 271 get_multi_line(con, buf) |
|
| Line 267 get_multi_line(con, buf) |
|
| if (my_buf != NULL) |
if (my_buf != NULL) |
| free(my_buf); |
free(my_buf); |
| |
|
| my_buf = FUNCTION(str_right_trim)(strdyn_implode(ar, "")); |
my_buf = PLATON_FUNC(str_right_trim)(strdyn_implode(ar, "")); |
| FUNCTION(strdyn_free)(ar); |
PLATON_FUNC(strdyn_free)(ar); |
| |
|
| if (my_buf == NULL) |
if (my_buf == NULL) |
| return CFG_ERROR_NOMEM; |
return CFG_ERROR_NOMEM; |