File: export_gate_virtuoso.c

package info (click to toggle)
virtuoso-opensource 6.1.4%2Bdfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 245,116 kB
  • sloc: ansic: 639,631; sql: 439,225; xml: 287,085; java: 61,048; sh: 38,723; cpp: 36,889; cs: 25,240; php: 12,562; yacc: 9,036; lex: 7,149; makefile: 6,093; jsp: 4,447; awk: 1,643; perl: 1,017; ruby: 1,003; python: 329
file content (314 lines) | stat: -rw-r--r-- 13,751 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
/* This file is automatically generated by plugin/gen_gate.sh */
#define EXPORT_GATE
#include "exe_export.h"
#include <string.h>

/* First we should include all imported header files to declare names of
   all exported functions */
#include "../Dk.h"
#include "../Dk/Dkalloc.h"
#include "../Dk/Dkbox.h"
#include "../Dk/Dkhash.h"
#include "../Dk/Dksession.h"
#include "../Dk/Dkernel.h"
#include "../Dk/Dkhashext.h"
#include "../Dk/Dksets.h"
#include "../Thread/Dkthread.h"
#include "../Wi/wi.h"
#include "../Wi/sqlnode.h"
#include "../Wi/sqlfn.h"
#include "../Wi/eqlcomp.h"
#include "../Wi/lisprdr.h"
#include "../Wi/sqlpar.h"
#include "../Wi/sqlcmps.h"
#include "../Wi/sqlintrp.h"
#include "../Wi/sqlbif.h"
#include "../Wi/widd.h"
#include "../Wi/arith.h"
#include "../Wi/security.h"
#include "../Wi/sqlpfn.h"
#include "../Wi/date.h"
#include "../Wi/datesupp.h"
#include "../Wi/multibyte.h"
#include "../Wi/srvmultibyte.h"
#include "../Wi/bif_xper.h"
#include "../libutil.h"
#include "../Wi/http.h"
#include "../Wi/xmltree.h"
#include "../Wi/sqlofn.h"
#include "../Wi/statuslog.h"
#include "../Wi/bif_text.h"
#include "../Xml.new/xmlparser.h"
#include "../Wi/xmltree.h"
#include "../Wi/sql3.h"
#include "../Wi/repl.h"
#include "../Wi/replsr.h"
#include "../Tidy/html.h"
#include "../langfunc/langfunc.h"
#include "../Wi/wifn.h"
#include "../Wi/sqlfn.h"
#include "../Wi/ltrx.h"
#include "../Wi/2pc.h"
#include "gate_virtuoso_stubs.h"

/* Now we should declare dictionary array with one item per one exported
   function. At connection time, executable will fill _gate structures
   of plugins with data from this table. */

struct _gate_export_item_s { void *_ptr; const char *_name; };
typedef struct _gate_export_item_s _gate_export_item_t;

extern _gate_export_item_t _gate_export_data[];

int _gate_export (_gate_export_item_t *tgt)
{
  int err = 0;
  _gate_export_item_t *src = _gate_export_data;
  for (/* no init */; '.' != tgt->_name[0]; tgt++)
    {
      err = -1;
      for (/* no init */; '.' != src->_name[0]; src++)
	{
	  if (strcmp (src->_name, tgt->_name))
	    continue;
	  tgt->_ptr = src->_ptr;
	  err = 0;
	  break;
	}
      if (err)
        break;
    }
  return err;
}

