| verzia 1.23, 2002/02/25 18:45:56 |
verzia 1.24, 2002/03/21 13:38:03 |
| Riadok 219 cfg_free_context(con) |
|
| Riadok 219 cfg_free_context(con) |
|
| free((void *) con); |
free((void *) con); |
| } |
} |
| |
|
| |
const char* |
| |
cfg_get_error_str(errorcode) |
| |
const int errorcode; |
| |
{ |
| |
switch (errorcode) { |
| |
|
| |
/* case CFG_ERR_OK: */ |
| |
/* case CFG_ERROR_OK: */ |
| |
case CFG_OK: |
| |
return "no error"; |
| |
|
| |
/* case CFG_ERR_NOARG: */ |
| |
case CFG_ERROR_NOARG: |
| |
return "argument is missing for option"; |
| |
|
| |
/* case CFG_ERR_NOTALLOWEDARG: */ |
| |
case CFG_ERROR_NOTALLOWEDARG: |
| |
return "argument is not allowed for option"; |
| |
|
| |
/* case CFG_ERR_BADOPT: */ |
| |
case CFG_ERROR_BADOPT: |
| |
return "option's argument could not be parsed"; |
| |
|
| |
/* case CFG_ERR_BADQUOTE: */ |
| |
case CFG_ERROR_BADQUOTE: |
| |
return "error in quotations"; |
| |
|
| |
/* case CFG_ERR_BADNUMBER: */ |
| |
case CFG_ERROR_BADNUMBER: |
| |
return "option could not be converted to appropriate numeric type"; |
| |
|
| |
/* case CFG_ERR_OVERFLOW: */ |
| |
case CFG_ERROR_OVERFLOW: |
| |
return "given number was too big or too small"; |
| |
|
| |
/* case CFG_ERR_MULTI: */ |
| |
case CFG_ERROR_MULTI: |
| |
return "multiple arguments used for single option"; |
| |
|
| |
/* case CFG_ERR_NOMEM: */ |
| |
case CFG_ERROR_NOMEM: |
| |
return "not enough memory"; |
| |
|
| |
/* case CFG_ERR_STOP_STR: */ |
| |
/* case CFG_ERR_STOP_STR_FOUND: */ |
| |
/* case CFG_ERROR_STOP_STR: */ |
| |
case CFG_ERROR_STOP_STR_FOUND: |
| |
return "stop string was found"; |
| |
|
| |
/* case CFG_ERR_NOEQUAL: */ |
| |
case CFG_ERROR_NOEQUAL: |
| |
return "no equal sign on the line"; |
| |
|
| |
/* case CFG_ERR_UNKNOWN: */ |
| |
case CFG_ERROR_UNKNOWN: |
| |
return "unknown option"; |
| |
|
| |
/* case CFG_ERR_FILE_NOT_FOUND: */ |
| |
case CFG_ERROR_FILE_NOT_FOUND: |
| |
return "file not found"; |
| |
|
| |
/* case CFG_ERR_SEEK_ERROR: */ |
| |
case CFG_ERROR_SEEK_ERROR: |
| |
return "file seek error"; |
| |
|
| |
/* case CFG_ERR_INTERNAL: */ |
| |
case CFG_ERROR_INTERNAL: |
| |
return "internal error"; |
| |
} |
| |
|
| |
return "unknown error"; |
| |
} |
| |
|
| #if defined(SELF) || defined(SELFTEST) || defined(SELF_CFG) |
#if defined(SELF) || defined(SELFTEST) || defined(SELF_CFG) |
| |
|
| |
|