Diff for libcfg+/src/cfg+.h between version 1.20 and 1.21
| version 1.20, 2002/02/18 21:34:56 |
version 1.21, 2002/02/20 21:00:48 |
|
|
| /* |
/*! |
| * libcfg - precise command line & config file parsing library |
* libcfg - precise command line & config file parsing library |
| * |
* |
| * cfg.h - main implementation header file |
* \file cfg.h - main implementation header file |
| * ___________________________________________________________ |
* ___________________________________________________________ |
| * |
* |
| * Developed by Ondrej Jombik <nepto@pobox.sk> |
* Developed by Ondrej Jombik <nepto@pobox.sk> |
|
|
| |
|
| enum cfg_error { |
enum cfg_error { |
| |
|
| /* OK, all is right. */ |
/*! OK, all is right. */ |
| CFG_ERR_OK = 0, |
CFG_ERR_OK = 0, |
| CFG_ERROR_OK = 0, |
CFG_ERROR_OK = 0, |
| CFG_OK = 0, |
CFG_OK = 0, |
| |
|
| /* An argument is missing for an option. */ |
/*! An argument is missing for an option. */ |
| CFG_ERR_NOARG = -1, |
CFG_ERR_NOARG = -1, |
| CFG_ERROR_NOARG = -1, |
CFG_ERROR_NOARG = -1, |
| |
|
| /* An argument is not allowed for an option. */ |
/*! An argument is not allowed for an option. */ |
| CFG_ERR_NOTALLOWEDARG = -2, |
CFG_ERR_NOTALLOWEDARG = -2, |
| CFG_ERROR_NOTALLOWEDARG = -2, |
CFG_ERROR_NOTALLOWEDARG = -2, |
| |
|
| /* An option's argument could not be parsed. */ |
/*! An option's argument could not be parsed. */ |
| CFG_ERR_BADOPT = -3, |
CFG_ERR_BADOPT = -3, |
| CFG_ERROR_BADOPT = -3, |
CFG_ERROR_BADOPT = -3, |
| |
|
| /* Error in quotations. */ |
/*! Error in quotations. */ |
| CFG_ERR_BADQUOTE = -4, |
CFG_ERR_BADQUOTE = -4, |
| CFG_ERROR_BADQUOTE = -4, |
CFG_ERROR_BADQUOTE = -4, |
| |
|
| /* An option could not be converted to appropiate numeric type. */ |
/*! An option could not be converted to appropiate numeric type. */ |
| CFG_ERR_BADNUMBER = -5, |
CFG_ERR_BADNUMBER = -5, |
| CFG_ERROR_BADNUMBER = -5, |
CFG_ERROR_BADNUMBER = -5, |
| |
|
| /* A given number was too big or too small. */ |
/*! A given number was too big or too small. */ |
| CFG_ERR_OVERFLOW = -6, |
CFG_ERR_OVERFLOW = -6, |
| CFG_ERROR_OVERFLOW = -6, |
CFG_ERROR_OVERFLOW = -6, |
| |
|
| /* Multiple arguments used for single option. */ |
/*! Multiple arguments used for single option. */ |
| CFG_ERR_MULTI = -7, |
CFG_ERR_MULTI = -7, |
| CFG_ERROR_MULTI = -7, |
CFG_ERROR_MULTI = -7, |
| |
|
| /* Not enough memory. */ |
/*! Not enough memory. */ |
| CFG_ERR_NOMEM = -8, |
CFG_ERR_NOMEM = -8, |
| CFG_ERROR_NOMEM = -8, |
CFG_ERROR_NOMEM = -8, |
| |
|
| /* Stop string was found. */ |
/*! Stop string was found. */ |
| CFG_ERR_STOP_STR = -9, |
CFG_ERR_STOP_STR = -9, |
| CFG_ERR_STOP_STR_FOUND = -9, |
CFG_ERR_STOP_STR_FOUND = -9, |
| CFG_ERROR_STOP_STR = -9, |
CFG_ERROR_STOP_STR = -9, |
| CFG_ERROR_STOP_STR_FOUND = -9, |
CFG_ERROR_STOP_STR_FOUND = -9, |
| |
|
| /* No equal sign on the line. */ |
/*! No equal sign on the line. */ |
| CFG_ERR_NOEQUAL = -10, |
CFG_ERR_NOEQUAL = -10, |
| CFG_ERROR_NOEQUAL = -10, |
CFG_ERROR_NOEQUAL = -10, |
| |
|
| /* An unknown option. */ |
/*! An unknown option. */ |
| CFG_ERR_UNKNOWN = -11, |
CFG_ERR_UNKNOWN = -11, |
| CFG_ERROR_UNKNOWN = -11, |
CFG_ERROR_UNKNOWN = -11, |
| |
|
| /* File not found error. */ |
/*! File not found error. */ |
| CFG_ERR_FILE_NOT_FOUND = -12, |
CFG_ERR_FILE_NOT_FOUND = -12, |
| CFG_ERROR_FILE_NOT_FOUND = -12, |
CFG_ERROR_FILE_NOT_FOUND = -12, |
| |
|
| /* Seek error (fseek() failure). */ |
/*! Seek error (fseek() failure). */ |
| CFG_ERR_SEEK_ERROR = -13, |
CFG_ERR_SEEK_ERROR = -13, |
| CFG_ERROR_SEEK_ERROR = -13, |
CFG_ERROR_SEEK_ERROR = -13, |
| |
|
| /* Internal error. */ |
/*! Internal error. */ |
| CFG_ERR_INTERNAL = -20, |
CFG_ERR_INTERNAL = -20, |
| CFG_ERROR_INTERNAL = -20 |
CFG_ERROR_INTERNAL = -20 |
| |
|
Platon Group <platon@platon.org> http://platon.org/
|
|