_gate_export_item_t _gate_export_data[] = {
  { &DoSQLError, "DoSQLError" },
  { &PrpcSessionFree, "PrpcSessionFree" },
  { &bif_arg, "bif_arg" },
  { &bif_arg_unrdf, "bif_arg_unrdf" },
  { &bif_array_arg, "bif_array_arg" },
  { &bif_array_of_pointer_arg, "bif_array_of_pointer_arg" },
  { &bif_array_or_null_arg, "bif_array_or_null_arg" },
  { &bif_bin_arg, "bif_bin_arg" },
  { &bif_date_arg, "bif_date_arg" },
  { &bif_define, "bif_define" },
  { &bif_define_typed, "bif_define_typed" },
  { &bif_dict_iterator_arg, "bif_dict_iterator_arg" },
  { &bif_dict_iterator_or_null_arg, "bif_dict_iterator_or_null_arg" },
  { &bif_double_arg, "bif_double_arg" },
  { &bif_entity_arg, "bif_entity_arg" },
  { &bif_find, "bif_find" },
  { &bif_float_arg, "bif_float_arg" },
  { &bif_iri_id_arg, "bif_iri_id_arg" },
  { &bif_iri_id_or_null_arg, "bif_iri_id_or_null_arg" },
  { &bif_long_arg, "bif_long_arg" },
  { &bif_long_low_range_arg, "bif_long_low_range_arg" },
  { &bif_long_or_char_arg, "bif_long_or_char_arg" },
  { &bif_long_or_null_arg, "bif_long_or_null_arg" },
  { &bif_long_range_arg, "bif_long_range_arg" },
  { &bif_result_inside_bif, "bif_result_inside_bif" },
  { &bif_result_names, "bif_result_names" },
  { &bif_set_uses_index, "bif_set_uses_index" },
  { &bif_strict_2type_array_arg, "bif_strict_2type_array_arg" },
  { &bif_strict_array_or_null_arg, "bif_strict_array_or_null_arg" },
  { &bif_strict_type_array_arg, "bif_strict_type_array_arg" },
  { &bif_string_arg, "bif_string_arg" },
  { &bif_string_or_null_arg, "bif_string_or_null_arg" },
  { &bif_string_or_uname_arg, "bif_string_or_uname_arg" },
  { &bif_string_or_uname_or_iri_id_arg, "bif_string_or_uname_or_iri_id_arg" },
  { &bif_string_or_uname_or_wide_or_null_arg, "bif_string_or_uname_or_wide_or_null_arg" },
  { &bif_string_or_wide_or_null_arg, "bif_string_or_wide_or_null_arg" },
  { &bif_string_or_wide_or_null_or_strses_arg, "bif_string_or_wide_or_null_or_strses_arg" },
  { &bif_string_or_wide_or_uname_arg, "bif_string_or_wide_or_uname_arg" },
  { &bif_strses_arg, "bif_strses_arg" },
  { &bif_strses_or_http_ses_arg, "bif_strses_or_http_ses_arg" },
  { &bif_tree_ent_arg, "bif_tree_ent_arg" },
  { &bif_uses_index, "bif_uses_index" },
  { &bif_varchar_or_bin_arg, "bif_varchar_or_bin_arg" },
  { &box_cast, "box_cast" },
  { &box_copy, "box_copy" },
  { &box_copy_tree, "box_copy_tree" },
  { &box_double, "box_double" },
  { &box_dv_short_concat, "box_dv_short_concat" },
  { &box_dv_short_nchars, "box_dv_short_nchars" },
  { &box_dv_short_nchars_reuse, "box_dv_short_nchars_reuse" },
  { &box_dv_short_strconcat, "box_dv_short_strconcat" },
  { &box_dv_short_string, "box_dv_short_string" },
  { &box_dv_short_substr, "box_dv_short_substr" },
  { &box_dv_ubuf, "box_dv_ubuf" },
  { &box_dv_uname_from_ubuf, "box_dv_uname_from_ubuf" },
  { &box_dv_uname_nchars, "box_dv_uname_nchars" },
  { &box_dv_uname_string, "box_dv_uname_string" },
  { &box_dv_uname_substr, "box_dv_uname_substr" },
  { &box_equal, "box_equal" },
  { &box_find_mt_unsafe_subtree, "box_find_mt_unsafe_subtree" },
  { &box_float, "box_float" },
  { &box_make_tree_mt_safe, "box_make_tree_mt_safe" },
  { &box_num, "box_num" },
  { &box_num_nonull, "box_num_nonull" },
  { &box_sprintf, "box_sprintf" },
  { &box_string, "box_string" },
  { &box_vsprintf, "box_vsprintf" },
  { &copy_list_to_array, "copy_list_to_array" },
  { &dbg_calloc, "dbg_calloc" },
  { &dbg_free, "dbg_free" },
  { &dbg_malloc, "dbg_malloc" },
  { &dbg_malloc_enable, "dbg_malloc_enable" },
  { &dbg_realloc, "dbg_realloc" },
  { &dbg_strdup, "dbg_strdup" },
  { &dk_alloc, "dk_alloc" },
  { &dk_alloc_box, "dk_alloc_box" },
  { &dk_alloc_box_long, "dk_alloc_box_long" },
  { &dk_alloc_box_zero, "dk_alloc_box_zero" },
  { &dk_free, "dk_free" },
  { &dk_free_box, "dk_free_box" },
  { &dk_free_box_and_int_boxes, "dk_free_box_and_int_boxes" },
  { &dk_free_box_and_numbers, "dk_free_box_and_numbers" },
  { &dk_free_tree, "dk_free_tree" },
  { &dk_session_allocate, "dk_session_allocate" },
  { &dk_set_delete, "dk_set_delete" },
  { &dk_set_delete_nth, "dk_set_delete_nth" },
  { &dk_set_push, "dk_set_push" },
  { &dk_try_alloc, "dk_try_alloc" },
  { &dk_try_alloc_box, "dk_try_alloc_box" },
  { &eh_create_charset_handler, "eh_create_charset_handler" },
  { &eh_create_ucm_handler, "eh_create_ucm_handler" },
  { &eh_decode_buffer__ASCII, "eh_decode_buffer__ASCII" },
  { &eh_decode_buffer__ISO8859_1, "eh_decode_buffer__ISO8859_1" },
  { &eh_decode_buffer__UCS4BE, "eh_decode_buffer__UCS4BE" },
  { &eh_decode_buffer__UCS4LE, "eh_decode_buffer__UCS4LE" },
  { &eh_decode_buffer__UTF16BE, "eh_decode_buffer__UTF16BE" },
  { &eh_decode_buffer__UTF16LE, "eh_decode_buffer__UTF16LE" },
  { &eh_decode_buffer__UTF7, "eh_decode_buffer__UTF7" },
  { &eh_decode_buffer__UTF8, "eh_decode_buffer__UTF8" },
  { &eh_decode_buffer__UTF8_QR, "eh_decode_buffer__UTF8_QR" },
  { &eh_decode_buffer__WIDE_121, "eh_decode_buffer__WIDE_121" },
  { &eh_decode_buffer_to_wchar__ASCII, "eh_decode_buffer_to_wchar__ASCII" },
  { &eh_decode_buffer_to_wchar__ISO8859_1, "eh_decode_buffer_to_wchar__ISO8859_1" },
  { &eh_decode_buffer_to_wchar__UCS4BE, "eh_decode_buffer_to_wchar__UCS4BE" },
  { &eh_decode_buffer_to_wchar__UCS4LE, "eh_decode_buffer_to_wchar__UCS4LE" },
  { &eh_decode_buffer_to_wchar__UTF16BE, "eh_decode_buffer_to_wchar__UTF16BE" },
  { &eh_decode_buffer_to_wchar__UTF16LE, "eh_decode_buffer_to_wchar__UTF16LE" },
  { &eh_decode_buffer_to_wchar__UTF7, "eh_decode_buffer_to_wchar__UTF7" },
  { &eh_decode_buffer_to_wchar__UTF8, "eh_decode_buffer_to_wchar__UTF8" },
  { &eh_decode_buffer_to_wchar__UTF8_QR, "eh_decode_buffer_to_wchar__UTF8_QR" },
  { &eh_decode_buffer_to_wchar__WIDE_121, "eh_decode_buffer_to_wchar__WIDE_121" },
  { &eh_decode_char__ASCII, "eh_decode_char__ASCII" },
  { &eh_decode_char__ISO8859_1, "eh_decode_char__ISO8859_1" },
  { &eh_decode_char__UCS4BE, "eh_decode_char__UCS4BE" },
  { &eh_decode_char__UCS4LE, "eh_decode_char__UCS4LE" },
  { &eh_decode_char__UTF16BE, "eh_decode_char__UTF16BE" },
  { &eh_decode_char__UTF16LE, "eh_decode_char__UTF16LE" },
  { &eh_decode_char__UTF7, "eh_decode_char__UTF7" },
  { &eh_decode_char__UTF8, "eh_decode_char__UTF8" },
  { &eh_decode_char__UTF8_QR, "eh_decode_char__UTF8_QR" },
  { &eh_decode_char__WIDE_121, "eh_decode_char__WIDE_121" },
  { &eh_duplicate_handler, "eh_duplicate_handler" },
  { &eh_encode_buffer__ASCII, "eh_encode_buffer__ASCII" },
  { &eh_encode_buffer__ISO8859_1, "eh_encode_buffer__ISO8859_1" },
  { &eh_encode_buffer__UCS4BE, "eh_encode_buffer__UCS4BE" },
  { &eh_encode_buffer__UCS4LE, "eh_encode_buffer__UCS4LE" },
  { &eh_encode_buffer__UTF16BE, "eh_encode_buffer__UTF16BE" },
  { &eh_encode_buffer__UTF16LE, "eh_encode_buffer__UTF16LE" },
  { &eh_encode_buffer__UTF7, "eh_encode_buffer__UTF7" },
  { &eh_encode_buffer__UTF8, "eh_encode_buffer__UTF8" },
  { &eh_encode_buffer__WIDE_121, "eh_encode_buffer__WIDE_121" },
  { &eh_encode_char__ASCII, "eh_encode_char__ASCII" },
  { &eh_encode_char__ISO8859_1, "eh_encode_char__ISO8859_1" },
  { &eh_encode_char__UCS4BE, "eh_encode_char__UCS4BE" },
  { &eh_encode_char__UCS4LE, "eh_encode_char__UCS4LE" },
  { &eh_encode_char__UTF16BE, "eh_encode_char__UTF16BE" },
  { &eh_encode_char__UTF16LE, "eh_encode_char__UTF16LE" },
  { &eh_encode_char__UTF7, "eh_encode_char__UTF7" },
  { &eh_encode_char__UTF8, "eh_encode_char__UTF8" },
  { &eh_encode_char__WIDE_121, "eh_encode_char__WIDE_121" },
  { &eh_encode_wchar_buffer__ASCII, "eh_encode_wchar_buffer__ASCII" },
  { &eh_encode_wchar_buffer__ISO8859_1, "eh_encode_wchar_buffer__ISO8859_1" },
  { &eh_encode_wchar_buffer__UCS4BE, "eh_encode_wchar_buffer__UCS4BE" },
  { &eh_encode_wchar_buffer__UCS4LE, "eh_encode_wchar_buffer__UCS4LE" },
  { &eh_encode_wchar_buffer__UTF16BE, "eh_encode_wchar_buffer__UTF16BE" },
  { &eh_encode_wchar_buffer__UTF16LE, "eh_encode_wchar_buffer__UTF16LE" },
  { &eh_encode_wchar_buffer__UTF7, "eh_encode_wchar_buffer__UTF7" },
  { &eh_encode_wchar_buffer__UTF8, "eh_encode_wchar_buffer__UTF8" },
  { &eh_encode_wchar_buffer__WIDE_121, "eh_encode_wchar_buffer__WIDE_121" },
  { &eh_get_handler, "eh_get_handler" },
  { &eh_load_handler, "eh_load_handler" },
  { &eh_wide_from_narrow, "eh_wide_from_narrow" },
  { &elh_get_handler, "elh_get_handler" },
  { &elh_load_handler, "elh_load_handler" },
  { &id_hash_add_new, "id_hash_add_new" },
  { &id_hash_allocate, "id_hash_allocate" },
  { &id_hash_get, "id_hash_get" },
  { &id_hash_get_with_ctx, "id_hash_get_with_ctx" },
  { &id_hash_get_with_hash_number, "id_hash_get_with_hash_number" },
  { &id_hash_set, "id_hash_set" },
  { &id_hash_set_with_hash_number, "id_hash_set_with_hash_number" },
  { &lh_get_handler, "lh_get_handler" },
  { &lh_load_handler, "lh_load_handler" },
  { &list_to_array, "list_to_array" },
  { &lt_start, "lt_start" },
  { &md5, "md5" },
  { &mq_add_message, "mq_add_message" },
  { &mq_create_message, "mq_create_message" },
  { &mutex_allocate, "mutex_allocate" },
  { &mutex_enter, "mutex_enter" },
  { &mutex_free, "mutex_free" },
  { &mutex_leave, "mutex_leave" },
  { &registry_get, "registry_get" },
  { &registry_get_all, "registry_get_all" },
  { &revlist_to_array, "revlist_to_array" },
  { &sec_check_dba, "sec_check_dba" },
  { &semaphore_allocate, "semaphore_allocate" },
  { &server_logmsg_ap, "server_logmsg_ap" },
  { &service_read, "service_read" },
  { &service_write, "service_write" },
  { &session_accept, "session_accept" },
  { &session_buffered_read, "session_buffered_read" },
  { &session_buffered_read_char, "session_buffered_read_char" },
  { &session_buffered_write, "session_buffered_write" },
  { &session_buffered_write_char, "session_buffered_write_char" },
  { &session_connect, "session_connect" },
  { &session_disconnect, "session_disconnect" },
  { &session_flush, "session_flush" },
  { &session_flush_1, "session_flush_1" },
  { &session_listen, "session_listen" },
  { &session_read, "session_read" },
  { &session_select, "session_select" },
  { &session_set_address, "session_set_address" },
  { &session_set_control, "session_set_control" },
  { &session_write, "session_write" },
  { &sprintf_inverse, "sprintf_inverse" },
  { &sprintf_inverse_ex, "sprintf_inverse_ex" },
  { &sqlr_error, "sqlr_error" },
  { &sqlr_new_error, "sqlr_new_error" },
  { &sqlr_resignal, "sqlr_resignal" },
  { &srv_make_new_error, "srv_make_new_error" },
  { &strhash, "strhash" },
  { &strhashcmp, "strhashcmp" },
  { &strses_allocate, "strses_allocate" },
  { &strses_flush, "strses_flush" },
  { &strses_free, "strses_free" },
  { &strses_length, "strses_length" },
  { &strses_string, "strses_string" },
  { &strses_write_out, "strses_write_out" },
  { &tcpses_get_fd, "tcpses_get_fd" },
  { &tcpses_get_last_r_errno, "tcpses_get_last_r_errno" },
  { &tcpses_get_last_w_errno, "tcpses_get_last_w_errno" },
  { &tcpses_set_fd, "tcpses_set_fd" },
  { &thr_get_error_code, "thr_get_error_code" },
  { &thr_set_error_code, "thr_set_error_code" },
  { &thread_current, "thread_current" },
  { &thread_getattr, "thread_getattr" },
  { &thread_setattr, "thread_setattr" },
  { &tp_get_main_queue, "tp_get_main_queue" },
  { &tp_retire, "tp_retire" },
  { &twopc_log, "twopc_log" },
  { &unbox, "unbox" },
  { &unbox_int64, "unbox_int64" },
  { &unbox_ptrlong, "unbox_ptrlong" },
  { &unichar_getlcase, "unichar_getlcase" },
  { &unichar_getprops, "unichar_getprops" },
  { &unichar_getucase, "unichar_getucase" },
  { &uudecode_base64, "uudecode_base64" },
  { &wi_instance_get, "wi_instance_get" },
  { NULL, "." } };