/* 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_dv_wide_nchars, "box_dv_wide_nchars" },
  { &box_equal, "box_equal" },
  { &box_find_mt_unsafe_subtree, "box_find_mt_unsafe_subtree" },
  { &box_float, "box_float" },
  { &box_iri_id, "box_iri_id" },
  { &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" },
  { &file_path_assert, "file_path_assert" },
  { &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" },
  { &qr_exec, "qr_exec" },
  { &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_wide_string, "strses_wide_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, "." } };
