1 { $define libseehelper}
2 
3 {$mode objfpc}
4 {$h+}
5 unit libsee;
6 interface
7 
8 uses
9   ctypes;
10 
11 {
12   Automatically converted by H2Pas 1.0.0 from libsee.c
13   The following command line parameters were used:
14     -D
15     -l
16     see
17     -C
18     -u
19     libsee
20     -T
21     -o
22     libsee.pas
23     -P
24     libsee.c
25 }
26 
27   const
28 {$ifdef unix}
29     LibSeeLibraryName='libsee.so';
30 {$else}
31     LibSeeLibraryName='libsee.dll';
32 {$endif}
33 
34 Type
35   Tsize_t = csize_t;
36   tcuchar = char;
37   Tuint16_t = word;
38   Tuint32_t = cardinal;
39   Tuint64_t = qword;
40   Tint16_t = integer;
41   Tint32_t = longint;
42   Tint64_t = int64;
43   TDouble = double;
44   tcuint = word;
45   tcint = integer;
46   PTcchar = pchar;
47   PPTcchar = ^PTcchar;
48   Ptcint = ^tcint;
49   PTcuint = ^tcuint;
50   tcchar = char;
51 
52 var
53   SEE_literal_NaN : array[0..7] of Tcuchar;cvar;external;
54 
55   Type
56   PFILE  = Pointer;
57   PTFILE = Pointer;
58   PPSEE_string  = ^PSEE_string;
59   PSEE_context  = ^TSEE_context;
60   PSEE_enum  = ^TSEE_enum;
61   PSEE_growable  = ^TSEE_growable;
62   PSEE_input  = ^TSEE_input;
63   PSEE_interpreter  = ^TSEE_interpreter;
64   PSEE_module  = ^TSEE_module;
65   PSEE_native  = ^TSEE_native;
66   PSEE_object  = ^TSEE_object;
67   PSEE_objectclass  = ^TSEE_objectclass;
68   PSEE_scope  = ^TSEE_scope;
69   PSEE_string  = ^TSEE_string;
70   PSEE_throw_location  = ^TSEE_throw_location;
71   PSEE_try_context  = ^TSEE_try_context;
72   PSEE_unicode_t  = ^TSEE_unicode_t;
73   PSEE_value  = ^TSEE_value;
74   PTSEE_char_t = ^TSEE_Char_t;
75   PTSEE_Code = Pointer;
76 
77   PTSEE_context  = ^TSEE_context;
78   PTSEE_enum  = ^TSEE_enum;
79   PTSEE_growable  = ^TSEE_growable;
80   PTSEE_input  = ^TSEE_input;
81   PTSEE_interpreter  = ^TSEE_interpreter;
82   PTSEE_module  = ^TSEE_module;
83   PTSEE_native  = ^TSEE_native;
84   PTSEE_object  = ^TSEE_object;
85   PTSEE_objectclass  = ^TSEE_objectclass;
86   PTSEE_scope  = ^TSEE_scope;
87   PTSEE_string  = ^TSEE_string;
88   TPSEE_string = PTSEE_string;
89   PTSEE_throw_location  = ^TSEE_throw_location;
90   PTSEE_try_context  = ^TSEE_try_context;
91   PTSEE_unicode_t  = ^TSEE_unicode_t;
92   PTSEE_value  = ^TSEE_value;
93   PPTSEE_value  = ^PSEE_value;
94   PTSEE_enumclass = ^TSEE_enumclass;
95   PSEE_system = ^TSEE_System;
96 //  PTSEE_property = ^TSEE_property;
97   PTSEE_property = Pointer;
98   TPSEE_object = ^TSEE_object;
99   PTSEE_inputclass = ^TSEE_inputclass;
100   PTSEE_traceback = ^TSEE_traceback;
101   PTSEE_regex_engine = Pointer;
102   PTSEE_stringclass = ^TSEE_stringclass;
103   TPSEE_enum = PSEE_Enum;
104   TPSEE_input = PSEE_INPUT;
105   PTPSEE_string = ^TSEE_STRING;
106   TPSEE_interpreter_state = Pointer; //^TSEE_interpreter_state;
107 {$IFDEF FPC}
108 {$PACKRECORDS C}
109 {$ENDIF}
110 
111     TSEE_uint16_t = Tuint16_t;
112     TSEE_uint32_t = Tuint32_t;
113     TSEE_int32_t = Tint32_t;
114     TSEE_uint64_t = Tuint64_t;
115     TSEE_int64_t = Tint64_t;
116     TSEE_number_t = Tdouble;
117     TSEE_boolean_t = Tcuchar;
118     TSEE_char_t = TSEE_uint16_t;
119     TSEE_unicode_t = TSEE_uint32_t;
120 
121     TSEE_type = (SEE_UNDEFINED,SEE_NULL,SEE_BOOLEAN,SEE_NUMBER,
122       SEE_STRING,SEE_OBJECT,SEE_REFERENCE,SEE_COMPLETION
123       );
124 
125     TSEE_reference = record
126         base : PTSEE_object;
127         _property : PTSEE_string;
128       end;
129 
130     TSEE_completion = record
131         value : PTSEE_value;
132         target : Tcuint;
133         _type : (SEE_COMPLETION_NORMAL,SEE_COMPLETION_BREAK,
134           SEE_COMPLETION_CONTINUE,SEE_COMPLETION_RETURN,
135           SEE_COMPLETION_THROW);
136       end;
137 
138     TSEE_value = record
139         _type : TSEE_type;
140         u : record
141             case longint of
142               0 : ( number : TSEE_number_t );
143               1 : ( boolean : TSEE_boolean_t );
144               2 : ( _object : PTSEE_object );
145               3 : ( _string : PTSEE_string );
146               4 : ( reference : TSEE_reference );
147               5 : ( completion : TSEE_completion );
148               6 : ( _padding : array[0..3] of pointer );
149             end;
150       end;
151 
152 
153 
154     TSEE_get_fn_t = procedure (i:PTSEE_interpreter; obj:PTSEE_object; prop:PTSEE_string; res:PTSEE_value);cdecl;
155     TSEE_put_fn_t = procedure (i:PTSEE_interpreter; obj:PTSEE_object; prop:PTSEE_string; res:PTSEE_value; flags:Tcint);cdecl;
156     TSEE_boolean_fn_t = function (i:PTSEE_interpreter; obj:PTSEE_object; prop:PTSEE_string):Tcint;cdecl;
157     TSEE_hasinstance_fn_t = function (i:PTSEE_interpreter; obj:PTSEE_object; instance:PTSEE_value):Tcint;cdecl;
158     TSEE_default_fn_t = procedure (i:PTSEE_interpreter; obj:PTSEE_object; hint:PTSEE_value; res:PTSEE_value);cdecl;
159     TSEE_call_fn_t = procedure (i:PTSEE_interpreter; obj:PTSEE_object; thisobj:PTSEE_object; argc:Tcint; argv:PPTSEE_value;
160                  res:PTSEE_value);cdecl;
161     TSEE_enumerator_fn_t = function (i:PTSEE_interpreter; obj:PTSEE_object):PTSEE_enum;cdecl;
162     TSEE_get_sec_domain_fn_t = function (i:PTSEE_interpreter; obj:PTSEE_object):pointer;cdecl;
163 
164 
165 (* Const before type ignored *)
166     TSEE_objectclass = record
167         _Class : PTcchar;
168         Get : TSEE_get_fn_t;
169         Put : TSEE_put_fn_t;
170         CanPut : TSEE_boolean_fn_t;
171         HasProperty : TSEE_boolean_fn_t;
172         Delete : TSEE_boolean_fn_t;
173         DefaultValue : TSEE_default_fn_t;
174         enumerator : TSEE_enumerator_fn_t;
175         Construct : TSEE_call_fn_t;
176         Call : TSEE_call_fn_t;
177         HasInstance : TSEE_hasinstance_fn_t;
178         get_sec_domain : TSEE_get_sec_domain_fn_t;
179       end;
180 
181     TSEE_object = record
182         objectclass : PTSEE_objectclass;
183         Prototype : PTSEE_object;
184         host_data : pointer;
185       end;
186 
187     TSEE_enumclass = record
188         unused : pointer;
189         next : function (i:PTSEE_interpreter; e:PTSEE_enum; flags_return:pTcint):TPSEE_string;cdecl;
190       end;
191 
192     TSEE_enum = record
193         enumclass : PTSEE_enumclass;
194       end;
195 
196     TSEE_native = record
197         _object : TSEE_object;
198         properties : array[0..256] of PTSEE_property;
199         lru : PTSEE_property;
200       end;
201     TSEE_scope = record
202         next : PTSEE_scope;
203         obj : TPSEE_object;
204       end;
205 
206     TSEE_inputclass = record
207         next : function (para1:PTSEE_input):TSEE_unicode_t;cdecl;
208         close : procedure (para1:PTSEE_input);
209       end;
210 
211     TSEE_input = record
212         inputclass : PTSEE_inputclass;
213         eof : TSEE_boolean_t;
214         lookahead : TSEE_unicode_t;
215         filename : TPSEE_string;
216         first_lineno : Tcint;
217         interpreter : PTSEE_interpreter;
218       end;
219 
220     TSEE_trace_event = (SEE_TRACE_CALL,SEE_TRACE_RETURN,SEE_TRACE_STATEMENT,
221       SEE_TRACE_THROW);
222 
223     TSEE_interpreter = record
224         host_data : pointer;
225         compatibility : Tcint;
226         Global : TPSEE_object;
227         _Object : TPSEE_object;
228         Object_prototype : TPSEE_object;
229         Error : TPSEE_object;
230         EvalError : TPSEE_object;
231         RangeError : TPSEE_object;
232         ReferenceError : TPSEE_object;
233         SyntaxError : TPSEE_object;
234         TypeError : TPSEE_object;
235         URIError : TPSEE_object;
236         _String : TPSEE_object;
237         String_prototype : TPSEE_object;
238         _Function : TPSEE_object;
239         Function_prototype : TPSEE_object;
240         _Array : TPSEE_object;
241         Array_prototype : TPSEE_object;
242         Number : TPSEE_object;
243         Number_prototype : TPSEE_object;
244         Boolean : TPSEE_object;
245         Boolean_prototype : TPSEE_object;
246         Math : TPSEE_object;
247         RegExp : TPSEE_object;
248         RegExp_prototype : TPSEE_object;
249         Date : TPSEE_object;
250         Date_prototype : TPSEE_object;
251         Global_eval : TPSEE_object;
252         Global_scope : PTSEE_scope;
253         try_context : PTSEE_try_context;
254         try_location : PTSEE_throw_location;
255         traceback : PTSEE_traceback;
256         module_private : Ppointer;
257         intern_tab : pointer;
258         random_seed : Tcuint;
259         locale : PTcchar;
260         recursion_limit : Tcint;
261         sec_domain : pointer;
262         trace : procedure (para1:PTSEE_interpreter; para2:PTSEE_throw_location; para3:PTSEE_context; para4:TSEE_trace_event);cdecl;
263         regex_engine : PTSEE_regex_engine;
264       end;
265 
266     TSEE_traceback = record
267         call_location : PTSEE_throw_location;
268         callee : TPSEE_object;
269         call_type : Tcint;
270         prev : PTSEE_traceback;
271       end;
272 
273     TSEE_context = record
274         interpreter : PTSEE_interpreter;
275         activation : TPSEE_object;
276         variable : TPSEE_object;
277         varattr : Tcint;
278         thisobj : TPSEE_object;
279         scope : PTSEE_scope;
280       end;
281 
282     TSEE_growable = record
283         data_ptr : Ppointer;
284         length_ptr : PTcuint;
285         element_size : Tsize_t;
286         allocated : Tsize_t;
287         flag0 : word;
288       end;
289 
290     TSEE_module = record
291         magic : TSEE_uint32_t;
292         name : PTcchar;
293         version : PTcchar;
294         index : Tcuint;
295         mod_init : function :Tcint;cdecl;
296         alloc : procedure (para1:PTSEE_interpreter);cdecl;
297         init : procedure (para1:PTSEE_interpreter);cdecl;
298       end;
299 
300     TSEE_string = record
301         length : Tcuint;
302         data : PTSEE_char_t;
303         stringclass : PTSEE_stringclass;
304         interpreter : PTSEE_interpreter;
305         flags : Tcint;
306       end;
307 
308     TSEE_stringclass = record
309         growby : procedure (para1:TPSEE_string; para2:Tcuint);cdecl;
310       end;
311 
312     TFinalProc = procedure (para1:PTSEE_interpreter; para2:pointer; para3:pointer); cdecl;
313     TSEE_system = record
314         default_locale : PTcchar;
315         default_recursion_limit : Tcint;
316         default_trace : procedure (para1:PTSEE_interpreter; para2:PTSEE_throw_location; para3:PTSEE_context; para4:TSEE_trace_event);cdecl;
317         default_compat_flags : Tcint;
318         random_seed : function :Tcuint;
319         abort : procedure (para1:PTSEE_interpreter; para2:PTcchar);
320         periodic : procedure (para1:PTSEE_interpreter);
321         malloc : function (para1:PTSEE_interpreter; para2:Tsize_t; para3:PTcchar; para4:Tcint):pointer;
322         malloc_finalize : function (para1:PTSEE_interpreter; para2:Tsize_t; para3:tfinalproc; para4:pointer; para5:PTcchar; para6:Tcint):pointer;
323         malloc_string : function (para1:PTSEE_interpreter; para2:Tsize_t; para3:PTcchar; para4:Tcint):pointer;
324         free : procedure (para1:PTSEE_interpreter; para2:pointer; para3:PTcchar; para4:Tcint);
325         mem_exhausted : procedure (para1:PTSEE_interpreter);
326         gcollect : procedure (para1:PTSEE_interpreter);
327         transit_sec_domain : function (para1:PTSEE_interpreter; para2:pointer):pointer;
328         code_alloc : function (para1:PTSEE_interpreter): PTSEE_code;
329         object_construct : procedure (interp:PTSEE_interpreter; self:TPSEE_object; thisobj:TPSEE_object; argc:Tcint; argv:PPTSEE_value;
330                       res:PTSEE_value);
331         default_regex_engine : PTSEE_regex_engine;
332       end;
333 
334     TSEE_throw_location = record
335         filename : TPSEE_string;
336         lineno : Tcint;
337       end;
338 
339     Tjmp_buf = record
340       a : array[1..200] of byte;
341     end;
342 
343     TSEE_try_context_t = record
344         interpreter : PTSEE_interpreter;
345         previous : PTSEE_try_context;
346         thrown : TSEE_value;
347         done : Tcint;
348         env : Tjmp_buf; //
349         throw_file : PTcchar;
350         throw_line : Tcint;
351         saved_traceback : PTSEE_traceback;
352         traceback : PTSEE_traceback;
353       end;
354 
355     TSEE_try_context = TSEE_try_context_t;
356 
357   const
358     bm_TSEE_growable_is_string = $1;
359     bp_TSEE_growable_is_string = 0;
360 
361   var
362     _SEE_isnan : function(n:TSEE_number_t):Tcint;cdecl;
363     _SEE_isfinite : function(n:TSEE_number_t):Tcint;cdecl;
364     _SEE_copysign : function(x:TSEE_number_t; y:TSEE_number_t):TSEE_number_t;cdecl;
365     _SEE_ispinf : function(n:TSEE_number_t):Tcint;cdecl;
366     _SEE_isninf : function(n:TSEE_number_t):Tcint;cdecl;
367     SEE_ToPrimitive : procedure(i:PTSEE_interpreter; val:PTSEE_value; _type:PTSEE_value; res:PTSEE_value);cdecl;
368     SEE_ToBoolean : procedure(i:PTSEE_interpreter; val:PTSEE_value; res:PTSEE_value);cdecl;
369     SEE_ToNumber : procedure(i:PTSEE_interpreter; val:PTSEE_value; res:PTSEE_value);cdecl;
370     SEE_ToInteger : procedure(i:PTSEE_interpreter; val:PTSEE_value; res:PTSEE_value);cdecl;
371     SEE_ToString : procedure(i:PTSEE_interpreter; val:PTSEE_value; res:PTSEE_value);cdecl;
372     SEE_ToObject : procedure(i:PTSEE_interpreter; val:PTSEE_value; res:PTSEE_value);cdecl;
373     SEE_ToInt32 : function(i:PTSEE_interpreter; val:PTSEE_value):TSEE_int32_t;cdecl;
374     SEE_ToUint32 : function(i:PTSEE_interpreter; val:PTSEE_value):TSEE_uint32_t;cdecl;
375     SEE_ToUint16 : function(i:PTSEE_interpreter; val:PTSEE_value):TSEE_uint16_t;cdecl;
376       SEE_hexstr_lowercase : array[0..15] of Tcchar;cvar;external;
377 
378 
379     _SEE_intern_assert : function(i:PTSEE_interpreter; s:TPSEE_string):TPSEE_string;cdecl;
ara1null380     SEE_intern_ascii : function(para1:PTSEE_interpreter; para2:PTcchar):TPSEE_string;cdecl;
381     SEE_function_is_joined : function(a:PTSEE_object; b:PTSEE_object):Tcint;cdecl;
ara1null382     SEE_Object_new : function(para1:PTSEE_interpreter):TPSEE_object;cdecl;
383     SEE_object_call : procedure(para1:PTSEE_interpreter; para2:TPSEE_object; para3:TPSEE_object; para4:Tcint; para5:PPTSEE_value;
384       para6:PTSEE_value);cdecl;
385     SEE_object_construct : procedure(para1:PTSEE_interpreter; para2:TPSEE_object; para3:TPSEE_object; para4:Tcint; para5:PPTSEE_value;
386       para6:PTSEE_value);cdecl;
nterpnull387     SEE_object_instanceof : function(interp:PTSEE_interpreter; val:PTSEE_value; obj:TPSEE_object):Tcint;cdecl;
388 
389     SEE_native_get : procedure(i:PTSEE_interpreter; obj:TPSEE_object; prop:TPSEE_string; res:PTSEE_value);cdecl;
390     SEE_native_put : procedure(i:PTSEE_interpreter; obj:TPSEE_object; prop:TPSEE_string; val:PTSEE_value; flags:Tcint);cdecl;
391     SEE_native_canput : function(i:PTSEE_interpreter; obj:TPSEE_object; prop:TPSEE_string):Tcint;cdecl;
392     SEE_native_hasproperty : function(i:PTSEE_interpreter; obj:TPSEE_object; prop:TPSEE_string):Tcint;cdecl;
393     SEE_native_hasownproperty : function(i:PTSEE_interpreter; obj:TPSEE_object; prop:TPSEE_string):Tcint;cdecl;
394     SEE_native_getownattr : function(i:PTSEE_interpreter; obj:TPSEE_object; prop:TPSEE_string):Tcint;cdecl;
395     SEE_native_delete : function(i:PTSEE_interpreter; obj:TPSEE_object; prop:TPSEE_string):Tcint;cdecl;
396     SEE_native_defaultvalue : procedure(i:PTSEE_interpreter; obj:TPSEE_object; hint:PTSEE_value; res:PTSEE_value);cdecl;
397     SEE_native_enumerator : function(i:PTSEE_interpreter; obj:TPSEE_object):TPSEE_enum;cdecl;
398     SEE_native_new : function(i:PTSEE_interpreter):TPSEE_object;cdecl;
399     SEE_native_init : procedure(obj:PTSEE_native; i:PTSEE_interpreter; obj_class:PTSEE_objectclass; prototype:TPSEE_object);cdecl;
400 
401     SEE_cfunction_make : function(i:PTSEE_interpreter; func:TSEE_call_fn_t; name:TPSEE_string; length:Tcint):TPSEE_object;cdecl;
402     SEE_parse_args : procedure(i:PTSEE_interpreter; argc:Tcint; argv:PPTSEE_value; fmt:pTcchar);cdecl;varargs;
403     SEE_call_args : procedure(i:PTSEE_interpreter; func:TPSEE_object; thisobj:TPSEE_object; ret:PTSEE_value; fmt:pTcchar);cdecl;varargs;
404 
405     SEE_PrintValue : procedure(i:PTSEE_interpreter; v:PTSEE_value; f:PTFILE);cdecl;
406     SEE_PrintObject : procedure(i:PTSEE_interpreter; o:TPSEE_object; f:PTFILE);cdecl;
407     SEE_PrintString : procedure(i:PTSEE_interpreter; s:TPSEE_string; f:PTFILE);cdecl;
408     SEE_PrintTraceback : procedure(i:PTSEE_interpreter; f:PTFILE);cdecl;
409     SEE_PrintContextTraceback : procedure(i:PTSEE_interpreter; context:PTSEE_try_context; f:PTFILE);cdecl;
410 
411     SEE_Global_eval : procedure(i:PTSEE_interpreter; input:PTSEE_input; res:PTSEE_value);cdecl;
412     SEE_eval : procedure(i:PTSEE_interpreter; input:PTSEE_input; thisobj:TPSEE_object; variable:TPSEE_object; scope:PTSEE_scope;
413       res:PTSEE_value);cdecl;
414     SEE_Function_new : function(i:PTSEE_interpreter; name:TPSEE_string; param_input:PTSEE_input; body_input:PTSEE_input):TPSEE_object;cdecl;
415 
416     SEE_error__throw_string : procedure(i:PTSEE_interpreter; errorobj:TPSEE_object; filename:pTcchar; lineno:Tcint; message:TPSEE_string);cdecl;
417     SEE_error__throw : procedure(i:PTSEE_interpreter; errorobj:TPSEE_object; filename:pTcchar; lineno:Tcint; fmt:pTcchar);cdecl; varargs;
418     SEE_error__throw_sys : procedure(i:PTSEE_interpreter; errorobj:TPSEE_object; filename:pTcchar; lineno:Tcint; fmt:pTcchar);cdecl; varargs;
419     SEE_Error_make : function(i:PTSEE_interpreter; name:TPSEE_string):TPSEE_object;cdecl;
420     SEE_error__throw0 : procedure(i:PTSEE_interpreter; errorobj:TPSEE_object; fmt:pTcchar);cdecl;varargs;
421     SEE_error__throw_sys0 : procedure(i:PTSEE_interpreter; errorobj:TPSEE_object; fmt:pTcchar);cdecl;varargs;
422 
423 
424     SEE_input_file : function(i:PTSEE_interpreter; f:PTFILE; filename:pTcchar; encoding:pTcchar):TPSEE_input;cdecl;
425     SEE_input_string : function(i:PTSEE_interpreter; s:TPSEE_string):TPSEE_input;cdecl;
426     SEE_input_utf8 : function(i:PTSEE_interpreter; s:pTcchar):TPSEE_input;cdecl;
427     SEE_input_lookahead : function(i:TPSEE_input; maxlookahead:Tcint):TPSEE_input;cdecl;
inull428     SEE_input_lookahead_copy : function(li:TPSEE_input; buf:PTSEE_unicode_t; buflen:Tcint):Tcint;cdecl;
429 
430     _SEE_intern_init : procedure(i:PTSEE_interpreter);cdecl;
431     SEE_intern : function(i:PTSEE_interpreter; s:TPSEE_string):TPSEE_string;cdecl;
432     SEE_intern_and_free : procedure(i:PTSEE_interpreter; s:PTPSEE_string);cdecl;
433 //    SEE_intern_ascii : function(i:PTSEE_interpreter; s:pTcchar):TPSEE_string;cdecl;
434     SEE_intern_global : function(s:pTcchar):TPSEE_string;cdecl;
435 
436     SEE_interpreter_init : procedure(i:PTSEE_interpreter);cdecl;
437     SEE_interpreter_init_compat : procedure(i:PTSEE_interpreter; compat_flags:Tcint);cdecl;
438     SEE_interpreter_save_state : function(i:PTSEE_interpreter):TPSEE_interpreter_state;cdecl;
439     SEE_interpreter_restore_state : procedure(i:PTSEE_interpreter; state:TPSEE_interpreter_state);cdecl;
440 
441     SEE_context_eval : procedure(context:PTSEE_context; expr:TPSEE_string; res:PTSEE_value);cdecl;
442 
443     Type
444       Tfinalizefn = procedure( i:PTSEE_interpreter; p:pointer; closure:pointer);cdecl;
445 Var
446     SEE_malloc : function(i:PTSEE_interpreter; sz:Tsize_t):pointer;cdecl;
447     SEE_malloc_string : function(i:PTSEE_interpreter; sz:Tsize_t):pointer;cdecl;
448     SEE_malloc_finalize : function(i:PTSEE_interpreter; sz:Tsize_t; finalizefn:Tfinalizefn; closure:pointer):pointer;cdecl;
449     SEE_free : procedure(i:PTSEE_interpreter; memp:Ppointer);cdecl;
450     SEE_gcollect : procedure(i:PTSEE_interpreter);cdecl;
451     _SEE_malloc_debug : function(i:PTSEE_interpreter; sz:Tsize_t; _file:pTcchar; line:Tcint):pointer;cdecl;
452     _SEE_malloc_string_debug : function(i:PTSEE_interpreter; sz:Tsize_t; _file:pTcchar; line:Tcint):pointer;cdecl;
453     _SEE_malloc_finalize_debug : function(i:PTSEE_interpreter; sz:Tsize_t; finalizefn:Tfinalizefn; closure:pointer; _file:pTcchar; line:Tcint):pointer;cdecl;
454     _SEE_free_debug : procedure(i:PTSEE_interpreter; memp:Ppointer; _file:pTcchar; line:Tcint);cdecl;
455 
456 
is_stringnull457   function is_string(var a : TSEE_growable) : boolean;
458   procedure set_is_string(var a : TSEE_growable; __is_string : boolean);
459 
460   var
461     SEE_grow_to : procedure(i:PTSEE_interpreter; grow:PTSEE_growable; new_len:Tcuint);cdecl;
462     _SEE_grow_to_debug : procedure(i:PTSEE_interpreter; grow:PTSEE_growable; new_len:Tcuint; _file:pTcchar; line:Tcint);cdecl;
463 
464 
465 
odulenull466     SEE_module_add : function(module:PTSEE_module):Tcint;cdecl;
467 
468     SEE_no_get : procedure(para1:PTSEE_interpreter; para2:TPSEE_object; para3:TPSEE_string; val:PTSEE_value);cdecl;
469     SEE_no_put : procedure(para1:PTSEE_interpreter; para2:TPSEE_object; para3:TPSEE_string; val:PTSEE_value; para5:Tcint);cdecl;
ara1null470     SEE_no_canput : function(para1:PTSEE_interpreter; para2:TPSEE_object; para3:TPSEE_string):Tcint;cdecl;
ara1null471     SEE_no_hasproperty : function(para1:PTSEE_interpreter; para2:TPSEE_object; para3:TPSEE_string):Tcint;cdecl;
ara1null472     SEE_no_delete : function(para1:PTSEE_interpreter; para2:TPSEE_object; para3:TPSEE_string):Tcint;cdecl;
473     SEE_no_defaultvalue : procedure(para1:PTSEE_interpreter; para2:TPSEE_object; para3:PTSEE_value; para4:PTSEE_value);cdecl;
ara1null474     SEE_no_enumerator : function(para1:PTSEE_interpreter; para2:TPSEE_object):TPSEE_enum;cdecl;
475 
476   var
477     SEE_string_addch : procedure(s:TPSEE_string; ch:Tcint);cdecl;
478     SEE_string_append : procedure(s:TPSEE_string; sffx:TPSEE_string);cdecl;
479     SEE_string_append_ascii : procedure(s:TPSEE_string; ascii:pTcchar);cdecl;
480     SEE_string_append_int : procedure(s:TPSEE_string; i:Tcint);cdecl;
481     SEE_string_append_unicode : procedure(s:TPSEE_string; uch:TSEE_unicode_t);cdecl;
482     SEE_string_fputs : function(s:TPSEE_string; _file:PTFILE):Tcint;cdecl;
1null483     SEE_string_cmp : function(s1:TPSEE_string; s2:TPSEE_string):Tcint;cdecl;
1null484     SEE_string_cmp_ascii : function(s1:TPSEE_string; s2:pTcchar):Tcint;cdecl;
485     SEE_string_new : function(i:PTSEE_interpreter; space:Tcuint):TPSEE_string;cdecl;
486     SEE_string_dup : function(i:PTSEE_interpreter; s:TPSEE_string):TPSEE_string;cdecl;
487     SEE_string_substr : function(i:PTSEE_interpreter; s:TPSEE_string; index:Tcint; length:Tcint):TPSEE_string;cdecl;
488     SEE_string_concat : function(i:PTSEE_interpreter; s1:TPSEE_string; s2:TPSEE_string):TPSEE_string;cdecl;
489     SEE_string_sprintf : function(i:PTSEE_interpreter; fmt:pTcchar):TPSEE_string;cdecl; varargs;
490     SEE_string_literal : function(i:PTSEE_interpreter; s:TPSEE_string):TPSEE_string;cdecl;
491     SEE_string_fix : function(s:TPSEE_string):TPSEE_string;cdecl;
492     SEE_string_free : procedure(i:PTSEE_interpreter; sp:PTPSEE_string);cdecl;
493     SEE_string_toutf8 : procedure(i:PTSEE_interpreter; buf:pTcchar; buflen:Tsize_t; s:TPSEE_string);cdecl;
nterpnull494     SEE_string_utf8_size : function(interp:PTSEE_interpreter; s:TPSEE_string):Tsize_t;cdecl;
ara1null495     _SEE_string_dup_fix : function(para1:PTSEE_interpreter; para2:TPSEE_string):TPSEE_string;cdecl;
496 
497 
498 
499   var
500       SEE_system : TSEE_system;cvar;external;
501     SEE_init : procedure;cdecl;
PPTccharnull502     SEE_regex_engine_list : function:PPTcchar;cdecl;
amenull503     SEE_regex_engine : function(name:pTcchar):PTSEE_regex_engine;cdecl;
504 
505 
506   var
507     SEE_throw_abort : procedure(para1:PTSEE_interpreter; para2:PTSEE_value; para3:PTcchar; para4:Tcint);cdecl;
508     SEE_location_string : function(i:PTSEE_interpreter; loc:PTSEE_throw_location):TPSEE_string;cdecl;
509     SEE_throw : procedure;cdecl;
PTccharnull510     SEE_version : function: PTcchar;cdecl;
511 
512 procedure see_input_close(Inp : PSEE_INPUT);
513 
SEE_VALUE_GET_TYPEnull514 function SEE_VALUE_GET_TYPE(v : PSEE_value) : TSEE_type;
515 procedure SEE_VALUE_COPY(dst, src : PSEE_value);
516 procedure SEE_SET_UNDEFINED(v : PSEE_value);
517 procedure SEE_SET_NULL(v : PSEE_value);
518 procedure SEE_SET_BOOLEAN(v : PSEE_value; b : Boolean);
519 procedure SEE_SET_NUMBER(v : PSEE_value; n : TSEE_number_t);
520 procedure SEE_SET_STRING(v :PSEE_value; s: PSEE_STRING);
521 procedure SEE_SET_OBJECT(v :PSEE_value; o: PSEE_OBJECT);
SEE_isnannull522 function SEE_isnan (n:TSEE_number_t):Tcint;
SEE_isfinitenull523 function SEE_isfinite (n:TSEE_number_t):Tcint;
SEE_copysignnull524 function SEE_copysign (x:TSEE_number_t; y:TSEE_number_t):TSEE_number_t;
SEE_ispinfnull525 function SEE_ispinf (n:TSEE_number_t):Tcint;
SEE_isninfnull526 function SEE_isninf (n:TSEE_number_t):Tcint;
SEE_MODULE_PRIVATEnull527 Function SEE_MODULE_PRIVATE(i : PTSEE_interpreter; m : PSEE_module) : Pointer;
528 
529 procedure SEE_OBJECT_PUT(Interp : PTSEE_interpreter; Obj : PSEE_object; prop:TPSEE_string; val:PTSEE_value; flags:Tcint);
530 
531 CONST
532   SEE_ATTR_READONLY   = $01;
533   SEE_ATTR_DONTENUM   = $02;
534   SEE_ATTR_DONTDELETE = $04;
535   SEE_ATTR_INTERNAL   = $08;
536 
537   SEE_MODULE_MAGIC = $5345456d;
538   SEE_ATTR_DEFAULT = SEE_ATTR_DONTENUM;
539   SEE_ATTR_LENGTH  = SEE_ATTR_READONLY or SEE_ATTR_DONTDELETE or  SEE_ATTR_DONTENUM;
540 
541 {$ifdef libseehelper}
542 {$l libsee.so}
543 {$l libseewrap.o}
SEE_help_Global_evalnull544 function  SEE_help_Global_eval (para1 : PSEE_Interpreter; para2: PSEE_input; para3 : PSEE_value) : cint; cdecl; external;
SEE_help_CAUGHTnull545 function  SEE_help_CAUGHT(para1: TSEE_try_context) : PSEE_value; cdecl; external;
546 procedure SEE_help_THROW(para1: PSEE_Interpreter; para2: PSEE_value); cdecl; external;
547 procedure SEE_help_RETHROW(para1: PSEE_Interpreter; para2: PSEE_value); cdecl; external;
548 procedure SEE_help_DEFAULT_CATCH(para1: PSEE_Interpreter; para2: PSEE_try_context); cdecl; external;
new_SEE_interpreternull549 function new_SEE_interpreter : PSEE_Interpreter; cdecl; external;
new_SEE_valuenull550 function new_SEE_value : PSEE_Value; cdecl; external;
new_SEE_objectclassnull551 function new_SEE_objectclass : PSEE_objectclass; cdecl; external;
new_SEE_objectnull552 function new_SEE_object : PSEE_object; cdecl; external;
new_SEE_enumclassnull553 function new_SEE_enumclass : PTSEE_enumclass; cdecl; external;
new_SEE_enumnull554 function new_SEE_enum : PSEE_enum; cdecl; external;
new_SEE_nativenull555 function new_SEE_native : PSEE_native; cdecl; external;
new_SEE_scopenull556 function new_SEE_scope : PSEE_scope; cdecl; external;
new_SEE_inputclassnull557 function new_SEE_inputclass : PTSEE_inputclass; cdecl; external;
new_SEE_inputnull558 function new_SEE_input : PSEE_input; cdecl; external;
new_SEE_tracebacknull559 function new_SEE_traceback : PTSEE_traceback; cdecl; external;
new_SEE_contextnull560 function new_SEE_context : PSEE_context; cdecl; external;
new_SEE_stringclassnull561 function new_SEE_stringclass : PTSEE_stringclass; cdecl; external;
new_SEE_throw_locationnull562 function new_SEE_throw_location : PSEE_throw_location; cdecl; external;
new_SEE_try_contextnull563 function new_SEE_try_context : PSEE_try_context; cdecl; external;
564 procedure free_SEE_struct(P : pointer); cdecl; external;
565 {$else}
new_SEE_interpreternull566 function new_SEE_interpreter : PSEE_Interpreter;
new_SEE_valuenull567 function new_SEE_value : PSEE_Value;
new_SEE_objectclassnull568 function new_SEE_objectclass : PSEE_objectclass;
new_SEE_objectnull569 function new_SEE_object : PSEE_object;
new_SEE_enumclassnull570 function new_SEE_enumclass : PTSEE_enumclass;
new_SEE_enumnull571 function new_SEE_enum : PSEE_enum;
new_SEE_nativenull572 function new_SEE_native : PSEE_native;
new_SEE_scopenull573 function new_SEE_scope : PSEE_scope;
new_SEE_inputclassnull574 function new_SEE_inputclass : PTSEE_inputclass;
new_SEE_inputnull575 function new_SEE_input : PSEE_input;
new_SEE_tracebacknull576 function new_SEE_traceback : PTSEE_traceback;
new_SEE_contextnull577 function new_SEE_context : PSEE_context;
new_SEE_stringclassnull578 function new_SEE_stringclass : PTSEE_stringclass;
new_SEE_throw_locationnull579 function new_SEE_throw_location : PSEE_throw_location;
new_SEE_try_contextnull580 function new_SEE_try_context : PSEE_try_context;
581 procedure free_SEE_struct(P : pointer);
582 {$endif}
583 procedure Loadlibsee(Const Alib : string);
584 procedure Freelibsee;
LibseeLoadednull585 Function  LibseeLoaded : Boolean;
586 
587 implementation
588 
589 uses
590     SysUtils, dynlibs;
591 
592 {$ifndef libseehelper}
new_SEE_interpreternull593 function new_SEE_interpreter : PSEE_Interpreter;
594 
595 begin
596   Result:=SEE_malloc(Nil,SizeOf(TSEE_interpreter));
597 end;
598 
new_SEE_valuenull599 function new_SEE_value : PSEE_Value;
600 
601 begin
602   Result:=SEE_malloc(Nil,SizeOf(TSEE_Value));
603 end;
604 
new_SEE_objectclassnull605 function new_SEE_objectclass : PSEE_objectclass;
606 
607 begin
608   Result:=SEE_malloc(Nil,SizeOf(TSEE_objectclass));
609 end;
610 
new_SEE_objectnull611 function new_SEE_object : PSEE_object;
612 
613 begin
614   Result:=SEE_malloc(Nil,SizeOf(TSEE_object));
615 end;
616 
new_SEE_enumclassnull617 function new_SEE_enumclass : PTSEE_enumclass;
618 
619 begin
620   Result:=SEE_malloc(Nil,SizeOf(TSEE_enumclass));
621 end;
622 
new_SEE_enumnull623 function new_SEE_enum : PSEE_enum;
624 
625 begin
626   Result:=SEE_malloc(Nil,SizeOf(TSEE_enum));
627 end;
628 
new_SEE_nativenull629 function new_SEE_native : PSEE_native;
630 
631 begin
632   Result:=SEE_malloc(Nil,SizeOf(TSEE_native));
633 
634 end;
635 
new_SEE_scopenull636 function new_SEE_scope : PSEE_scope;
637 
638 begin
639   Result:=SEE_malloc(Nil,SizeOf(TSEE_scope));
640 end;
641 
new_SEE_inputclassnull642 function new_SEE_inputclass : PTSEE_inputclass;
643 
644 begin
645   Result:=SEE_malloc(Nil,SizeOf(TSEE_inputclass));
646 end;
647 
new_SEE_inputnull648 function new_SEE_input : PSEE_input;
649 
650 begin
651   Result:=SEE_malloc(Nil,SizeOf(TSEE_input));
652 
653 end;
654 
new_SEE_tracebacknull655 function new_SEE_traceback : PTSEE_traceback;
656 
657 begin
658   Result:=SEE_malloc(Nil,SizeOf(TSEE_traceback));
659 end;
660 
new_SEE_contextnull661 function new_SEE_context : PSEE_context;
662 
663 begin
664   Result:=SEE_malloc(Nil,SizeOf(TSEE_context));
665 end;
666 
new_SEE_stringclassnull667 function new_SEE_stringclass : PTSEE_stringclass;
668 
669 begin
670   Result:=SEE_malloc(Nil,SizeOf(TSEE_stringclass));
671 end;
672 
new_SEE_throw_locationnull673 function new_SEE_throw_location : PSEE_throw_location;
674 
675 begin
676   Result:=SEE_malloc(Nil,SizeOf(TSEE_throw_location));
677 end;
678 
new_SEE_try_contextnull679 function new_SEE_try_context : PSEE_try_context;
680 
681 begin
682   Result:=SEE_malloc(Nil,SizeOf(TSEE_try_context));
683 end;
684 
685 procedure free_SEE_struct(P : pointer);
686 begin
687   SEE_free(Nil,P);
688 end;
689 
690 {$endif}
691 
692 procedure SEE_OBJECT_PUT(Interp : PTSEE_interpreter; Obj : PSEE_object; prop:TPSEE_string; val:PTSEE_value; flags:Tcint);
693 
694 begin
695   obj^.objectclass^.Put(Interp,obj,prop,val,flags);
696 end;
697 // SEE_native_put : procedure(i:PTSEE_interpreter; obj:TPSEE_object; prop:TPSEE_string; val:PTSEE_value; flags:Tcint);cdecl;
SEE_VALUE_GET_TYPEnull698 function SEE_VALUE_GET_TYPE(v : PSEE_value) : TSEE_type;
699 
700 begin
701   Result:=v^._type;
702 end;
703 
704 procedure SEE_VALUE_COPY(dst, src : PSEE_value);
705 
706 begin
707   dst^:=src^;
708 end;
709 
710 procedure SEE_SET_TYPE(v: PSEE_VALUE; t : TSEE_type);
711 
712 begin
713   v^._type:=t;
714 end;
715 
716 procedure SEE_SET_UNDEFINED(v : PSEE_value);
717 
718 begin
719   SEE_SET_TYPE(v,SEE_UNDEFINED);
720 end;
721 
722 procedure SEE_SET_NULL(v : PSEE_value);
723 
724 begin
725   SEE_SET_TYPE(V,SEE_NULL);
726 end;
727 
728 procedure SEE_SET_BOOLEAN(v : PSEE_value; b : Boolean);
729 
730 begin
731   SEE_SET_TYPE(V,SEE_BOOLEAN);
732   V^.u.boolean:=char(ord(B));
733 end;
734 
735 procedure SEE_SET_NUMBER(v : PSEE_value; n : TSEE_number_t);
736 
737 begin
738  SEE_SET_TYPE(V,SEE_NUMBER);
739   V^.u.number:=N;
740 end;
741 
742 procedure SEE_SET_STRING(v :PSEE_value; s: PSEE_STRING);
743 
744 begin
745   SEE_SET_TYPE(V,SEE_STRING);
746   V^.u._string:=s
747 end;
748 
749 procedure SEE_SET_OBJECT(v :PSEE_value; o: PSEE_OBJECT);
750 begin
751   SEE_SET_TYPE(V,SEE_OBJECT);
752   V^.u._object:=o;
753 end;
754 
SEE_isnannull755 function SEE_isnan (n:TSEE_number_t):Tcint;
756 begin
757   Result:=_see_isnan(n);
758 end;
SEE_isfinitenull759 function SEE_isfinite (n:TSEE_number_t):Tcint;
760 
761 begin
762   result:=_see_isfinite(n);
763 end;
764 
SEE_copysignnull765 function SEE_copysign (x:TSEE_number_t; y:TSEE_number_t):TSEE_number_t;
766 
767 begin
768   result:=_see_copysign(x,y);
769 end;
770 
SEE_ispinfnull771 function SEE_ispinf (n:TSEE_number_t):Tcint;
772 
773 begin
774   result:=_see_ispinf(n);
775 end;
776 
SEE_isninfnull777 function  SEE_isninf (n:TSEE_number_t):Tcint;
778 
779 begin
780   result:=_see_isninf(n);
781 end;
782 
is_stringnull783   function is_string(var a : TSEE_growable) : Boolean;
784     begin
785       is_string:=((a.flag0 and bm_TSEE_growable_is_string) shr bp_TSEE_growable_is_string)<>0;
786     end;
787 
788   procedure set_is_string(var a : TSEE_growable; __is_string : Boolean);
789     begin
790       a.flag0:=a.flag0 or ((ord(__is_string) shl bp_TSEE_growable_is_string) and bm_TSEE_growable_is_string);
791     end;
792 
SEE_MODULE_PRIVATEnull793 Function SEE_MODULE_PRIVATE(i : PTSEE_interpreter; m : PSEE_module) : Pointer;
794 
795 begin
796   Result:=@I^.module_private[Integer(m^.index)];
797 end;
798 
799 procedure see_input_close(Inp : PSEE_INPUT);
800 
801 begin
802   Inp^.inputclass^.close(inp);
803 end;
804 
805 var
806   hlib : tlibhandle;
807 
808 procedure Freelibsee;
809 
810 begin
811   If HLib<>NilHandle then
812     FreeLibrary(hlib);
813   _SEE_isnan:=nil;
814   _SEE_isfinite:=nil;
815   _SEE_copysign:=nil;
816   _SEE_ispinf:=nil;
817   _SEE_isninf:=nil;
818   SEE_ToPrimitive:=nil;
819   SEE_ToBoolean:=nil;
820   SEE_ToNumber:=nil;
821   SEE_ToInteger:=nil;
822   SEE_ToString:=nil;
823   SEE_ToObject:=nil;
824   SEE_ToInt32:=nil;
825   SEE_ToUint32:=nil;
826   SEE_ToUint16:=nil;
827   _SEE_intern_assert:=nil;
828   SEE_intern_ascii:=nil;
829   SEE_function_is_joined:=nil;
830   SEE_Object_new:=nil;
831   SEE_object_call:=nil;
832   SEE_object_construct:=nil;
833   SEE_object_instanceof:=nil;
834   SEE_native_get:=nil;
835   SEE_native_put:=nil;
836   SEE_native_canput:=nil;
837   SEE_native_hasproperty:=nil;
838   SEE_native_hasownproperty:=nil;
839   SEE_native_getownattr:=nil;
840   SEE_native_delete:=nil;
841   SEE_native_defaultvalue:=nil;
842   SEE_native_enumerator:=nil;
843   SEE_native_new:=nil;
844   SEE_native_init:=nil;
845   SEE_cfunction_make:=nil;
846   SEE_parse_args:=nil;
847   SEE_parse_args:=nil;
848   SEE_call_args:=nil;
849   SEE_call_args:=nil;
850   SEE_PrintValue:=nil;
851   SEE_PrintObject:=nil;
852   SEE_PrintString:=nil;
853   SEE_PrintTraceback:=nil;
854   SEE_PrintContextTraceback:=nil;
855   SEE_Global_eval:=nil;
856   SEE_eval:=nil;
857   SEE_Function_new:=nil;
858   SEE_error__throw_string:=nil;
859   SEE_error__throw:=nil;
860   SEE_error__throw:=nil;
861   SEE_error__throw_sys:=nil;
862   SEE_error__throw_sys:=nil;
863   SEE_Error_make:=nil;
864   SEE_error__throw0:=nil;
865   SEE_error__throw0:=nil;
866   SEE_error__throw_sys0:=nil;
867   SEE_error__throw_sys0:=nil;
868   SEE_input_file:=nil;
869   SEE_input_string:=nil;
870   SEE_input_utf8:=nil;
871   SEE_input_lookahead:=nil;
872   SEE_input_lookahead_copy:=nil;
873   _SEE_intern_init:=nil;
874   SEE_intern:=nil;
875   SEE_intern_and_free:=nil;
876   SEE_intern_ascii:=nil;
877   SEE_intern_global:=nil;
878   SEE_interpreter_init:=nil;
879   SEE_interpreter_init_compat:=nil;
880   SEE_interpreter_save_state:=nil;
881   SEE_interpreter_restore_state:=nil;
882   SEE_context_eval:=nil;
883   SEE_malloc:=nil;
884   SEE_malloc_string:=nil;
885   SEE_malloc_finalize:=nil;
886   SEE_free:=nil;
887   SEE_gcollect:=nil;
888   _SEE_malloc_debug:=nil;
889   _SEE_malloc_string_debug:=nil;
890   _SEE_malloc_finalize_debug:=nil;
891   _SEE_free_debug:=nil;
892   SEE_grow_to:=nil;
893   _SEE_grow_to_debug:=nil;
894   SEE_module_add:=nil;
895   SEE_no_get:=nil;
896   SEE_no_put:=nil;
897   SEE_no_canput:=nil;
898   SEE_no_hasproperty:=nil;
899   SEE_no_delete:=nil;
900   SEE_no_defaultvalue:=nil;
901   SEE_no_enumerator:=nil;
902   SEE_string_addch:=nil;
903   SEE_string_append:=nil;
904   SEE_string_append_ascii:=nil;
905   SEE_string_append_int:=nil;
906   SEE_string_append_unicode:=nil;
907   SEE_string_fputs:=nil;
908   SEE_string_cmp:=nil;
909   SEE_string_cmp_ascii:=nil;
910   SEE_string_new:=nil;
911   SEE_string_dup:=nil;
912   SEE_string_substr:=nil;
913   SEE_string_concat:=nil;
914   SEE_string_sprintf:=nil;
915   SEE_string_sprintf:=nil;
916   SEE_string_literal:=nil;
917   SEE_string_fix:=nil;
918   SEE_string_free:=nil;
919   SEE_string_toutf8:=nil;
920   SEE_string_utf8_size:=nil;
921   _SEE_string_dup_fix:=nil;
922   SEE_init:=nil;
923   SEE_regex_engine_list:=nil;
924   SEE_regex_engine:=nil;
925   SEE_throw_abort:=nil;
926   SEE_location_string:=nil;
927   SEE_throw:=nil;
928   SEE_version:=nil;
929 end;
930 
LibseeLoadednull931 Function  LibseeLoaded : Boolean;
932 
933 begin
934   Result:=hlib<>nilhandle;
935 end;
936 
937 procedure Loadlibsee(Const Alib : string);
938 
939 begin
940   Freelibsee;
941   hlib:=LoadLibrary(pchar(Alib));
942   if hlib=0 then
943     raise Exception.Create(format('Could not load library: %s',[Alib]));
944   pointer(_SEE_isnan):=GetProcAddress(hlib,'_SEE_isnan');
945   pointer(_SEE_isfinite):=GetProcAddress(hlib,'_SEE_isfinite');
946   pointer(_SEE_copysign):=GetProcAddress(hlib,'_SEE_copysign');
947   pointer(_SEE_ispinf):=GetProcAddress(hlib,'_SEE_ispinf');
948   pointer(_SEE_isninf):=GetProcAddress(hlib,'_SEE_isninf');
949   pointer(SEE_ToPrimitive):=GetProcAddress(hlib,'SEE_ToPrimitive');
950   pointer(SEE_ToBoolean):=GetProcAddress(hlib,'SEE_ToBoolean');
951   pointer(SEE_ToNumber):=GetProcAddress(hlib,'SEE_ToNumber');
952   pointer(SEE_ToInteger):=GetProcAddress(hlib,'SEE_ToInteger');
953   pointer(SEE_ToString):=GetProcAddress(hlib,'SEE_ToString');
954   pointer(SEE_ToObject):=GetProcAddress(hlib,'SEE_ToObject');
955   pointer(SEE_ToInt32):=GetProcAddress(hlib,'SEE_ToInt32');
956   pointer(SEE_ToUint32):=GetProcAddress(hlib,'SEE_ToUint32');
957   pointer(SEE_ToUint16):=GetProcAddress(hlib,'SEE_ToUint16');
958   pointer(_SEE_intern_assert):=GetProcAddress(hlib,'_SEE_intern_assert');
959   pointer(SEE_intern_ascii):=GetProcAddress(hlib,'SEE_intern_ascii');
960   pointer(SEE_function_is_joined):=GetProcAddress(hlib,'SEE_function_is_joined');
961   pointer(SEE_Object_new):=GetProcAddress(hlib,'SEE_Object_new');
962   pointer(SEE_object_call):=GetProcAddress(hlib,'SEE_object_call');
963   pointer(SEE_object_construct):=GetProcAddress(hlib,'SEE_object_construct');
964   pointer(SEE_object_instanceof):=GetProcAddress(hlib,'SEE_object_instanceof');
965   pointer(SEE_native_get):=GetProcAddress(hlib,'SEE_native_get');
966   pointer(SEE_native_put):=GetProcAddress(hlib,'SEE_native_put');
967   pointer(SEE_native_canput):=GetProcAddress(hlib,'SEE_native_canput');
968   pointer(SEE_native_hasproperty):=GetProcAddress(hlib,'SEE_native_hasproperty');
969   pointer(SEE_native_hasownproperty):=GetProcAddress(hlib,'SEE_native_hasownproperty');
970   pointer(SEE_native_getownattr):=GetProcAddress(hlib,'SEE_native_getownattr');
971   pointer(SEE_native_delete):=GetProcAddress(hlib,'SEE_native_delete');
972   pointer(SEE_native_defaultvalue):=GetProcAddress(hlib,'SEE_native_defaultvalue');
973   pointer(SEE_native_enumerator):=GetProcAddress(hlib,'SEE_native_enumerator');
974   pointer(SEE_native_new):=GetProcAddress(hlib,'SEE_native_new');
975   pointer(SEE_native_init):=GetProcAddress(hlib,'SEE_native_init');
976   pointer(SEE_cfunction_make):=GetProcAddress(hlib,'SEE_cfunction_make');
977   pointer(SEE_parse_args):=GetProcAddress(hlib,'SEE_parse_args');
978   pointer(SEE_parse_args):=GetProcAddress(hlib,'SEE_parse_args');
979   pointer(SEE_call_args):=GetProcAddress(hlib,'SEE_call_args');
980   pointer(SEE_call_args):=GetProcAddress(hlib,'SEE_call_args');
981   pointer(SEE_PrintValue):=GetProcAddress(hlib,'SEE_PrintValue');
982   pointer(SEE_PrintObject):=GetProcAddress(hlib,'SEE_PrintObject');
983   pointer(SEE_PrintString):=GetProcAddress(hlib,'SEE_PrintString');
984   pointer(SEE_PrintTraceback):=GetProcAddress(hlib,'SEE_PrintTraceback');
985   pointer(SEE_PrintContextTraceback):=GetProcAddress(hlib,'SEE_PrintContextTraceback');
986   pointer(SEE_Global_eval):=GetProcAddress(hlib,'SEE_Global_eval');
987   pointer(SEE_eval):=GetProcAddress(hlib,'SEE_eval');
988   pointer(SEE_Function_new):=GetProcAddress(hlib,'SEE_Function_new');
989   pointer(SEE_error__throw_string):=GetProcAddress(hlib,'SEE_error__throw_string');
990   pointer(SEE_error__throw):=GetProcAddress(hlib,'SEE_error__throw');
991   pointer(SEE_error__throw):=GetProcAddress(hlib,'SEE_error__throw');
992   pointer(SEE_error__throw_sys):=GetProcAddress(hlib,'SEE_error__throw_sys');
993   pointer(SEE_error__throw_sys):=GetProcAddress(hlib,'SEE_error__throw_sys');
994   pointer(SEE_Error_make):=GetProcAddress(hlib,'SEE_Error_make');
995   pointer(SEE_error__throw0):=GetProcAddress(hlib,'SEE_error__throw0');
996   pointer(SEE_error__throw0):=GetProcAddress(hlib,'SEE_error__throw0');
997   pointer(SEE_error__throw_sys0):=GetProcAddress(hlib,'SEE_error__throw_sys0');
998   pointer(SEE_error__throw_sys0):=GetProcAddress(hlib,'SEE_error__throw_sys0');
999   pointer(SEE_input_file):=GetProcAddress(hlib,'SEE_input_file');
1000   pointer(SEE_input_string):=GetProcAddress(hlib,'SEE_input_string');
1001   pointer(SEE_input_utf8):=GetProcAddress(hlib,'SEE_input_utf8');
1002   pointer(SEE_input_lookahead):=GetProcAddress(hlib,'SEE_input_lookahead');
1003   pointer(SEE_input_lookahead_copy):=GetProcAddress(hlib,'SEE_input_lookahead_copy');
1004   pointer(_SEE_intern_init):=GetProcAddress(hlib,'_SEE_intern_init');
1005   pointer(SEE_intern):=GetProcAddress(hlib,'SEE_intern');
1006   pointer(SEE_intern_and_free):=GetProcAddress(hlib,'SEE_intern_and_free');
1007   pointer(SEE_intern_ascii):=GetProcAddress(hlib,'SEE_intern_ascii');
1008   pointer(SEE_intern_global):=GetProcAddress(hlib,'SEE_intern_global');
1009   pointer(SEE_interpreter_init):=GetProcAddress(hlib,'SEE_interpreter_init');
1010   pointer(SEE_interpreter_init_compat):=GetProcAddress(hlib,'SEE_interpreter_init_compat');
1011   pointer(SEE_interpreter_save_state):=GetProcAddress(hlib,'SEE_interpreter_save_state');
1012   pointer(SEE_interpreter_restore_state):=GetProcAddress(hlib,'SEE_interpreter_restore_state');
1013   pointer(SEE_context_eval):=GetProcAddress(hlib,'SEE_context_eval');
1014   pointer(SEE_malloc):=GetProcAddress(hlib,'SEE_malloc');
1015   pointer(SEE_malloc_string):=GetProcAddress(hlib,'SEE_malloc_string');
1016   pointer(SEE_malloc_finalize):=GetProcAddress(hlib,'SEE_malloc_finalize');
1017   pointer(SEE_free):=GetProcAddress(hlib,'SEE_free');
1018   pointer(SEE_gcollect):=GetProcAddress(hlib,'SEE_gcollect');
1019   pointer(_SEE_malloc_debug):=GetProcAddress(hlib,'_SEE_malloc_debug');
1020   pointer(_SEE_malloc_string_debug):=GetProcAddress(hlib,'_SEE_malloc_string_debug');
1021   pointer(_SEE_malloc_finalize_debug):=GetProcAddress(hlib,'_SEE_malloc_finalize_debug');
1022   pointer(_SEE_free_debug):=GetProcAddress(hlib,'_SEE_free_debug');
1023   pointer(SEE_grow_to):=GetProcAddress(hlib,'SEE_grow_to');
1024   pointer(_SEE_grow_to_debug):=GetProcAddress(hlib,'_SEE_grow_to_debug');
1025   pointer(SEE_module_add):=GetProcAddress(hlib,'SEE_module_add');
1026   pointer(SEE_no_get):=GetProcAddress(hlib,'SEE_no_get');
1027   pointer(SEE_no_put):=GetProcAddress(hlib,'SEE_no_put');
1028   pointer(SEE_no_canput):=GetProcAddress(hlib,'SEE_no_canput');
1029   pointer(SEE_no_hasproperty):=GetProcAddress(hlib,'SEE_no_hasproperty');
1030   pointer(SEE_no_delete):=GetProcAddress(hlib,'SEE_no_delete');
1031   pointer(SEE_no_defaultvalue):=GetProcAddress(hlib,'SEE_no_defaultvalue');
1032   pointer(SEE_no_enumerator):=GetProcAddress(hlib,'SEE_no_enumerator');
1033   pointer(SEE_string_addch):=GetProcAddress(hlib,'SEE_string_addch');
1034   pointer(SEE_string_append):=GetProcAddress(hlib,'SEE_string_append');
1035   pointer(SEE_string_append_ascii):=GetProcAddress(hlib,'SEE_string_append_ascii');
1036   pointer(SEE_string_append_int):=GetProcAddress(hlib,'SEE_string_append_int');
1037   pointer(SEE_string_append_unicode):=GetProcAddress(hlib,'SEE_string_append_unicode');
1038   pointer(SEE_string_fputs):=GetProcAddress(hlib,'SEE_string_fputs');
1039   pointer(SEE_string_cmp):=GetProcAddress(hlib,'SEE_string_cmp');
1040   pointer(SEE_string_cmp_ascii):=GetProcAddress(hlib,'SEE_string_cmp_ascii');
1041   pointer(SEE_string_new):=GetProcAddress(hlib,'SEE_string_new');
1042   pointer(SEE_string_dup):=GetProcAddress(hlib,'SEE_string_dup');
1043   pointer(SEE_string_substr):=GetProcAddress(hlib,'SEE_string_substr');
1044   pointer(SEE_string_concat):=GetProcAddress(hlib,'SEE_string_concat');
1045   pointer(SEE_string_sprintf):=GetProcAddress(hlib,'SEE_string_sprintf');
1046   pointer(SEE_string_sprintf):=GetProcAddress(hlib,'SEE_string_sprintf');
1047   pointer(SEE_string_literal):=GetProcAddress(hlib,'SEE_string_literal');
1048   pointer(SEE_string_fix):=GetProcAddress(hlib,'SEE_string_fix');
1049   pointer(SEE_string_free):=GetProcAddress(hlib,'SEE_string_free');
1050   pointer(SEE_string_toutf8):=GetProcAddress(hlib,'SEE_string_toutf8');
1051   pointer(SEE_string_utf8_size):=GetProcAddress(hlib,'SEE_string_utf8_size');
1052   pointer(_SEE_string_dup_fix):=GetProcAddress(hlib,'_SEE_string_dup_fix');
1053   pointer(SEE_init):=GetProcAddress(hlib,'SEE_init');
1054   pointer(SEE_regex_engine_list):=GetProcAddress(hlib,'SEE_regex_engine_list');
1055   pointer(SEE_regex_engine):=GetProcAddress(hlib,'SEE_regex_engine');
1056   pointer(SEE_throw_abort):=GetProcAddress(hlib,'SEE_throw_abort');
1057   pointer(SEE_location_string):=GetProcAddress(hlib,'SEE_location_string');
1058   pointer(SEE_throw):=GetProcAddress(hlib,'SEE_throw');
1059   pointer(SEE_version):=GetProcAddress(hlib,'SEE_version');
1060 end;
1061 
1062 
1063 initialization
1064   try
1065     Loadlibsee(LibSeeLibraryName);
1066   except
1067     // Ignore errors.
1068   end;
1069 
1070 finalization
1071   Freelibsee;
1072 end.
1073