|
Data Structures |
| struct | util_int_array_t |
| | Struct to represent int-arrays. More...
|
| struct | util_byte_array_t |
| | Struct to represent byte-array. More...
|
| struct | util_attrib_val_t |
| | Attribute-value pair used to read formula. More...
|
Defines |
| #define | util_assert(x) |
| #define | fail(why) |
| #define | NIL(type) ((type *) 0) |
| #define | ALLOC(type, num) ((type *) MMalloc((long) sizeof(type) * (long) (num))) |
| | Allocates 'number' objects of type 'type'.
|
| #define | REALLOC(type, obj, num) ((type *) MMrealloc((char *) (obj), (long) sizeof(type) * (long) (num))) |
| | Re-allocate 'obj' to hold 'number' objects of type 'type'.
|
| #define | USE __attribute__((unused)) |
| | Macro to make an unused variable look like it's used.
|
| #define | EXTERN extern |
| #define | ABS(a) ((a) < 0 ? -(a) : (a)) |
| #define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
| #define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
| #define | HUGE 8.9884656743115790e+307 |
| #define | HUGE_VAL HUGE |
| #define | MAXINT (1 << 30) |
Typedefs |
| typedef util_int_array_t | util_int_array_t |
| typedef util_byte_array_t | util_byte_array_t |
| typedef util_attrib_val_t | util_attrib_val_t |
Enumerations |
| enum | Util_FileOpenMode_t { Util_FileOverWrite_c,
Util_FileAppend_c
} |
| | Types of modes in which to open files. More...
|
Functions |
| void | MMout_of_memory (int) |
| char * | MMalloc (int) |
| | Safe malloc.
|
| char * | MMrealloc (char *, int) |
| | Safe realloc.
|
| void | MMfree (char *) |
| | Safe free.
|
| void | util_print_cpu_stats (FILE *) |
| void | util_getopt_reset (void) |
| int | util_getopt (int, char **, char *) |
| char * | util_path_search (char *) |
| char * | util_file_search (char *, char *, char *) |
| int | util_save_image (char *, char *) |
| int | strstrN (char *, char *, int) |
| char * | util_strsav (char *) |
| char * | util_strchr_N (char *, char, int) |
| int | util_strequal (char *, char *) |
| char * | util_strmax (char *, char *) |
| char * | util_strmin (char *, char *) |
| int | util_strequalN (char *, char *, int) |
| char * | util_strcat (char *, char *) |
| char * | util_strcat3 (char *, char *, char *) |
| char * | util_strcat5 (char *, char *, char *, char *, char *) |
| char * | util_sgets (array_t *, char *) |
| char * | util_file_to_string (FILE *) |
| array_t * | util_process_file (char *) |
| array_t * | util_get_raw_rules (char *) |
| char * | util_get_full_line (array_t *, char *) |
| util_byte_array_t * | util_byte_array_join (util_byte_array_t *, util_byte_array_t *) |
| int | util_byte_array_free (util_byte_array_t *) |
| int | util_byte_array_print (util_byte_array_t *) |
| int | util_byte_array_hash (char *, int) |
| u_int32_t | util_fast_hash (const char *, int) |
| int | util_byte_array_cmp (char *, char *) |
| util_byte_array_t * | util_byte_array_create (char *, int) |
| util_byte_array_t * | util_byte_array_to_lower_case (util_byte_array_t *) |
| int | util_int_array_print (util_int_array_t *) |
| int | util_int_array_free (util_int_array_t *) |
| util_int_array_t * | util_int_array_create (int) |
| util_int_array_t * | util_arrayT_to_int_array (array_t *) |
| util_int_array_t * | var_set_to_int_array (var_set_t *) |
| double | util_unit_rand () |
| int | util_rand_int () |
| void | util_set_processor_frequency () |
| void | util_time (char *) |
| u_int32_t | util_time_to_ticks (double) |
| | Convert time in seconds to machine ticks; use in conjunction with rdtsc-type instructions.
|
| array_t * | util_time_stamp_init (int) |
| void | util_time_stamp_set (array_t *, int) |
| void | util_time_stamp_print (array_t *) |
| int | Perf_CheckHardware (ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
| | Routine to determine machine dependent parameters.
|
| int | Perf_TimePerf (ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
| int | Perf_TimePerf2 (ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
| int | Perf_SpacePerf (ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
| int | Perf_CheckTimingCode (ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) |
| | Testing the resolution of the rdtsc timing code.
|
Variables |
| char * | util_optarg |
| #define USE __attribute__((unused)) |
Macro to make an unused variable look like it's used.
Program checkers issue warnings about variables that are declared but never used. Most of the time, such variables should be removed to simplify the code. However, on occasion we want to keep such variables, but we don't want program checkers to complain about them. Using this macro will make an unused variable look like it's being used. This macro is straight out of the gcc documentation, Chapter 5 GCC 3.4.1.
Usage: put USE immediately after the variable gcc -Wall complains about
Example: int foo USE;
Definition at line 95 of file util.h.