1 | /* |
---|
2 | * Internal database interface. |
---|
3 | * |
---|
4 | * This file is generated by aisc_mkpt. |
---|
5 | * Any changes you make here will be overwritten later! |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #ifndef AD_LPRO_H |
---|
10 | #define AD_LPRO_H |
---|
11 | |
---|
12 | #ifndef P_ |
---|
13 | # error P_ is not defined |
---|
14 | #endif |
---|
15 | |
---|
16 | /* define ARB attributes: */ |
---|
17 | #ifndef ATTRIBUTES_H |
---|
18 | # include <attributes.h> |
---|
19 | #endif |
---|
20 | |
---|
21 | #ifdef __cplusplus |
---|
22 | extern "C" { |
---|
23 | #endif |
---|
24 | |
---|
25 | |
---|
26 | /* adlang1.c */ |
---|
27 | void gbl_install_standard_commands P_((GBDATA *gb_main)); |
---|
28 | |
---|
29 | /* adstring.c */ |
---|
30 | GB_ERROR gb_scan_directory P_((char *basename, struct gb_scandir *sd)) __ATTR__USERESULT; |
---|
31 | void gbs_uppercase P_((char *str)); |
---|
32 | void gbs_memcopy P_((char *dest, const char *source, long len)); |
---|
33 | char *gbs_malloc_copy P_((const char *source, long len)); |
---|
34 | char *gbs_add_path P_((char *path, char *name)); |
---|
35 | |
---|
36 | /* arbdb.c */ |
---|
37 | GB_ERROR gb_unfold P_((GBCONTAINER *gbd, long deep, int index_pos)); |
---|
38 | int gb_read_nr P_((GBDATA *gbd)); |
---|
39 | GB_ERROR gb_write_compressed_pntr P_((GBDATA *gbd, const char *s, long memsize, long stored_size)); |
---|
40 | int gb_get_compression_mask P_((GB_MAIN_TYPE *Main, GBQUARK key, int gb_type)); |
---|
41 | GB_ERROR gb_security_error P_((GBDATA *gbd)); |
---|
42 | GB_CSTR gb_read_key_pntr P_((GBDATA *gbd)); |
---|
43 | GBQUARK gb_key_2_quark P_((GB_MAIN_TYPE *Main, const char *s)); |
---|
44 | GBDATA *gb_create P_((GBDATA *father, const char *key, GB_TYPES type)); |
---|
45 | GBDATA *gb_create_container P_((GBDATA *father, const char *key)); |
---|
46 | void gb_rename P_((GBCONTAINER *gbc, const char *new_key)); |
---|
47 | GB_ERROR gb_delete_force P_((GBDATA *source)); |
---|
48 | GB_ERROR gb_set_compression P_((GBDATA *source)); |
---|
49 | GB_ERROR gb_init_transaction P_((GBCONTAINER *gbd)); |
---|
50 | GB_ERROR gb_add_changed_callback_list P_((GBDATA *gbd, struct gb_transaction_save *old, GB_CB_TYPE gbtype, GB_CB func, int *clientdata)); |
---|
51 | GB_ERROR gb_add_delete_callback_list P_((GBDATA *gbd, struct gb_transaction_save *old, GB_CB func, int *clientdata)); |
---|
52 | GB_ERROR gb_do_callback_list P_((GB_MAIN_TYPE *Main)); |
---|
53 | GB_MAIN_TYPE *gb_get_main_during_cb P_((void)); |
---|
54 | GBDATA *GB_get_gb_main_during_cb P_((void)); |
---|
55 | GB_CSTR gb_read_pntr_ts P_((GBDATA *gbd, struct gb_transaction_save *ts)); |
---|
56 | int gb_info P_((GBDATA *gbd, int deep)); |
---|
57 | |
---|
58 | /* ad_core.c */ |
---|
59 | void gb_touch_entry P_((GBDATA *gbd, GB_CHANGED val)); |
---|
60 | void gb_touch_header P_((GBCONTAINER *gbc)); |
---|
61 | void gb_untouch_children P_((GBCONTAINER *gbc)); |
---|
62 | void gb_untouch_me P_((GBDATA *gbc)); |
---|
63 | void gb_set_update_in_server_flags P_((GBCONTAINER *gbc)); |
---|
64 | void gb_create_header_array P_((GBCONTAINER *gbc, int size)); |
---|
65 | void gb_link_entry P_((GBCONTAINER *father, GBDATA *gbd, long index_pos)); |
---|
66 | void gb_unlink_entry P_((GBDATA *gbd)); |
---|
67 | void gb_create_extended P_((GBDATA *gbd)); |
---|
68 | struct gb_main_type *gb_make_gb_main_type P_((const char *path)); |
---|
69 | char *gb_destroy_main P_((struct gb_main_type *Main)); |
---|
70 | GBDATA *gb_make_pre_defined_entry P_((GBCONTAINER *father, GBDATA *gbd, long index_pos, GBQUARK keyq)); |
---|
71 | void gb_rename_entry P_((GBCONTAINER *gbc, const char *new_key)); |
---|
72 | GBDATA *gb_make_entry P_((GBCONTAINER *father, const char *key, long index_pos, GBQUARK keyq, GB_TYPES type)); |
---|
73 | GBCONTAINER *gb_make_pre_defined_container P_((GBCONTAINER *father, GBCONTAINER *gbd, long index_pos, GBQUARK keyq)); |
---|
74 | GBCONTAINER *gb_make_container P_((GBCONTAINER *father, const char *key, long index_pos, GBQUARK keyq)); |
---|
75 | void gb_pre_delete_entry P_((GBDATA *gbd)); |
---|
76 | void gb_delete_entry P_((GBDATA **gbd_ptr)); |
---|
77 | void gb_delete_main_entry P_((GBDATA **gbd_ptr)); |
---|
78 | struct gb_transaction_save *gb_new_gb_transaction_save P_((GBDATA *gbd)); |
---|
79 | void gb_add_ref_gb_transaction_save P_((struct gb_transaction_save *ts)); |
---|
80 | void gb_del_ref_gb_transaction_save P_((struct gb_transaction_save *ts)); |
---|
81 | void gb_del_ref_and_extern_gb_transaction_save P_((struct gb_transaction_save *ts)); |
---|
82 | void gb_abortdata P_((GBDATA *gbd)); |
---|
83 | void gb_save_extern_data_in_ts P_((GBDATA *gbd)); |
---|
84 | void gb_write_index_key P_((GBCONTAINER *father, long index, GBQUARK new_index)); |
---|
85 | void gb_write_key P_((GBDATA *gbd, const char *s)); |
---|
86 | void gb_create_key_array P_((GB_MAIN_TYPE *Main, int index)); |
---|
87 | long gb_create_key P_((GB_MAIN_TYPE *Main, const char *s, GB_BOOL create_gb_key)); |
---|
88 | void gb_free_all_keys P_((GB_MAIN_TYPE *Main)); |
---|
89 | char *gb_abort_entry P_((GBDATA *gbd)); |
---|
90 | int gb_abort_transaction_local_rek P_((GBDATA *gbd, long mode)); |
---|
91 | GB_ERROR gb_commit_transaction_local_rek P_((GBDATA *gbd, long mode, int *pson_created)); |
---|
92 | |
---|
93 | /* adoptimize.c */ |
---|
94 | GB_ERROR gb_convert_V2_to_V3 P_((GBDATA *gb_main)); |
---|
95 | char *gb_uncompress_by_dictionary P_((GBDATA *gbd, GB_CSTR s_source, long size, long *new_size)); |
---|
96 | char *gb_compress_by_dictionary P_((GB_DICTIONARY *dict, GB_CSTR s_source, long size, long *msize, int last_flag, int search_backward, int search_forward)); |
---|
97 | GB_ERROR gb_create_dictionaries P_((GB_MAIN_TYPE *Main, long maxmem)); |
---|
98 | |
---|
99 | /* adsystem.c */ |
---|
100 | GB_ERROR gb_load_dictionary_data P_((GBDATA *gb_main, const char *key, char **dict_data, long *size)); |
---|
101 | GB_DICTIONARY *gb_create_dict P_((GBDATA *gb_dict)); |
---|
102 | void delete_gb_dictionary P_((GB_DICTIONARY *dict)); |
---|
103 | void gb_system_key_changed_cb P_((GBDATA *gbd, int *cl, GB_CB_TYPE type)); |
---|
104 | void gb_system_master_changed_cb P_((GBDATA *gbd, int *cl, GB_CB_TYPE type)); |
---|
105 | void gb_load_single_key_data P_((GBDATA *gb_main, GBQUARK q)); |
---|
106 | GB_ERROR gb_save_dictionary_data P_((GBDATA *gb_main, const char *key, const char *dict, int size)); |
---|
107 | GB_ERROR gb_load_key_data_and_dictionaries P_((GBDATA *gb_main)); |
---|
108 | |
---|
109 | /* adindex.c */ |
---|
110 | char *gb_index_check_in P_((GBDATA *gbd)); |
---|
111 | void gb_index_check_out P_((GBDATA *gbd)); |
---|
112 | GBDATA *gb_index_find P_((GBCONTAINER *gbf, struct gb_index_files_struct *ifs, GBQUARK quark, const char *val, GB_CASE case_sens, int after_index)); |
---|
113 | char *gb_set_undo_type P_((GBDATA *gb_main, GB_UNDO_TYPE type)); |
---|
114 | void gb_init_undo_stack P_((struct gb_main_type *Main)); |
---|
115 | void gb_free_undo_stack P_((struct gb_main_type *Main)); |
---|
116 | char *gb_set_undo_sync P_((GBDATA *gb_main)); |
---|
117 | char *gb_free_all_undos P_((GBDATA *gb_main)); |
---|
118 | char *gb_disable_undo P_((GBDATA *gb_main)); |
---|
119 | void gb_check_in_undo_create P_((GB_MAIN_TYPE *Main, GBDATA *gbd)); |
---|
120 | void gb_check_in_undo_modify P_((GB_MAIN_TYPE *Main, GBDATA *gbd)); |
---|
121 | void gb_check_in_undo_delete P_((GB_MAIN_TYPE *Main, GBDATA *gbd, int deep)); |
---|
122 | |
---|
123 | /* adperl.c */ |
---|
124 | GB_TYPES GBP_gb_types P_((char *type_name)); |
---|
125 | |
---|
126 | /* adsocket.c */ |
---|
127 | GB_ERROR gbcm_test_address P_((long *address, long key)); |
---|
128 | long gbcm_test_address_end P_((void)); |
---|
129 | void *gbcms_sigpipe P_((void)); |
---|
130 | void gbcm_read_flush P_((int socket)); |
---|
131 | long gbcm_read_buffered P_((int socket, char *ptr, long size)); |
---|
132 | long gbcm_read P_((int socket, char *ptr, long size)); |
---|
133 | int gbcm_write_flush P_((int socket)); |
---|
134 | int gbcm_write P_((int socket, const char *ptr, long size)); |
---|
135 | void *gbcm_sigio P_((void)); |
---|
136 | GB_ERROR gbcm_get_m_id P_((const char *path, char **m_name, long *id)); |
---|
137 | GB_ERROR gbcm_open_socket P_((const char *path, long delay2, long do_connect, int *psocket, char **unix_name)); |
---|
138 | long gbcms_close P_((struct gbcmc_comm *link)); |
---|
139 | struct gbcmc_comm *gbcmc_open P_((const char *path)); |
---|
140 | long gbcm_write_two P_((int socket, long a, long c)); |
---|
141 | long gbcm_read_two P_((int socket, long a, long *b, long *c)); |
---|
142 | long gbcm_write_string P_((int socket, const char *key)); |
---|
143 | char *gbcm_read_string P_((int socket)); |
---|
144 | long gbcm_write_long P_((int socket, long data)); |
---|
145 | long gbcm_read_long P_((int socket)); |
---|
146 | |
---|
147 | /* adcomm.c */ |
---|
148 | void *gbcms_sighup P_((void)); |
---|
149 | void gbcms_shift_delete_list P_((void *hsi, void *soi)); |
---|
150 | int gbcms_write_deleted P_((int socket, GBDATA *gbd, long hsin, long client_clock, long *buffer)); |
---|
151 | int gbcms_write_updated P_((int socket, GBDATA *gbd, long hsin, long client_clock, long *buffer)); |
---|
152 | int gbcms_write_keys P_((int socket, GBDATA *gbd)); |
---|
153 | int gbcms_talking_unfold P_((int socket, long *hsin, void *sin, GBDATA *gb_in)); |
---|
154 | int gbcms_talking_get_update P_((int socket, long *hsin, void *sin, GBDATA *gbd)); |
---|
155 | int gbcms_talking_put_update P_((int socket, long *hsin, void *sin, GBDATA *gbd_dummy)); |
---|
156 | int gbcms_talking_updated P_((int socket, long *hsin, void *sin, GBDATA *gbd)); |
---|
157 | int gbcms_talking_init_transaction P_((int socket, long *hsin, void *sin, GBDATA *gb_dummy)); |
---|
158 | int gbcms_talking_begin_transaction P_((int socket, long *hsin, void *sin, long client_clock)); |
---|
159 | int gbcms_talking_commit_transaction P_((int socket, long *hsin, void *sin, GBDATA *gbd)); |
---|
160 | int gbcms_talking_abort_transaction P_((int socket, long *hsin, void *sin, GBDATA *gbd)); |
---|
161 | int gbcms_talking_close P_((int socket, long *hsin, void *sin, GBDATA *gbd)); |
---|
162 | int gbcms_talking_system P_((int socket, long *hsin, void *sin, GBDATA *gbd)); |
---|
163 | int gbcms_talking_undo P_((int socket, long *hsin, void *sin, GBDATA *gbd)); |
---|
164 | int gbcms_talking_find P_((int socket, long *hsin, void *sin, GBDATA *gbd)); |
---|
165 | int gbcms_talking_key_alloc P_((int socket, long *hsin, void *sin, GBDATA *gbd)); |
---|
166 | int gbcms_talking_disable_wait_for_new_request P_((int socket, long *hsin, void *sin, GBDATA *gbd)); |
---|
167 | int gbcms_talking P_((int con, long *hs, void *sin)); |
---|
168 | GB_ERROR gbcm_write_bin P_((int socket, GBDATA *gbd, long *buffer, long mode, long deep, int send_headera)); |
---|
169 | long gbcm_read_bin P_((int socket, GBCONTAINER *gbd, long *buffer, long mode, GBDATA *gb_source, void *cs_main)); |
---|
170 | GB_ERROR gbcm_unfold_client P_((GBCONTAINER *gbd, long deep, long index_pos)); |
---|
171 | GB_ERROR gbcmc_begin_sendupdate P_((GBDATA *gbd)); |
---|
172 | GB_ERROR gbcmc_end_sendupdate P_((GBDATA *gbd)); |
---|
173 | GB_ERROR gbcmc_sendupdate_create P_((GBDATA *gbd)); |
---|
174 | GB_ERROR gbcmc_sendupdate_delete P_((GBDATA *gbd)); |
---|
175 | GB_ERROR gbcmc_sendupdate_update P_((GBDATA *gbd, int send_headera)); |
---|
176 | GB_ERROR gbcmc_read_keys P_((int socket, GBDATA *gbd)); |
---|
177 | GB_ERROR gbcmc_begin_transaction P_((GBDATA *gbd)); |
---|
178 | GB_ERROR gbcmc_init_transaction P_((GBCONTAINER *gbd)); |
---|
179 | GB_ERROR gbcmc_commit_transaction P_((GBDATA *gbd)); |
---|
180 | GB_ERROR gbcmc_abort_transaction P_((GBDATA *gbd)); |
---|
181 | GB_ERROR gbcms_add_to_delete_list P_((GBDATA *gbd)); |
---|
182 | GB_ERROR gbcmc_unfold_list P_((int socket, GBDATA *gbd)); |
---|
183 | long gbcmc_key_alloc P_((GBDATA *gbd, const char *key)); |
---|
184 | GB_ERROR gbcmc_send_undo_commands P_((GBDATA *gbd, enum gb_undo_commands command)); |
---|
185 | char *gbcmc_send_undo_info_commands P_((GBDATA *gbd, enum gb_undo_commands command)); |
---|
186 | GB_ERROR gbcm_login P_((GBCONTAINER *gb_main, const char *user)); |
---|
187 | long gbcmc_close P_((struct gbcmc_comm *link)); |
---|
188 | GB_ERROR gbcm_logout P_((GBCONTAINER *gb_main, char *user)); |
---|
189 | |
---|
190 | /* adhash.c */ |
---|
191 | long gbs_hashi_index P_((long key, long size)); |
---|
192 | void gb_init_cache P_((GB_MAIN_TYPE *Main)); |
---|
193 | char *gb_read_cache P_((GBDATA *gbd)); |
---|
194 | void *gb_free_cache P_((GB_MAIN_TYPE *Main, GBDATA *gbd)); |
---|
195 | char *gb_flush_cache P_((GBDATA *gbd)); |
---|
196 | char *gb_alloc_cache_index P_((GBDATA *gbd, long size)); |
---|
197 | |
---|
198 | /* adquery.c */ |
---|
199 | GBDATA *gb_find_by_nr P_((GBDATA *father, int index)); |
---|
200 | void gb_init_ctype_table P_((void)); |
---|
201 | GBDATA *gb_search P_((GBDATA *gbd, const char *str, GB_TYPES create, int internflag)); |
---|
202 | GBDATA *gb_search_marked P_((GBCONTAINER *gbc, GBQUARK key_quark, int firstindex)); |
---|
203 | void gb_install_command_table P_((GBDATA *gb_main, struct GBL_command_table *table)); |
---|
204 | char *gbs_search_second_x P_((const char *str)); |
---|
205 | char *gbs_search_second_bracket P_((const char *source)); |
---|
206 | char *gbs_search_next_seperator P_((const char *source, const char *seps)); |
---|
207 | |
---|
208 | /* ad_save_load.c */ |
---|
209 | char *gb_findExtension P_((char *path)); |
---|
210 | GB_CSTR gb_oldQuicksaveName P_((GB_CSTR path, int nr)); |
---|
211 | GB_CSTR gb_quicksaveName P_((GB_CSTR path, int nr)); |
---|
212 | GB_CSTR gb_mapfile_name P_((GB_CSTR path)); |
---|
213 | GB_CSTR gb_overwriteName P_((GB_CSTR path)); |
---|
214 | GB_CSTR gb_reffile_name P_((GB_CSTR path)); |
---|
215 | GB_ERROR gb_delete_reference P_((const char *master)); |
---|
216 | GB_ERROR gb_create_reference P_((const char *master)); |
---|
217 | GB_ERROR gb_add_reference P_((char *master, char *changes)); |
---|
218 | GB_ERROR gb_remove_all_but_main P_((GB_MAIN_TYPE *Main, const char *path)); |
---|
219 | long gb_ascii_2_bin P_((const char *source, GBDATA *gbd)); |
---|
220 | GB_BUFFER gb_bin_2_ascii P_((GBDATA *gbd)); |
---|
221 | long gb_test_sub P_((GBDATA *gbd)); |
---|
222 | long gb_read_in_long P_((FILE *in, long reversed)); |
---|
223 | long gb_read_number P_((FILE *in)); |
---|
224 | void gb_put_number P_((long i, FILE *out)); |
---|
225 | long gb_read_bin_error P_((FILE *in, GBDATA *gbd, const char *text)); |
---|
226 | long gb_write_out_long P_((long data, FILE *out)); |
---|
227 | int gb_is_writeable P_((struct gb_header_list_struct *header, GBDATA *gbd, long version, long diff_save)); |
---|
228 | int gb_write_bin_sub_containers P_((FILE *out, GBCONTAINER *gbc, long version, long diff_save, int is_root)); |
---|
229 | long gb_write_bin_rek P_((FILE *out, GBDATA *gbd, long version, long diff_save, long index_of_master_file)); |
---|
230 | int gb_write_bin P_((FILE *out, GBDATA *gbd, long version)); |
---|
231 | char *gb_full_path P_((const char *path)); |
---|
232 | GB_ERROR gb_check_saveable P_((GBDATA *gbd, const char *path, const char *flags)); |
---|
233 | |
---|
234 | /* adcompr.c */ |
---|
235 | struct gb_compress_tree *gb_build_uncompress_tree P_((const unsigned char *data, long short_flag, char **end)); |
---|
236 | void gb_free_compress_tree P_((struct gb_compress_tree *tree)); |
---|
237 | struct gb_compress_list *gb_build_compress_list P_((const unsigned char *data, long short_flag, long *size)); |
---|
238 | char *gb_compress_bits P_((const char *source, long size, const unsigned char *c_0, long *msize)); |
---|
239 | GB_BUFFER gb_uncompress_bits P_((const char *source, long size, char c_0, char c_1)); |
---|
240 | void gb_compress_equal_bytes_2 P_((const char *source, long size, long *msize, char *dest)); |
---|
241 | GB_BUFFER gb_compress_equal_bytes P_((const char *source, long size, long *msize, int last_flag)); |
---|
242 | void gb_compress_huffmann_add_to_list P_((long val, struct gb_compress_list *element)); |
---|
243 | long gb_compress_huffmann_pop P_((long *val, struct gb_compress_list **element)); |
---|
244 | char *gb_compress_huffmann_rek P_((struct gb_compress_list *bc, int bits, int bitcnt, char *dest)); |
---|
245 | GB_BUFFER gb_compress_huffmann P_((GB_CBUFFER source, long size, long *msize, int last_flag)); |
---|
246 | GB_BUFFER gb_uncompress_bytes P_((GB_CBUFFER source, long size, long *new_size)); |
---|
247 | GB_BUFFER gb_uncompress_longs_old P_((GB_CBUFFER source, long size, long *new_size)); |
---|
248 | GB_BUFFER gb_compress_longs P_((GB_CBUFFER source, long size, int last_flag)); |
---|
249 | GB_DICTIONARY *gb_get_dictionary P_((GB_MAIN_TYPE *Main, GBQUARK key)); |
---|
250 | GB_BUFFER gb_compress_data P_((GBDATA *gbd, int key, GB_CBUFFER source, long size, long *msize, GB_COMPRESSION_MASK max_compr, GB_BOOL pre_compressed)); |
---|
251 | GB_CBUFFER gb_uncompress_data P_((GBDATA *gbd, GB_CBUFFER source, long size)); |
---|
252 | |
---|
253 | /* admalloc.c */ |
---|
254 | void gbm_init_mem P_((void)); |
---|
255 | void gbm_put_memblk P_((char *memblk, size_t size)); |
---|
256 | char *gbm_get_mem P_((size_t size, long index)); |
---|
257 | void gbm_free_mem P_((char *data, size_t size, long index)); |
---|
258 | void gbm_debug_mem P_((GB_MAIN_TYPE *Main)); |
---|
259 | |
---|
260 | /* ad_load.c */ |
---|
261 | GB_ERROR gb_read_ascii P_((const char *path, GBCONTAINER *gbd)); |
---|
262 | long gb_read_bin_rek P_((FILE *in, GBCONTAINER *gbd, long nitems, long version, long reversed)); |
---|
263 | long gb_recover_corrupt_file P_((GBCONTAINER *gbd, FILE *in, GB_ERROR recovery_reason)); |
---|
264 | long gb_read_bin_rek_V2 P_((FILE *in, GBCONTAINER *gbd, long nitems, long version, long reversed, long deep)); |
---|
265 | GBDATA *gb_search_system_folder_rek P_((GBDATA *gbd)); |
---|
266 | void gb_search_system_folder P_((GBDATA *gb_main)); |
---|
267 | long gb_read_bin P_((FILE *in, GBCONTAINER *gbd, int diff_file_allowed)); |
---|
268 | GB_MAIN_IDX gb_make_main_idx P_((GB_MAIN_TYPE *Main)); |
---|
269 | GB_ERROR gb_login_remote P_((struct gb_main_type *gb_main, const char *path, const char *opent)); |
---|
270 | |
---|
271 | /* admap.c */ |
---|
272 | int gb_save_mapfile P_((GB_MAIN_TYPE *Main, GB_CSTR path)); |
---|
273 | int gb_is_valid_mapfile P_((const char *path, struct gb_map_header *mheader, int verbose)); |
---|
274 | GBDATA *gb_map_mapfile P_((const char *path)); |
---|
275 | int gb_isMappedMemory P_((char *mem)); |
---|
276 | |
---|
277 | /* adTest.c */ |
---|
278 | void gb_testDB P_((GBDATA *gbd)); |
---|
279 | |
---|
280 | #ifdef __cplusplus |
---|
281 | } |
---|
282 | #endif |
---|
283 | |
---|
284 | #else |
---|
285 | #error ad_lpro.h included twice |
---|
286 | #endif /* AD_LPRO_H */ |
---|