00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _GDSL_TYPES_H_
00027 #define _GDSL_TYPES_H_
00028
00029
00030 #include <stdio.h>
00031
00032
00033 #ifdef __cplusplus
00034 extern "C"
00035 {
00036 #endif
00037
00038
00048 typedef enum
00049 {
00051 GDSL_ERR_MEM_ALLOC = -1,
00052
00054 GDSL_MAP_STOP = 0,
00055
00057 GDSL_MAP_CONT = 1,
00058
00060 GDSL_INSERTED,
00061
00063 GDSL_FOUND
00064
00065 } gdsl_constant_t;
00066
00069 typedef enum
00070 {
00072 GDSL_LOCATION_UNDEF = 0,
00073
00075
00076 GDSL_LOCATION_HEAD = 1,
00077
00079
00080 GDSL_LOCATION_ROOT = 1,
00081
00083
00084 GDSL_LOCATION_TOP = 1,
00085
00087
00088 GDSL_LOCATION_TAIL = 2,
00089
00091
00092 GDSL_LOCATION_LEAF = 2,
00093
00095
00096 GDSL_LOCATION_BOTTOM = 2,
00097
00099
00100 GDSL_LOCATION_FIRST = 1,
00101
00103
00104 GDSL_LOCATION_LAST = 2,
00105
00107
00108 GDSL_LOCATION_FIRST_COL = 1,
00109
00111
00112 GDSL_LOCATION_LAST_COL = 2,
00113
00115
00116 GDSL_LOCATION_FIRST_ROW = 4,
00117
00119
00120 GDSL_LOCATION_LAST_ROW = 8
00121
00122 } gdsl_location_t;
00123
00130 typedef void* gdsl_element_t;
00131
00143 typedef gdsl_element_t
00144 (* gdsl_alloc_func_t) (void* USER_DATA
00145 );
00146
00161 typedef void
00162 (* gdsl_free_func_t) (gdsl_element_t E
00163 );
00164
00174 typedef gdsl_element_t
00175 (* gdsl_copy_func_t) (const gdsl_element_t E
00176 );
00177
00191 typedef int
00192 (* gdsl_map_func_t) (const gdsl_element_t E,
00193 gdsl_location_t LOCATION,
00194 void* USER_DATA
00195 );
00196
00212 typedef long int
00213 (* gdsl_compare_func_t) (const gdsl_element_t E,
00214 void* VALUE
00215 );
00216
00228 typedef void
00229 (* gdsl_write_func_t) (const gdsl_element_t E,
00230 FILE* OUTPUT_FILE,
00231 gdsl_location_t LOCATION,
00232 void* USER_DATA
00233 );
00234
00235
00236 #ifndef WITHOUT_GDSL_TYPES
00237
00238
00239 #include <sys/types.h>
00240
00241
00242 #ifndef HAVE_LINUX
00243
00244
00245 #ifndef _SYS_TYPES_H
00246 typedef unsigned long int ulong;
00247 #endif
00248
00249
00250 #endif
00251
00252
00253 #ifndef __cplusplus
00254
00255 #ifdef TRUE
00256 #undef TRUE
00257 #endif
00258
00259 #ifdef FALSE
00260 #undef FALSE
00261 #endif
00262
00263 #ifdef bool
00264 #undef bool
00265 #endif
00266
00271 typedef enum
00272 {
00274 FALSE = 0,
00275
00277 TRUE = 1
00278 } bool;
00279
00280 #endif
00281
00282 #endif
00283
00284
00285
00286
00287
00288
00289
00290 #ifdef __cplusplus
00291 }
00292 #endif
00293
00294
00295 #endif
00296
00297