File indexing completed on 2025-01-18 10:02:04
0001 #ifndef MAD_NAME_H
0002 #define MAD_NAME_H
0003
0004
0005
0006 struct name_list;
0007 struct double_array;
0008
0009 struct name_list
0010 {
0011 char name[NAME_L];
0012 int max,
0013 curr;
0014 int* index;
0015 int* inform;
0016 int stamp;
0017 const char** names;
0018 };
0019
0020 struct vector_list
0021 {
0022 int curr, max;
0023 struct name_list* names;
0024 struct double_array** vectors;
0025 };
0026
0027
0028
0029 char* get_new_name(void);
0030
0031 int name_list_pos(const char* p, struct name_list* vlist);
0032
0033 struct name_list* new_name_list(const char* list_name, int length);
0034 struct name_list* clone_name_list(struct name_list*);
0035 struct name_list* delete_name_list(struct name_list*);
0036 void dump_name_list(struct name_list*);
0037 void copy_name_list(struct name_list* out, struct name_list* in);
0038 void grow_name_list(struct name_list*);
0039 int add_to_name_list(const char* name, int inf, struct name_list*);
0040 int remove_from_name_list(const char* name, struct name_list* nl);
0041
0042 struct vector_list* new_vector_list(int length);
0043 struct vector_list* delete_vector_list(struct vector_list*);
0044 void grow_vector_list(struct vector_list*);
0045
0046 #if 0
0047 #define add_to_name_list(name, inf, list) \
0048 ((void)(fprintf(stderr, "**** calling add_to_name_list name=%s, %s:%d\n", (name), __FILE__, __LINE__)), \
0049 add_to_name_list(name, inf, list))
0050 #endif
0051
0052 #if 0
0053 #define name_list_pos(var, list) \
0054 ((void)(fprintf(stderr, "**** calling name_list_pos name=%s, list=%s from %s:%d\n", \
0055 (var), (list)?(list)->name:"null", __FILE__, __LINE__)), \
0056 name_list_pos(var, list))
0057 #endif
0058
0059 #endif
0060