00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef INI_DEFINES_H
00023 #define INI_DEFINES_H
00024
00025 #define NAME_OVERHEAD 10
00026
00027 #define SLASH "/"
00028
00029
00030
00031 #define FILE_ERROR_SET "ini_file_error_set"
00032
00033
00034 #define WARNING_TXT _("Warning")
00035 #define ERROR_TXT _("Error")
00036
00037 #define WRONG_COLLECTION _("Passed in list is not a list of parse errors.\n")
00038 #define FAILED_TO_PROCCESS _("Internal Error. Failed to process error list.\n")
00039 #define ERROR_HEADER _("Parsing errors and warnings in file: %s\n")
00040
00041 #define WRONG_GRAMMAR _("Passed in list is not a list of grammar errors.\n")
00042 #define FAILED_TO_PROC_G _("Internal Error. Failed to process list of grammar errors.\n")
00043 #define ERROR_HEADER_G _("Logical errors and warnings in file: %s\n")
00044
00045 #define WRONG_VALIDATION _("Passed in list is not a list of validation errors.\n")
00046 #define FAILED_TO_PROC_V _("Internal Error. Failed to process list of validation errors.\n")
00047 #define ERROR_HEADER_V _("Validation errors and warnings in file: %s\n")
00048
00049 #define LINE_FORMAT _("%s (%d) on line %d: %s")
00050 #define MAX_ERROR_LINE 120
00051
00052
00053 #define RET_PAIR 0
00054 #define RET_COMMENT 1
00055 #define RET_SECTION 2
00056 #define RET_INVALID 3
00057 #define RET_EMPTY 4
00058 #define RET_EOF 5
00059 #define RET_ERROR 6
00060
00061 #define INI_ERROR "errors"
00062 #define INI_METADATA "meta"
00063 #define INI_ERROR_NAME "errname"
00064 #define INI_CONFIG_NAME "INI"
00065
00066 #define INI_SPECIAL_KEY "="
00067 #define INI_SECTION_KEY "["
00068
00069
00070 #define MAX_VALUE PATH_MAX
00071 #define BUFFER_SIZE MAX_KEY + MAX_VALUE + 3
00072
00073
00074 #define CONVERSION_BUFFER 80
00075
00076
00077 #define INI_VALUE_BLOCK 100
00078
00079
00080 #define INI_WRAP_BOUNDARY 80
00081
00082
00083 #define COL_CLASS_INI_BASE 20000
00084
00089 #define COL_CLASS_INI_PERROR COL_CLASS_INI_BASE + 2
00090
00096 #define COL_CLASS_INI_META COL_CLASS_INI_BASE + 4
00097
00098
00099
00100 typedef const char * (*error_fn)(int error);
00101
00102 #endif