1 #ifndef WIZLIST_H__ 2 #define WIZLIST_H__ 1 3 4 #include "driver.h" 5 #include "svalue.h" 6 7 /* --- Types --- 8 */ 9 10 struct wiz_list_s 11 { 12 wiz_list_t *next; /* Next entry in list */ 13 string_t *name; /* Name of this wizard (shared string), 14 * NULL for the default entry */ 15 int32 score; /* Number of actions executed by t.w. objects */ 16 int32 cost; /* Weighted evalticks spent on this wizards 17 * objects */ 18 int32 gigacost; 19 int32 total_cost; /* Total Evalticks spent on this wizards objects */ 20 int32 total_gigacost; 21 int32 heart_beats; /* Number of heart_beat() calls */ 22 mp_int size_array; /* Total size of this wizards arrays. */ 23 mp_int mapping_total; /* Total size of this wizards mappings */ 24 #ifdef USE_STRUCTS 25 mp_int struct_total ; /* Total size of this wizards structs */ 26 #endif 27 svalue_t extra; /* Extra information for this wizard */ 28 int32 last_call_out; /* Time of the last call_out() */ 29 int32 call_out_cost; /* Collected cost of call_outs for this time */ 30 31 /* The following values are all used to store the last error 32 * message. 33 */ 34 string_t *file_name; /* Untabled: the object's filename */ 35 string_t *error_message; /* Untabled: the error message */ 36 int32 line_number; /* The line number. Bit 30 is the forget-flag */ 37 }; 38 39 /* --- Variables --- */ 40 41 extern wiz_list_t *all_wiz; 42 extern wiz_list_t default_wizlist_entry; 43 extern char wizlist_name[]; 44 45 /* --- Prototypes --- */ 46 47 extern void name_wizlist_file (const char *name); 48 extern size_t wiz_list_size (void); 49 extern wiz_list_t *add_name(string_t *str); 50 extern void wiz_decay(void); 51 extern void load_wiz_file(void); 52 extern void remove_wiz_list(void); 53 extern void save_error(const char *msg, const char *file, int line); 54 extern void check_wizlist_for_destr(void); 55 extern svalue_t *f_get_error_file(svalue_t *sp); 56 extern svalue_t *f_wizlist_info(svalue_t *sp); 57 extern svalue_t *f_set_extra_wizinfo(svalue_t *sp); 58 extern svalue_t *f_get_extra_wizinfo(svalue_t *sp); 59 extern svalue_t *f_set_extra_wizinfo_size(svalue_t *sp); 60 61 #ifdef GC_SUPPORT 62 extern void clear_ref_from_wiz_list(void); 63 extern void count_ref_from_wiz_list(void); 64 #endif /* GC_SUPPORT */ 65 66 #ifdef DEBUG 67 extern void count_extra_ref_from_wiz_list(void); 68 #endif 69 70 #endif /* WIZLIST_H__ */ 71