/* * Common messages catalogue. * * It could be extended by defining additional types, usages and entries. * * $TenDRA: tendra/src/libten/catstd.cat,v 1.3 2004/09/05 03:38:39 bp Exp $ */ /* * AUTOMATICALLY GENERATED BY mkerr.awk FROM /mnt/gmirror/ports/lang/TenDRA/work/tendra/src/libten/catstd.cat */ #ifndef MSG_INCLUDED #define MSG_INCLUDED /* Error data structure */ #ifndef MSG_CONST #define MSG_CONST #endif typedef unsigned MSG_PROPS; typedef struct { MSG_CONST char *name; MSG_CONST char *signature; int usage; MSG_PROPS props; MSG_CONST char *key_STD; } MSG_DATA; extern MSG_DATA MSG_CATALOG []; extern MSG_CONST char *MSG_NAME; /* Error type keys */ #define MSG_KEY_int '0' #define MSG_KEY_unsigned '1' #define MSG_KEY_long '2' #define MSG_KEY_size_t '3' #define MSG_KEY_char '4' #define MSG_KEY_ccp '5' #define MSG_KEY_hex2_t '6' #define MSG_KEY_hex4_t '7' #define MSG_KEY_hex8_t '8' #define MSG_KEY_pointer_t '9' #define MSG_KEY_esc_char 'A' #define MSG_KEY_tdf_stream 'B' /* Error usage keys */ #ifndef MSG_USE #define MSG_SEV_NONE 0 #define MSG_SEV_INFO 1 #define MSG_SEV_ASSERT 2 #define MSG_SEV_DEBUG 3 #define MSG_SEV_WARNING 4 #define MSG_SEV_ERROR 5 #define MSG_SEV_FATAL 6 #define MSG_SEV_INTERNAL 7 #endif /* Error property keys */ #ifndef MSG_PROP #define MSG_PROP_FATAL ((MSG_PROPS)0x1) #endif /* Global variables */ #define MSG_GLOB_strerror 'a' #define MSG_GLOB_iline 'b' /* Error type checking */ #if defined(MSG_CHECK) extern int chk_0(int); extern unsigned chk_1(unsigned); extern long chk_2(long); extern size_t chk_3(size_t); extern char chk_4(char); extern ccp chk_5(ccp); extern hex2_t chk_6(hex2_t); extern hex4_t chk_7(hex4_t); extern hex8_t chk_8(hex8_t); extern pointer_t chk_9(pointer_t); extern esc_char chk_A(esc_char); extern tdf_stream chk_B(tdf_stream); #else #define chk_0(A) (A) #define chk_1(A) (A) #define chk_2(A) (A) #define chk_3(A) (A) #define chk_4(A) (A) #define chk_5(A) (A) #define chk_6(A) (A) #define chk_7(A) (A) #define chk_8(A) (A) #define chk_9(A) (A) #define chk_A(A) (A) #define chk_B(A) (A) #endif /* Error message macros */ #ifdef MSG_GEN #define MSG__prefix_info()\ MSG_GEN (0) #define MSG__prefix_debug()\ MSG_GEN (1) #define MSG__prefix_warning()\ MSG_GEN (2) #define MSG__prefix_error()\ MSG_GEN (3) #define MSG__prefix_fatal()\ MSG_GEN (4) #define MSG__prefix_internal()\ MSG_GEN (5) #define MSG__prefix_assert()\ MSG_GEN (6) #define MSG_fmm_malloc_failed(A)\ MSG_GEN (7, chk_3 (A)) #define MSG_fmm_frt_still_allocated(A, B)\ MSG_GEN (8, chk_3 (A), chk_5 (B)) #define MSG_fmm_data_modified(A, B, C, D, E, F)\ MSG_GEN (9, chk_9 (A), chk_5 (B), chk_2 (C), chk_2 (D), chk_8 (E), chk_8 (F)) #define MSG_fmm_wrong_bucket()\ MSG_GEN (10) #define MSG_fmm_lost_data()\ MSG_GEN (11) #define MSG_fmm_free_modified(A)\ MSG_GEN (12, chk_9 (A)) #define MSG_fmm_multiple_free(A)\ MSG_GEN (13, chk_9 (A)) #define MSG_caught_signal(A, B)\ MSG_GEN (14, chk_0 (A), chk_5 (B)) #define MSG_removed_core()\ MSG_GEN (15) #define MSG_tenapp_version(A, B, C)\ MSG_GEN (16, chk_5 (A), chk_5 (B), chk_5 (C)) #define MSG_crown_copyright()\ MSG_GEN (17) #define MSG_cant_open_input_file(A)\ MSG_GEN (18, chk_5 (A)) #define MSG_cant_open_output_file(A)\ MSG_GEN (19, chk_5 (A)) #define MSG_file_read_error(A)\ MSG_GEN (20, chk_5 (A)) #define MSG_file_write_error(A)\ MSG_GEN (21, chk_5 (A)) #define MSG_ostream_write_error(A)\ MSG_GEN (22, chk_5 (A)) #define MSG_getopt_unknown_option(A)\ MSG_GEN (23, chk_5 (A)) #define MSG_getopt_not_enough_arguments()\ MSG_GEN (24) #define MSG_getopt_too_many_arguments()\ MSG_GEN (25) #define MSG_arg_parse_missing_argument(A)\ MSG_GEN (26, chk_5 (A)) #define MSG_arg_parse_unknown_option(A)\ MSG_GEN (27, chk_5 (A)) #define MSG_arg_parse_missing_short_arg(A, B)\ MSG_GEN (28, chk_5 (A), chk_5 (B)) #define MSG_arg_parse_ambiguous_option(A)\ MSG_GEN (29, chk_5 (A)) #define MSG_arg_parse_unknown_short_opt(A, B)\ MSG_GEN (30, chk_5 (A), chk_5 (B)) #define MSG_description_of_help()\ MSG_GEN (31) #define MSG_description_of_version()\ MSG_GEN (32) #define MSG_fatal_tdf_stream_read_error(A)\ MSG_GEN (33, chk_B (A)) #define MSG_fatal_tdf_stream_seek_error(A)\ MSG_GEN (34, chk_B (A)) #define MSG_fatal_tdf_cant_encode_0_as_extended_value(A)\ MSG_GEN (35, chk_B (A)) #define MSG_fatal_tdf_integer_too_big(A, B)\ MSG_GEN (36, chk_B (A), chk_2 (B)) #define MSG_tdf_integer_too_long(A, B)\ MSG_GEN (37, chk_B (A), chk_2 (B)) #define MSG_fatal_tdf_string_element_too_big(A, B)\ MSG_GEN (38, chk_B (A), chk_0 (B)) #define MSG_fatal_tdf_expect_eof(A)\ MSG_GEN (39, chk_B (A)) #define MSG_fatal_tdf_unexpected_eof(A)\ MSG_GEN (40, chk_B (A)) #define MSG_fatal_tdf_bad_magic(A, B, C)\ MSG_GEN (41, chk_B (A), chk_5 (B), chk_5 (C)) #define MSG_fatal_tdf_bad_version(A, B)\ MSG_GEN (42, chk_B (A), chk_1 (B)) #define MSG_fatal_tdf_version_mismatch(A, B, C)\ MSG_GEN (43, chk_B (A), chk_1 (B), chk_1 (C)) #define MSG_int_tdf_extend_unaligned(A, B)\ MSG_GEN (44, chk_B (A), chk_2 (B)) #define MSG_int_tdf_unaligned_access(A, B)\ MSG_GEN (45, chk_B (A), chk_5 (B)) #define MSG_debug_tdf_version(A, B, C)\ MSG_GEN (46, chk_B (A), chk_1 (B), chk_1 (C)) #endif #endif