paul@181 | 1 | /* |
paul@181 | 2 | * prof_err.c: |
paul@181 | 3 | * This file is automatically generated; please do not edit it. |
paul@181 | 4 | */ |
paul@181 | 5 | |
paul@181 | 6 | #include <stdlib.h> |
paul@181 | 7 | |
paul@181 | 8 | #define N_(a) a |
paul@181 | 9 | |
paul@181 | 10 | static const char * const text[] = { |
paul@181 | 11 | N_("Profile version 0.0"), |
paul@181 | 12 | N_("Bad magic value in profile_node"), |
paul@181 | 13 | N_("Profile section not found"), |
paul@181 | 14 | N_("Profile relation not found"), |
paul@181 | 15 | N_( "Attempt to add a relation to node which is not a section"), |
paul@181 | 16 | N_( "A profile section header has a non-zero value"), |
paul@181 | 17 | N_("Bad linked list in profile structures"), |
paul@181 | 18 | N_("Bad group level in profile structures"), |
paul@181 | 19 | N_( "Bad parent pointer in profile structures"), |
paul@181 | 20 | N_("Bad magic value in profile iterator"), |
paul@181 | 21 | N_("Can't set value on section node"), |
paul@181 | 22 | N_("Invalid argument passed to profile library"), |
paul@181 | 23 | N_("Attempt to modify read-only profile"), |
paul@181 | 24 | N_("Profile section header not at top level"), |
paul@181 | 25 | N_("Syntax error in profile section header"), |
paul@181 | 26 | N_("Syntax error in profile relation"), |
paul@181 | 27 | N_("Extra closing brace in profile"), |
paul@181 | 28 | N_("Missing open brace in profile"), |
paul@181 | 29 | N_("Bad magic value in profile_t"), |
paul@181 | 30 | N_("Bad magic value in profile_section_t"), |
paul@181 | 31 | N_( "Iteration through all top level section not supported"), |
paul@181 | 32 | N_("Invalid profile_section object"), |
paul@181 | 33 | N_("No more sections"), |
paul@181 | 34 | N_("Bad nameset passed to query routine"), |
paul@181 | 35 | N_("No profile file open"), |
paul@181 | 36 | N_("Bad magic value in profile_file_t"), |
paul@181 | 37 | N_("Couldn't open profile file"), |
paul@181 | 38 | N_("Section already exists"), |
paul@181 | 39 | N_("Invalid boolean value"), |
paul@181 | 40 | N_("Invalid integer value"), |
paul@181 | 41 | N_("Bad magic value in profile_file_data_t"), |
paul@181 | 42 | 0 |
paul@181 | 43 | }; |
paul@181 | 44 | |
paul@181 | 45 | struct error_table { |
paul@181 | 46 | char const * const * msgs; |
paul@181 | 47 | long base; |
paul@181 | 48 | int n_msgs; |
paul@181 | 49 | }; |
paul@181 | 50 | struct et_list { |
paul@181 | 51 | struct et_list *next; |
paul@181 | 52 | const struct error_table * table; |
paul@181 | 53 | }; |
paul@181 | 54 | extern struct et_list *_et_list; |
paul@181 | 55 | |
paul@181 | 56 | const struct error_table et_prof_error_table = { text, -1429577728L, 31 }; |
paul@181 | 57 | |
paul@181 | 58 | static struct et_list link = { 0, 0 }; |
paul@181 | 59 | |
paul@181 | 60 | void initialize_prof_error_table_r(struct et_list **list); |
paul@181 | 61 | void initialize_prof_error_table(void); |
paul@181 | 62 | |
paul@181 | 63 | void initialize_prof_error_table(void) { |
paul@181 | 64 | initialize_prof_error_table_r(&_et_list); |
paul@181 | 65 | } |
paul@181 | 66 | |
paul@181 | 67 | /* For Heimdal compatibility */ |
paul@181 | 68 | void initialize_prof_error_table_r(struct et_list **list) |
paul@181 | 69 | { |
paul@181 | 70 | struct et_list *et, **end; |
paul@181 | 71 | |
paul@181 | 72 | for (end = list, et = *list; et; end = &et->next, et = et->next) |
paul@181 | 73 | if (et->table->msgs == text) |
paul@181 | 74 | return; |
paul@181 | 75 | et = malloc(sizeof(struct et_list)); |
paul@181 | 76 | if (et == 0) { |
paul@181 | 77 | if (!link.table) |
paul@181 | 78 | et = &link; |
paul@181 | 79 | else |
paul@181 | 80 | return; |
paul@181 | 81 | } |
paul@181 | 82 | et->table = &et_prof_error_table; |
paul@181 | 83 | et->next = 0; |
paul@181 | 84 | *end = et; |
paul@181 | 85 | } |