Back to index

plt-scheme  4.2.1
schemex.h
Go to the documentation of this file.
00001 /*
00002   MzScheme
00003   Copyright (c) 2004-2009 PLT Scheme Inc.
00004   Copyright (c) 1995-2001 Matthew Flatt
00005   All rights reserved.
00006 
00007   Please see the full copyright in the documentation.
00008 
00009   Originally based on:
00010   libscheme
00011   Copyright (c) 1994 Brent Benson
00012   All rights reserved.
00013 */
00014 
00015 /* MzScheme function prototypes */
00016 /* Macros generally shouldn't go in this file; it is used both to
00017    prototype functions, and as a parsing source for
00018    declaring scheme_extension_table */
00019 
00020 /* The scheme_extension_table "parser" is picky; don't leave a space
00021    between a function name and it's opening parameter parenthesis. */
00022 
00023 /* After this START tag, all comments should start & end on same line */
00024 
00025 typedef struct {
00026 /*========================================================================*/
00027 /*                       setjmpup (continuations)                         */
00028 /*========================================================================*/
00029 void (*scheme_init_jmpup_buf)(Scheme_Jumpup_Buf *b);
00030 int (*scheme_setjmpup_relative)(Scheme_Jumpup_Buf *b, void *base,
00031                                    void * volatile start, struct Scheme_Cont *cont);
00032 void (*scheme_longjmpup)(Scheme_Jumpup_Buf *b);
00033 void (*scheme_reset_jmpup_buf)(Scheme_Jumpup_Buf *b);
00034 #ifdef USE_MZ_SETJMP
00035 int (*scheme_mz_setjmp)(mz_pre_jmp_buf b);
00036 void (*scheme_mz_longjmp)(mz_pre_jmp_buf b, int v);
00037 #endif
00038 void (*scheme_clear_escape)(void);
00039 Scheme_Jumpup_Buf_Holder *(*scheme_new_jmpupbuf_holder)(void);
00040 /*========================================================================*/
00041 /*                                parameters                              */
00042 /*========================================================================*/
00043 Scheme_Config *(*scheme_current_config)(void);
00044 Scheme_Config *(*scheme_extend_config)(Scheme_Config *c, int pos, Scheme_Object *init_val);
00045 void (*scheme_install_config)(Scheme_Config *);
00046 Scheme_Object *(*scheme_get_param)(Scheme_Config *c, int pos);
00047 void (*scheme_set_param)(Scheme_Config *c, int pos, Scheme_Object *o);
00048 Scheme_Object *(*scheme_get_thread_param)(Scheme_Config *c, Scheme_Thread_Cell_Table *cells, int pos);
00049 void (*scheme_set_thread_param)(Scheme_Config *c, Scheme_Thread_Cell_Table *cells, int pos, Scheme_Object *o);
00050 Scheme_Env *(*scheme_get_env)(Scheme_Config *config);
00051 Scheme_Thread_Cell_Table *(*scheme_inherit_cells)(Scheme_Thread_Cell_Table *cells);
00052 Scheme_Object *(*scheme_current_break_cell)();
00053 /*========================================================================*/
00054 /*                                threads                                 */
00055 /*========================================================================*/
00056 #ifndef LINK_EXTENSIONS_BY_TABLE
00057 # ifndef MZ_USE_PLACES
00058 Scheme_Thread *scheme_current_thread;
00059 # endif
00060 volatile int scheme_fuel_counter;
00061 #else
00062 Scheme_Thread **scheme_current_thread_ptr;
00063 volatile int *scheme_fuel_counter_ptr;
00064 #endif
00065 Scheme_Thread *(*scheme_get_current_thread)();
00066 void (*scheme_start_atomic)(void);
00067 void (*scheme_end_atomic)(void);
00068 void (*scheme_end_atomic_no_swap)(void);
00069 void (*scheme_start_in_scheduler)(void);
00070 void (*scheme_end_in_scheduler)(void);
00071 void (*scheme_out_of_fuel)(void);
00072 Scheme_Object *(*scheme_thread)(Scheme_Object *thunk);
00073 Scheme_Object *(*scheme_thread_w_details)(Scheme_Object *thunk, 
00074                                            Scheme_Config *init_config,
00075                                            Scheme_Thread_Cell_Table *copy_from,
00076                                            Scheme_Object *break_cell,
00077                                            Scheme_Custodian *owning_custodian, 
00078                                            int suspend_to_kill);
00079 void (*scheme_kill_thread)(Scheme_Thread *p);
00080 void (*scheme_break_thread)(Scheme_Thread *p);
00081 void (*scheme_break_main_thread)();
00082 void (*scheme_set_break_main_target)(Scheme_Thread *p);
00083 void (*scheme_thread_block)(float sleep_time);
00084 void (*scheme_thread_block_enable_break)(float sleep_time, int enable);
00085 void (*scheme_swap_thread)(Scheme_Thread *process);
00086 void (*scheme_making_progress)();
00087 void (*scheme_weak_suspend_thread)(Scheme_Thread *p);
00088 void (*scheme_weak_resume_thread)(Scheme_Thread *p);
00089 int (*scheme_block_until)(Scheme_Ready_Fun f, Scheme_Needs_Wakeup_Fun, Scheme_Object *, float);
00090 int (*scheme_block_until_enable_break)(Scheme_Ready_Fun f, Scheme_Needs_Wakeup_Fun, Scheme_Object *, 
00091                                          float, int enable);
00092 int (*scheme_block_until_unless)(Scheme_Ready_Fun f, Scheme_Needs_Wakeup_Fun fdf,
00093                                    Scheme_Object *data, float delay, 
00094                                    Scheme_Object *unless,
00095                                    int enable_break);
00096 void (*scheme_wait_input_allowed)(Scheme_Input_Port *port, int nonblock);
00097 int (*scheme_unless_ready)(Scheme_Object *unless);
00098 int (*scheme_in_main_thread)(void);
00099 void (*scheme_cancel_sleep)(void);
00100 void (*scheme_start_sleeper_thread)(void (*mzsleep)(float seconds, void *fds), float secs, void *fds, int hit_fd);
00101 void (*scheme_end_sleeper_thread)();
00102 void (*scheme_notify_sleep_progress)();
00103 Scheme_Object *(*scheme_make_thread_cell)(Scheme_Object *def_val, int inherited);
00104 Scheme_Object *(*scheme_thread_cell_get)(Scheme_Object *cell, Scheme_Thread_Cell_Table *cells);
00105 void (*scheme_thread_cell_set)(Scheme_Object *cell, Scheme_Thread_Cell_Table *cells, Scheme_Object *v);
00106 int (*scheme_tls_allocate)();
00107 void (*scheme_tls_set)(int pos, void *v);
00108 void *(*scheme_tls_get)(int pos);
00109 Scheme_Custodian *(*scheme_make_custodian)(Scheme_Custodian *);
00110 Scheme_Custodian_Reference *(*scheme_add_managed)(Scheme_Custodian *m, Scheme_Object *o,
00111                                                   Scheme_Close_Custodian_Client *f, void *data,
00112                                                   int strong);
00113 void (*scheme_custodian_check_available)(Scheme_Custodian *m, const char *who, const char *what);
00114 int (*scheme_custodian_is_available)(Scheme_Custodian *m);
00115 void (*scheme_remove_managed)(Scheme_Custodian_Reference *m, Scheme_Object *o);
00116 void (*scheme_close_managed)(Scheme_Custodian *m);
00117 void (*scheme_schedule_custodian_close)(Scheme_Custodian *c);
00118 void (*scheme_add_custodian_extractor)(Scheme_Type t, Scheme_Custodian_Extractor e);
00119 void (*scheme_add_atexit_closer)(Scheme_Exit_Closer_Func f);
00120 void (*scheme_add_evt)(Scheme_Type type,
00121                                Scheme_Ready_Fun ready,
00122                                Scheme_Needs_Wakeup_Fun wakeup,
00123                                Scheme_Sync_Filter_Fun filter,
00124                                int can_redirect);
00125 void (*scheme_add_evt_through_sema)(Scheme_Type type,
00126                                        Scheme_Sync_Sema_Fun sema,
00127                                        Scheme_Sync_Filter_Fun filter);
00128 int (*scheme_is_evt)(Scheme_Object *o);
00129 Scheme_Object *(*scheme_sync)(int argc, Scheme_Object *argv[]);
00130 Scheme_Object *(*scheme_sync_enable_break)(int argc, Scheme_Object *argv[]);
00131 Scheme_Object *(*scheme_sync_timeout)(int argc, Scheme_Object *argv[]);
00132 Scheme_Object *(*scheme_make_evt_set)(int argc, Scheme_Object **argv);
00133 void (*scheme_add_swap_callback)(Scheme_Closure_Func f, Scheme_Object *data);
00134 void (*scheme_add_swap_out_callback)(Scheme_Closure_Func f, Scheme_Object *data);
00135 Scheme_Object *(*scheme_call_enable_break)(Scheme_Prim *prim, int argc, Scheme_Object *argv[]);
00136 int (*scheme_close_should_force_port_closed)();
00137 void (*scheme_push_kill_action)(Scheme_Kill_Action_Func f, void *d);
00138 void (*scheme_pop_kill_action)();
00139 void (*scheme_set_can_break)(int on);
00140 void (*scheme_push_break_enable)(Scheme_Cont_Frame_Data *cframe, int on, int pre_check);
00141 void (*scheme_pop_break_enable)(Scheme_Cont_Frame_Data *cframe, int post_check);
00142 /*========================================================================*/
00143 /*                              error handling                            */
00144 /*========================================================================*/
00145 void (*scheme_signal_error)(const char *msg, ...);
00146 void (*scheme_raise_exn)(int exnid, ...);
00147 void (*scheme_warning)(char *msg, ...);
00148 void (*scheme_raise)(Scheme_Object *exn);
00149 int (*scheme_log_level_p)(Scheme_Logger *logger, int level);
00150 void (*scheme_log)(Scheme_Logger *logger, int level, int flags,
00151                           char *msg, ...);
00152 void (*scheme_log_message)(Scheme_Logger *logger, int level, char *buffer, long len, Scheme_Object *data);
00153 void (*scheme_log_abort)(char *buffer);
00154 void (*scheme_out_of_memory_abort)();
00155 void (*scheme_wrong_count)(const char *name, int minc, int maxc,
00156                               int argc, Scheme_Object **argv);
00157 void (*scheme_wrong_count_m)(const char *name, int minc, int maxc,
00158                                 int argc, Scheme_Object **argv,
00159                                 int is_method);
00160 void (*scheme_case_lambda_wrong_count)(const char *name, int argc,
00161                                          Scheme_Object **argv, int is_method, int count, ...);
00162 void (*scheme_wrong_type)(const char *name, const char *expected,
00163                              int which, int argc,
00164                              Scheme_Object **argv);
00165 void (*scheme_wrong_field_type)(Scheme_Object *c_name,
00166                                    const char *expected,
00167                                    Scheme_Object *o);
00168 void (*scheme_arg_mismatch)(const char *name, const char *msg, Scheme_Object *o);
00169 void (*scheme_wrong_return_arity)(const char *where,
00170                                     int expected, int got,
00171                                     Scheme_Object **argv,
00172                                     const char *context_detail, ...);
00173 void (*scheme_unbound_global)(Scheme_Bucket *b);
00174 Scheme_Object *(*scheme_dynamic_wind)(void (*pre)(void *),
00175                                         Scheme_Object *(* volatile act)(void *),
00176                                         void (* volatile post)(void *),
00177                                         Scheme_Object *(*jmp_handler)(void *),
00178                                         void * volatile data);
00179 /*========================================================================*/
00180 /*                                 types                                  */
00181 /*========================================================================*/
00182 Scheme_Type (*scheme_make_type)(const char *name);
00183 char *(*scheme_get_type_name)(Scheme_Type type);
00184 /*========================================================================*/
00185 /*                              constants                                 */
00186 /*========================================================================*/
00187 Scheme_Object *scheme_eof;
00188 Scheme_Object *(*scheme_make_eof)(void);
00189 Scheme_Object *scheme_null;
00190 Scheme_Object *(*scheme_make_null)(void);
00191 Scheme_Object *scheme_true;
00192 Scheme_Object *(*scheme_make_true)(void);
00193 Scheme_Object *scheme_false;
00194 Scheme_Object *(*scheme_make_false)(void);
00195 Scheme_Object *scheme_void;
00196 Scheme_Object *(*scheme_make_void)(void);
00197 Scheme_Object *scheme_undefined;
00198 Scheme_Object *scheme_tail_call_waiting;
00199 Scheme_Object *scheme_multiple_values;
00200 unsigned short **scheme_uchar_table;
00201 unsigned char **scheme_uchar_cases_table;
00202 unsigned char **scheme_uchar_cats_table;
00203 int *scheme_uchar_ups;
00204 int *scheme_uchar_downs;
00205 int *scheme_uchar_titles;
00206 int *scheme_uchar_folds;
00207 unsigned char *scheme_uchar_combining_classes;
00208 /*========================================================================*/
00209 /*                              evaluation                                */
00210 /*========================================================================*/
00211 Scheme_Object *(*scheme_eval)(Scheme_Object *obj, Scheme_Env *env);
00212 Scheme_Object *(*scheme_eval_multi)(Scheme_Object *obj, Scheme_Env *env);
00213 Scheme_Object *(*scheme_eval_with_prompt)(Scheme_Object *obj, Scheme_Env *env);
00214 Scheme_Object *(*scheme_eval_multi_with_prompt)(Scheme_Object *obj, Scheme_Env *env);
00215 Scheme_Object *(*scheme_eval_compiled)(Scheme_Object *obj, Scheme_Env *env);
00216 Scheme_Object *(*scheme_eval_compiled_multi)(Scheme_Object *obj, Scheme_Env *env);
00217 Scheme_Object *(*_scheme_eval_compiled)(Scheme_Object *obj, Scheme_Env *env);
00218 Scheme_Object *(*_scheme_eval_compiled_multi)(Scheme_Object *obj, Scheme_Env *env);
00219 Scheme_Object *(*scheme_apply)(Scheme_Object *rator, int num_rands, Scheme_Object **rands);
00220 Scheme_Object *(*scheme_apply_multi)(Scheme_Object *rator, int num_rands, Scheme_Object **rands);
00221 Scheme_Object *(*scheme_apply_no_eb)(Scheme_Object *rator, int num_rands, Scheme_Object **rands);
00222 Scheme_Object *(*scheme_apply_multi_no_eb)(Scheme_Object *rator, int num_rands, Scheme_Object **rands);
00223 Scheme_Object *(*scheme_apply_to_list)(Scheme_Object *rator, Scheme_Object *argss);
00224 Scheme_Object *(*scheme_apply_with_prompt)(Scheme_Object *rator, int num_rands, Scheme_Object **rands);
00225 Scheme_Object *(*scheme_apply_multi_with_prompt)(Scheme_Object *rator, int num_rands, Scheme_Object **rands);
00226 Scheme_Object *(*_scheme_apply_with_prompt)(Scheme_Object *rator, int num_rands, Scheme_Object **rands);
00227 Scheme_Object *(*_scheme_apply_multi_with_prompt)(Scheme_Object *rator, int num_rands, Scheme_Object **rands);
00228 Scheme_Object *(*scheme_eval_string)(const char *str, Scheme_Env *env);
00229 Scheme_Object *(*scheme_eval_string_multi)(const char *str, Scheme_Env *env);
00230 Scheme_Object *(*scheme_eval_string_all)(const char *str, Scheme_Env *env, int all);
00231 Scheme_Object *(*scheme_eval_string_with_prompt)(const char *str, Scheme_Env *env);
00232 Scheme_Object *(*scheme_eval_string_multi_with_prompt)(const char *str, Scheme_Env *env);
00233 Scheme_Object *(*scheme_eval_string_all_with_prompt)(const char *str, Scheme_Env *env, int all);
00234 Scheme_Object *(*scheme_eval_module_string)(const char *str, Scheme_Env *env);
00235 Scheme_Object *(*_scheme_apply_known_prim_closure)(Scheme_Object *rator, int argc,
00236                                                    Scheme_Object **argv);
00237 Scheme_Object *(*_scheme_apply_known_prim_closure_multi)(Scheme_Object *rator, int argc,
00238                                                         Scheme_Object **argv);
00239 Scheme_Object *(*_scheme_apply_prim_closure)(Scheme_Object *rator, int argc,
00240                                               Scheme_Object **argv);
00241 Scheme_Object *(*_scheme_apply_prim_closure_multi)(Scheme_Object *rator, int argc,
00242                                                    Scheme_Object **argv);
00243 Scheme_Object *(*scheme_call_with_prompt)(Scheme_Closed_Prim f, void *data);
00244 Scheme_Object *(*scheme_call_with_prompt_multi)(Scheme_Closed_Prim f, void *data);
00245 Scheme_Object *(*_scheme_call_with_prompt)(Scheme_Closed_Prim f, void *data);
00246 Scheme_Object *(*_scheme_call_with_prompt_multi)(Scheme_Closed_Prim f, void *data);
00247 Scheme_Object *(*scheme_values)(int c, Scheme_Object **v);
00248 Scheme_Object *(*scheme_check_one_value)(Scheme_Object *v);
00249 /* Tail calls - only use these when you're writing new functions/syntax */
00250 Scheme_Object *(*scheme_tail_apply)(Scheme_Object *f, int n, Scheme_Object **arg);
00251 Scheme_Object *(*scheme_tail_apply_no_copy)(Scheme_Object *f, int n, Scheme_Object **arg);
00252 Scheme_Object *(*scheme_tail_apply_to_list)(Scheme_Object *f, Scheme_Object *l);
00253 Scheme_Object *(*scheme_tail_eval_expr)(Scheme_Object *obj);
00254 void (*scheme_set_tail_buffer_size)(int s);
00255 Scheme_Object *(*scheme_force_value)(Scheme_Object *);
00256 Scheme_Object *(*scheme_force_one_value)(Scheme_Object *);
00257 MZ_MARK_STACK_TYPE (*scheme_set_cont_mark)(Scheme_Object *key, Scheme_Object *val);
00258 void (*scheme_push_continuation_frame)(Scheme_Cont_Frame_Data *);
00259 void (*scheme_pop_continuation_frame)(Scheme_Cont_Frame_Data *);
00260 void (*scheme_temp_dec_mark_depth)();
00261 void (*scheme_temp_inc_mark_depth)();
00262 Scheme_Object *(*scheme_current_continuation_marks)(Scheme_Object *prompt_tag);
00263 Scheme_Object *(*scheme_extract_one_cc_mark)(Scheme_Object *mark_set, 
00264                                               Scheme_Object *key);
00265 Scheme_Object *(*scheme_extract_one_cc_mark_to_tag)(Scheme_Object *mark_set, 
00266                                                            Scheme_Object *key,
00267                                                            Scheme_Object *prompt_tag);
00268 /* Internal */
00269 Scheme_Object *(*scheme_do_eval)(Scheme_Object *obj, int _num_rands, Scheme_Object **rands, int val);
00270 Scheme_Object *(*scheme_eval_compiled_stx_string)(Scheme_Object *expr, Scheme_Env *env,
00271                                                   long shift, Scheme_Object *modidx);
00272 Scheme_Object *(*scheme_load_compiled_stx_string)(const char *str, long len);
00273 Scheme_Object *(*scheme_compiled_stx_symbol)(Scheme_Object *stx);
00274 Scheme_Object *(*scheme_eval_compiled_sized_string)(const char *str, int len, Scheme_Env *env);
00275 Scheme_Object *(*scheme_eval_compiled_sized_string_with_magic)(const char *str, int len, Scheme_Env *env, 
00276                                                               Scheme_Object *magic_symbol, Scheme_Object *magic_val,
00277                                                               int multi_ok);
00278 void (*scheme_detach_multple_array)(Scheme_Object **a);
00279 /*========================================================================*/
00280 /*                           memory management                            */
00281 /*========================================================================*/
00282 /* The core allocator functions depend on the GC. Macros in scheme.h */
00283 /*  map to the apporpriate core allocation function. */
00284 #ifndef SCHEME_NO_GC
00285 # ifndef SCHEME_NO_GC_PROTO
00286 void *(*GC_malloc)(size_t size_in_bytes);
00287 void *(*GC_malloc_atomic)(size_t size_in_bytes);
00288 #  ifdef MZ_PRECISE_GC
00289 void *(*GC_malloc_one_tagged)(size_t size_in_bytes);
00290 void *(*GC_malloc_atomic_uncollectable)(size_t size_in_bytes);
00291 void *(*scheme_malloc_uncollectable)(size_t size_in_bytes);
00292 void *(*GC_malloc_array_tagged)(size_t size_in_bytes);
00293 void *(*GC_malloc_allow_interior)(size_t size_in_bytes);
00294 void *(*GC_malloc_atomic_allow_interior)(size_t size_in_bytes);
00295 void *(*GC_malloc_tagged_allow_interior)(size_t size_in_bytes);
00296 #  else
00297 void *(*GC_malloc_stubborn)(size_t size_in_bytes);
00298 void *(*GC_malloc_uncollectable)(size_t size_in_bytes);
00299 #  endif
00300 # endif
00301 #endif
00302 void *(*scheme_malloc_code)(long size);
00303 void (*scheme_free_code)(void *p);
00304 #ifndef MZ_PRECISE_GC
00305 void *(*scheme_malloc_gcable_code)(long size);
00306 #endif
00307 void *(*scheme_malloc_eternal)(size_t n);
00308 void (*scheme_end_stubborn_change)(void *p);
00309 void *(*scheme_calloc)(size_t num, size_t size);
00310 char *(*scheme_strdup)(const char *str);
00311 char *(*scheme_strdup_eternal)(const char *str);
00312 void *(*scheme_malloc_fail_ok)(void *(*f)(size_t), size_t);
00313 #ifndef MZ_PRECISE_GC
00314 void (*scheme_weak_reference)(void **p);
00315 void (*scheme_weak_reference_indirect)(void **p, void *v);
00316 void (*scheme_unweak_reference)(void **p);
00317 #endif
00318 void (*scheme_add_finalizer)(void *p, void (*f)(void *p, void *data), void *data);
00319 void (*scheme_add_finalizer_once)(void *p, void (*f)(void *p, void *data), void *data);
00320 void (*scheme_subtract_finalizer)(void *p, void (*f)(void *p, void *data), void *data);
00321 void (*scheme_add_scheme_finalizer)(void *p, void (*f)(void *p, void *data), void *data);
00322 void (*scheme_add_scheme_finalizer_once)(void *p, void (*f)(void *p, void *data), void *data);
00323 void (*scheme_register_finalizer)(void *p,
00324                                     void (*f)(void *p, void *data), void *data,
00325                                     void (**oldf)(void *p, void *data),
00326                                     void **olddata);
00327 void (*scheme_remove_all_finalization)(void *p);
00328 void (*scheme_dont_gc_ptr)(void *p);
00329 void (*scheme_gc_ptr_ok)(void *p);
00330 void (*scheme_collect_garbage)(void);
00331 #ifdef MZ_PRECISE_GC
00332 void **GC_variable_stack;
00333 void (*GC_register_traversers)(short tag, Size_Proc size, Mark_Proc mark, Fixup_Proc fixup,
00334                                   int is_constant_size, int is_atomic);
00335 void *(*GC_resolve)(void *p);
00336 void (*GC_mark)(const void *p);
00337 void (*GC_fixup)(void *p);
00338 void *(*GC_fixup_self)(void *p);
00339 #endif
00340 void **(*scheme_malloc_immobile_box)(void *p);
00341 void (*scheme_free_immobile_box)(void **b);
00342 /*========================================================================*/
00343 /*                             hash tables                                */
00344 /*========================================================================*/
00345 Scheme_Bucket_Table *(*scheme_make_bucket_table)(int size_hint, int type);
00346 void (*scheme_add_to_table)(Scheme_Bucket_Table *table, const char *key, void *val, int);
00347 void (*scheme_change_in_table)(Scheme_Bucket_Table *table, const char *key, void *new_val);
00348 void *(*scheme_lookup_in_table)(Scheme_Bucket_Table *table, const char *key);
00349 Scheme_Bucket *(*scheme_bucket_from_table)(Scheme_Bucket_Table *table, const char *key);
00350 int (*scheme_bucket_table_equal)(Scheme_Bucket_Table *t1, Scheme_Bucket_Table *t2);
00351 Scheme_Bucket_Table *(*scheme_clone_bucket_table)(Scheme_Bucket_Table *bt);
00352 Scheme_Hash_Table *(*scheme_make_hash_table)(int type);
00353 Scheme_Hash_Table *(*scheme_make_hash_table_equal)();
00354 Scheme_Hash_Table *(*scheme_make_hash_table_eqv)();
00355 void (*scheme_hash_set)(Scheme_Hash_Table *table, Scheme_Object *key, Scheme_Object *val);
00356 Scheme_Object *(*scheme_hash_get)(Scheme_Hash_Table *table, Scheme_Object *key);
00357 Scheme_Object *(*scheme_eq_hash_get)(Scheme_Hash_Table *table, Scheme_Object *key);
00358 void (*scheme_hash_set_atomic)(Scheme_Hash_Table *table, Scheme_Object *key, Scheme_Object *val);
00359 Scheme_Object *(*scheme_hash_get_atomic)(Scheme_Hash_Table *table, Scheme_Object *key);
00360 int (*scheme_hash_table_equal)(Scheme_Hash_Table *t1, Scheme_Hash_Table *t2);
00361 int (*scheme_is_hash_table_equal)(Scheme_Object *o);
00362 int (*scheme_is_hash_table_eqv)(Scheme_Object *o);
00363 Scheme_Hash_Table *(*scheme_clone_hash_table)(Scheme_Hash_Table *bt);
00364 Scheme_Hash_Tree *(*scheme_make_hash_tree)(int kind);
00365 Scheme_Hash_Tree *(*scheme_hash_tree_set)(Scheme_Hash_Tree *tree, Scheme_Object *key, Scheme_Object *val);
00366 Scheme_Object *(*scheme_hash_tree_get)(Scheme_Hash_Tree *tree, Scheme_Object *key);
00367 long (*scheme_hash_tree_next)(Scheme_Hash_Tree *tree, long pos);
00368 int (*scheme_hash_tree_index)(Scheme_Hash_Tree *tree, long pos, Scheme_Object **_key, Scheme_Object **_val);
00369 int (*scheme_hash_tree_equal)(Scheme_Hash_Tree *t1, Scheme_Hash_Tree *t2);
00370 int (*scheme_is_hash_tree_equal)(Scheme_Object *o);
00371 int (*scheme_is_hash_tree_eqv)(Scheme_Object *o);
00372 /*========================================================================*/
00373 /*                   basic Scheme value constructors                      */
00374 /*========================================================================*/
00375 Scheme_Object *(*scheme_make_prim)(Scheme_Prim *prim);
00376 Scheme_Object *(*scheme_make_noneternal_prim)(Scheme_Prim *prim);
00377 Scheme_Object *(*scheme_make_prim_w_arity)(Scheme_Prim *prim, const char *name,
00378                                    mzshort mina, mzshort maxa);
00379 Scheme_Object *(*scheme_make_folding_prim)(Scheme_Prim *prim,
00380                                    const char *name,
00381                                    mzshort mina, mzshort maxa,
00382                                    short functional);
00383 Scheme_Object *(*scheme_make_immed_prim)(Scheme_Prim *prim,
00384                                            const char *name,
00385                                            mzshort mina, mzshort maxa);
00386 Scheme_Object *(*scheme_make_noncm_prim)(Scheme_Prim *prim,
00387                                           const char *name,
00388                                           mzshort mina, mzshort maxa);
00389 Scheme_Object *(*scheme_make_noneternal_prim_w_arity)(Scheme_Prim *prim,
00390                                              const char *name,
00391                                              mzshort mina, mzshort maxa);
00392 Scheme_Object *(*scheme_make_prim_w_everything)(Scheme_Prim *fun, int eternal,
00393                                                  const char *name,
00394                                                  mzshort mina, mzshort maxa,
00395                                                  int folding,
00396                                                  mzshort minr, mzshort maxr);
00397 Scheme_Object *(*scheme_make_prim_closure_w_arity)(Scheme_Primitive_Closure_Proc *prim,
00398                                                    int size, Scheme_Object **vals,
00399                                                    const char *name,
00400                                                    mzshort mina, mzshort maxa);
00401 Scheme_Object *(*scheme_make_folding_prim_closure)(Scheme_Primitive_Closure_Proc *prim,
00402                                                    int size, Scheme_Object **vals,
00403                                                    const char *name,
00404                                                    mzshort mina, mzshort maxa,
00405                                                    short functional);
00406 Scheme_Object *(*scheme_make_closed_prim)(Scheme_Closed_Prim *prim, void *data);
00407 Scheme_Object *(*scheme_make_closed_prim_w_arity)(Scheme_Closed_Prim *prim,
00408                                                   void *data, const char *name,
00409                                                   mzshort mina, mzshort maxa);
00410 Scheme_Object *(*scheme_make_folding_closed_prim)(Scheme_Closed_Prim *prim,
00411                                                   void *data, const char *name,
00412                                                   mzshort mina, mzshort maxa,
00413                                                   short functional);
00414 Scheme_Object *(*scheme_make_closed_prim_w_everything)(Scheme_Closed_Prim *fun,
00415                                                        void *data,
00416                                                        const char *name,
00417                                                        mzshort mina, mzshort maxa,
00418                                                        short folding,
00419                                                        mzshort minr, mzshort maxr);
00420 void (*scheme_prim_is_method)(Scheme_Object *o);
00421 Scheme_Object *(*scheme_make_pair)(Scheme_Object *car, Scheme_Object *cdr);
00422 Scheme_Object *(*scheme_make_mutable_pair)(Scheme_Object *car, Scheme_Object *cdr);
00423 Scheme_Object *(*scheme_make_raw_pair)(Scheme_Object *, Scheme_Object *);
00424 Scheme_Object *(*scheme_make_byte_string)(const char *chars);
00425 Scheme_Object *(*scheme_make_sized_byte_string)(char *chars, long len, int copy);
00426 Scheme_Object *(*scheme_make_sized_offset_byte_string)(char *chars, long d, long len, int copy);
00427 Scheme_Object *(*scheme_make_immutable_sized_byte_string)(char *chars, long len, int copy);
00428 Scheme_Object *(*scheme_make_byte_string_without_copying)(char *chars);
00429 Scheme_Object *(*scheme_alloc_byte_string)(long size, char fill);
00430 Scheme_Object *(*scheme_append_byte_string)(Scheme_Object *, Scheme_Object *);
00431 Scheme_Object *(*scheme_make_utf8_string)(const char *chars);
00432 Scheme_Object *(*scheme_make_sized_utf8_string)(char *chars, long len);
00433 Scheme_Object *(*scheme_make_sized_offset_utf8_string)(char *chars, long d, long len);
00434 Scheme_Object *(*scheme_make_immutable_sized_utf8_string)(char *chars, long len);
00435 Scheme_Object *(*scheme_make_locale_string)(const char *chars);
00436 Scheme_Object *(*scheme_char_string_to_byte_string)(Scheme_Object *s);
00437 Scheme_Object *(*scheme_byte_string_to_char_string)(Scheme_Object *s);
00438 Scheme_Object *(*scheme_char_string_to_byte_string_locale)(Scheme_Object *s);
00439 Scheme_Object *(*scheme_byte_string_to_char_string_locale)(Scheme_Object *s);
00440 Scheme_Object *(*scheme_char_string_to_path)(Scheme_Object *p);
00441 Scheme_Object *(*scheme_path_to_char_string)(Scheme_Object *p);
00442 Scheme_Object *(*scheme_make_char_string)(const mzchar *chars);
00443 Scheme_Object *(*scheme_make_sized_char_string)(mzchar *chars, long len, int copy);
00444 Scheme_Object *(*scheme_make_sized_offset_char_string)(mzchar *chars, long d, long len, int copy);
00445 Scheme_Object *(*scheme_make_immutable_sized_char_string)(mzchar *chars, long len, int copy);
00446 Scheme_Object *(*scheme_make_char_string_without_copying)(mzchar *chars);
00447 Scheme_Object *(*scheme_alloc_char_string)(long size, mzchar fill);
00448 Scheme_Object *(*scheme_append_char_string)(Scheme_Object *, Scheme_Object *);
00449 mzchar *(*scheme_string_recase)(mzchar *s, int d, int len, int mode, int inplace, int *_len);
00450 Scheme_Object *(*scheme_make_vector)(long size, Scheme_Object *fill);
00451 Scheme_Object *(*scheme_make_integer_value)(long i);
00452 Scheme_Object *(*scheme_make_integer_value_from_unsigned)(unsigned long i);
00453 Scheme_Object *(*scheme_make_integer_value_from_long_long)(mzlonglong i);
00454 Scheme_Object *(*scheme_make_integer_value_from_unsigned_long_long)(umzlonglong i);
00455 Scheme_Object *(*scheme_make_integer_value_from_long_halves)(unsigned long lowhalf, unsigned long hihalf);
00456 Scheme_Object *(*scheme_make_integer_value_from_unsigned_long_halves)(unsigned long lowhalf, unsigned long hihalf);
00457 Scheme_Object *(*scheme_make_double)(double d);
00458 #ifdef MZ_USE_SINGLE_FLOATS
00459 Scheme_Object *(*scheme_make_float)(float f) ;
00460 #endif
00461 Scheme_Object *(*scheme_make_char)(mzchar ch);
00462 Scheme_Object *(*scheme_make_char_or_nul)(mzchar ch);
00463 Scheme_Object *(*scheme_make_sema)(long v);
00464 void (*scheme_post_sema)(Scheme_Object *o);
00465 void (*scheme_post_sema_all)(Scheme_Object *o);
00466 int (*scheme_wait_sema)(Scheme_Object *o, int just_try);
00467 int (*scheme_try_plain_sema)(Scheme_Object *o);
00468 Scheme_Object **scheme_char_constants;
00469 Scheme_Object *(*scheme_make_channel)();
00470 Scheme_Object *(*scheme_make_channel_put_evt)(Scheme_Object *ch, Scheme_Object *v);
00471 int (*scheme_get_int_val)(Scheme_Object *o, long *v);
00472 int (*scheme_get_unsigned_int_val)(Scheme_Object *o, unsigned long *v);
00473 int (*scheme_get_long_long_val)(Scheme_Object *o, mzlonglong *v);
00474 int (*scheme_get_unsigned_long_long_val)(Scheme_Object *o, umzlonglong *v);
00475 double (*scheme_real_to_double)(Scheme_Object *r);
00476 Scheme_Object *(*scheme_make_cptr)(void *cptr, Scheme_Object *typetag);
00477 Scheme_Object *(*scheme_make_offset_cptr)(void *cptr, long offset, Scheme_Object *typetag);
00478 const char *(*scheme_get_proc_name)(Scheme_Object *p, int *len, int for_error);
00479 /*========================================================================*/
00480 /*                               strings                                  */
00481 /*========================================================================*/
00482 int (*scheme_utf8_decode)(const unsigned char *s, int start, int end, 
00483                              unsigned int *us, int dstart, int dend,
00484                              long *ipos, char utf16, int permissive);
00485 int (*scheme_utf8_decode_as_prefix)(const unsigned char *s, int start, int end, 
00486                                       unsigned int *us, int dstart, int dend,
00487                                       long *ipos, char utf16, int permissive);
00488 int (*scheme_utf8_decode_all)(const unsigned char *s, int len, unsigned int *us, 
00489                                  int permissive);
00490 int (*scheme_utf8_decode_prefix)(const unsigned char *s, int len, unsigned int *us, 
00491                                    int permissive);
00492 mzchar *(*scheme_utf8_decode_to_buffer)(const unsigned char *s, int len, 
00493                                           mzchar *buf, int blen);
00494 mzchar *(*scheme_utf8_decode_to_buffer_len)(const unsigned char *s, int len, 
00495                                              mzchar *buf, int blen, long *rlen);
00496 int (*scheme_utf8_decode_count)(const unsigned char *s, int start, int end, 
00497                                                 int *_state, int might_continue, int permissive);
00498 int (*scheme_utf8_encode)(const unsigned int *us, int start, int end, 
00499                              unsigned char *s, int dstart,
00500                              char utf16);
00501 int (*scheme_utf8_encode_all)(const unsigned int *us, int len, unsigned char *s);
00502 char *(*scheme_utf8_encode_to_buffer)(const mzchar *s, int len, 
00503                                         char *buf, int blen);
00504 char *(*scheme_utf8_encode_to_buffer_len)(const mzchar *s, int len, 
00505                                            char *buf, int blen, long *rlen);
00506 unsigned short *(*scheme_ucs4_to_utf16)(const mzchar *text, int start, int end, 
00507                                           unsigned short *buf, int bufsize,
00508                                           long *ulen, int term_size);
00509 mzchar *(*scheme_utf16_to_ucs4)(const unsigned short *text, int start, int end, 
00510                                    mzchar *buf, int bufsize,
00511                                    long *ulen, int term_size);
00512 Scheme_Object *(*scheme_open_converter)(const char *from_e, const char *to_e);
00513 void (*scheme_close_converter)(Scheme_Object *conv);
00514 /*========================================================================*/
00515 /*                               bignums                                  */
00516 /*========================================================================*/
00517 Scheme_Object *(*scheme_make_bignum)(long v);
00518 Scheme_Object *(*scheme_make_bignum_from_unsigned)(unsigned long v);
00519 Scheme_Object *(*scheme_make_bignum_from_long_long)(mzlonglong v);
00520 Scheme_Object *(*scheme_make_bignum_from_unsigned_long_long)(umzlonglong v);
00521 double (*scheme_bignum_to_double)(const Scheme_Object *n);
00522 Scheme_Object *(*scheme_bignum_from_double)(double d);
00523 #ifdef MZ_USE_SINGLE_FLOATS
00524 float (*scheme_bignum_to_float)(const Scheme_Object *n);
00525 Scheme_Object *(*scheme_bignum_from_float)(float d);
00526 #else
00527 # define scheme_bignum_to_float scheme_bignum_to_double
00528 # define scheme_bignum_from_float scheme_bignum_from_double
00529 #endif
00530 char *(*scheme_bignum_to_string)(const Scheme_Object *n, int radix);
00531 char *(*scheme_bignum_to_allocated_string)(const Scheme_Object *n, int radix, int alloc);
00532 Scheme_Object *(*scheme_read_bignum)(const mzchar *str, int offset, int radix);
00533 Scheme_Object *(*scheme_read_bignum_bytes)(const char *str, int offset, int radix);
00534 Scheme_Object *(*scheme_bignum_normalize)(const Scheme_Object *n);
00535 /*========================================================================*/
00536 /*                              rationals                                 */
00537 /*========================================================================*/
00538 Scheme_Object *(*scheme_make_rational)(const Scheme_Object *r, const Scheme_Object *d);
00539 double (*scheme_rational_to_double)(const Scheme_Object *n);
00540 Scheme_Object *(*scheme_rational_from_double)(double d);
00541 #ifdef MZ_USE_SINGLE_FLOATS
00542 float (*scheme_rational_to_float)(const Scheme_Object *n);
00543 Scheme_Object *(*scheme_rational_from_float)(float d);
00544 #else
00545 # define scheme_rational_to_float scheme_rational_to_double
00546 # define scheme_rational_from_float scheme_rational_from_double
00547 #endif
00548 Scheme_Object *(*scheme_rational_normalize)(const Scheme_Object *n);
00549 Scheme_Object *(*scheme_rational_numerator)(const Scheme_Object *n);
00550 Scheme_Object *(*scheme_rational_denominator)(const Scheme_Object *n);
00551 /*========================================================================*/
00552 /*                              complexes                                 */
00553 /*========================================================================*/
00554 Scheme_Object *(*scheme_make_complex)(const Scheme_Object *r, const Scheme_Object *i);
00555 Scheme_Object *(*scheme_complex_normalize)(const Scheme_Object *n);
00556 Scheme_Object *(*scheme_complex_real_part)(const Scheme_Object *n);
00557 Scheme_Object *(*scheme_complex_imaginary_part)(const Scheme_Object *n);
00558 /* Exact/inexact: */
00559 int (*scheme_is_exact)(const Scheme_Object *n);
00560 int (*scheme_is_inexact)(const Scheme_Object *n);
00561 /*========================================================================*/
00562 /*                 macros, syntax, and compilation                        */
00563 /*========================================================================*/
00564 Scheme_Object *(*scheme_expand)(Scheme_Object *form, Scheme_Env *env);
00565 Scheme_Object *(*scheme_compile)(Scheme_Object *form, Scheme_Env *env, int writeable);
00566 /*========================================================================*/
00567 /*                               ports                                    */
00568 /*========================================================================*/
00569 Scheme_Object *(*scheme_read)(Scheme_Object *port);
00570 Scheme_Object *(*scheme_read_syntax)(Scheme_Object *port, Scheme_Object *stxsrc);
00571 void (*scheme_write)(Scheme_Object *obj, Scheme_Object *port);
00572 void (*scheme_display)(Scheme_Object *obj, Scheme_Object *port);
00573 void (*scheme_print)(Scheme_Object *obj, Scheme_Object *port);
00574 void (*scheme_write_w_max)(Scheme_Object *obj, Scheme_Object *port, long maxl);
00575 void (*scheme_display_w_max)(Scheme_Object *obj, Scheme_Object *port, long maxl);
00576 void (*scheme_print_w_max)(Scheme_Object *obj, Scheme_Object *port, long maxl);
00577 void (*scheme_write_byte_string)(const char *str, long len, Scheme_Object *port);
00578 void (*scheme_write_char_string)(const mzchar *str, long len, Scheme_Object *port);
00579 long (*scheme_put_byte_string)(const char *who, Scheme_Object *port,
00580                                   const char *str, long d, long len,
00581                                   int rarely_block);
00582 long (*scheme_put_char_string)(const char *who, Scheme_Object *port,
00583                                   const mzchar *str, long d, long len);
00584 char *(*scheme_write_to_string)(Scheme_Object *obj, long *len);
00585 char *(*scheme_display_to_string)(Scheme_Object *obj, long *len);
00586 char *(*scheme_print_to_string)(Scheme_Object *obj, long *len);
00587 char *(*scheme_write_to_string_w_max)(Scheme_Object *obj, long *len, long maxl);
00588 char *(*scheme_display_to_string_w_max)(Scheme_Object *obj, long *len, long maxl);
00589 char *(*scheme_print_to_string_w_max)(Scheme_Object *obj, long *len, long maxl);
00590 void (*scheme_debug_print)(Scheme_Object *obj);
00591 void (*scheme_flush_output)(Scheme_Object *port);
00592 char *(*scheme_format)(mzchar *format, int flen, int argc, Scheme_Object **argv, long *rlen);
00593 void (*scheme_printf)(mzchar *format, int flen, int argc, Scheme_Object **argv);
00594 char *(*scheme_format_utf8)(char *format, int flen, int argc, Scheme_Object **argv, long *rlen);
00595 void (*scheme_printf_utf8)(char *format, int flen, int argc, Scheme_Object **argv);
00596 int (*scheme_getc)(Scheme_Object *port);
00597 int (*scheme_get_byte)(Scheme_Object *port);
00598 int (*scheme_peekc)(Scheme_Object *port);
00599 int (*scheme_peek_byte)(Scheme_Object *port);
00600 int (*scheme_peekc_skip)(Scheme_Object *port, Scheme_Object *skip);
00601 int (*scheme_peek_byte_skip)(Scheme_Object *port, Scheme_Object *skip, Scheme_Object *unless_evt);
00602 int (*scheme_getc_special_ok)(Scheme_Object *port);
00603 int (*scheme_get_byte_special_ok)(Scheme_Object *port);
00604 int (*scheme_peekc_special_ok)(Scheme_Object *port);
00605 int (*scheme_peek_byte_special_ok_skip)(Scheme_Object *port, Scheme_Object *skip, Scheme_Object *unless_evt);
00606 int (*scheme_peekc_special_ok_skip)(Scheme_Object *port, Scheme_Object *skip);
00607 void (*scheme_ungetc)(int ch, Scheme_Object *port);
00608 int (*scheme_byte_ready)(Scheme_Object *port);
00609 int (*scheme_char_ready)(Scheme_Object *port);
00610 int (*scheme_peekc_is_ungetc)(Scheme_Object *port);
00611 void (*scheme_need_wakeup)(Scheme_Object *port, void *fds);
00612 long (*scheme_get_byte_string)(const char *who,
00613                                   Scheme_Object *port,
00614                                   char *buffer, long offset, long size,
00615                                   int only_avail,
00616                                   int peek, Scheme_Object *peek_skip);
00617 long (*scheme_get_byte_string_unless)(const char *who,
00618                                         Scheme_Object *port,
00619                                         char *buffer, long offset, long size,
00620                                         int only_avail,
00621                                         int peek, Scheme_Object *peek_skip,
00622                                         Scheme_Object *unless_evt);
00623 long (*scheme_get_byte_string_special_ok_unless)(const char *who,
00624                                                  Scheme_Object *port,
00625                                                  char *buffer, long offset, long size,
00626                                                  int only_avail,
00627                                                  int peek, Scheme_Object *peek_skip,
00628                                                  Scheme_Object *unless_evt);
00629 Scheme_Object *(*scheme_progress_evt)(Scheme_Object *port);
00630 int (*scheme_peeked_read)(Scheme_Object *port,
00631                              long size,
00632                              Scheme_Object *unless_evt,
00633                              Scheme_Object *target_evt);
00634 long (*scheme_get_char_string)(const char *who,
00635                                   Scheme_Object *port,
00636                                   mzchar *buffer, long offset, long size,
00637                                   int peek, Scheme_Object *peek_skip);
00638 long (*scheme_get_bytes)(Scheme_Object *port, long size, char *buffer, int offset);
00639 Scheme_Object *(*scheme_get_ready_special)(Scheme_Object *port, Scheme_Object *stxsrc, int peek);
00640 long (*scheme_tell)(Scheme_Object *port);
00641 long (*scheme_output_tell)(Scheme_Object *port);
00642 long (*scheme_tell_line)(Scheme_Object *port);
00643 long (*scheme_tell_column)(Scheme_Object *port);
00644 void (*scheme_tell_all)(Scheme_Object *port, long *line, long *col, long *pos);
00645 void (*scheme_count_lines)(Scheme_Object *port);
00646 void (*scheme_close_input_port)(Scheme_Object *port);
00647 void (*scheme_close_output_port)(Scheme_Object *port);
00648 Scheme_Object *(*scheme_write_special)(int argc, Scheme_Object *argv[]);
00649 Scheme_Object *(*scheme_write_special_nonblock)(int argc, Scheme_Object *argv[]);
00650 Scheme_Object *(*scheme_make_write_evt)(const char *who, Scheme_Object *port,
00651                                           Scheme_Object *special, char *str, long start, long size);
00652 Scheme_Port *(*scheme_port_record)(Scheme_Object *port);
00653 Scheme_Input_Port *(*scheme_input_port_record)(Scheme_Object *port);
00654 Scheme_Output_Port *(*scheme_output_port_record)(Scheme_Object *port);
00655 int (*scheme_is_input_port)(Scheme_Object *port);
00656 int (*scheme_is_output_port)(Scheme_Object *port);
00657 Scheme_Object *(*scheme_make_port_type)(const char *name);
00658 Scheme_Input_Port *(*scheme_make_input_port)(Scheme_Object *subtype, void *data,
00659                                               Scheme_Object *name,
00660                                               Scheme_Get_String_Fun get_byte_string_fun,
00661                                               Scheme_Peek_String_Fun peek_string_fun,
00662                                               Scheme_Progress_Evt_Fun progress_evt_fun,
00663                                               Scheme_Peeked_Read_Fun peeked_read_fun,
00664                                               Scheme_In_Ready_Fun byte_ready_fun,
00665                                               Scheme_Close_Input_Fun close_fun,
00666                                               Scheme_Need_Wakeup_Input_Fun need_wakeup_fun,
00667                                               int must_close);
00668 Scheme_Output_Port *(*scheme_make_output_port)(Scheme_Object *subtype, void *data,
00669                                                 Scheme_Object *name,
00670                                                 Scheme_Write_String_Evt_Fun write_byte_string_evt_fun,
00671                                                 Scheme_Write_String_Fun write_byte_string_fun,
00672                                                 Scheme_Out_Ready_Fun ready_fun,
00673                                                 Scheme_Close_Output_Fun close_fun,
00674                                                 Scheme_Need_Wakeup_Output_Fun need_wakeup_fun,
00675                                                 Scheme_Write_Special_Evt_Fun write_special_evt_fun,
00676                                                 Scheme_Write_Special_Fun write_special_fun,
00677                                                 int must_close);
00678 void (*scheme_set_next_port_custodian)(Scheme_Custodian *c);
00679 void (*scheme_set_port_location_fun)(Scheme_Port *port,
00680                                        Scheme_Location_Fun location_fun);
00681 void (*scheme_set_port_count_lines_fun)(Scheme_Port *port,
00682                                           Scheme_Count_Lines_Fun count_lines_fun);
00683 Scheme_Object *(*scheme_progress_evt_via_get)(Scheme_Input_Port *port);
00684 int (*scheme_peeked_read_via_get)(Scheme_Input_Port *port,
00685                                     long size,
00686                                     Scheme_Object *unless_evt,
00687                                     Scheme_Object *target_ch);
00688 Scheme_Object *(*scheme_write_evt_via_write)(Scheme_Output_Port *port,
00689                                               const char *str, long offset, long size);
00690 Scheme_Object *(*scheme_write_special_evt_via_write_special)(Scheme_Output_Port *port, 
00691                                                             Scheme_Object *special);
00692 Scheme_Object *(*scheme_open_input_file)(const char *name, const char *who);
00693 Scheme_Object *(*scheme_open_output_file)(const char *name, const char *who);
00694 Scheme_Object *(*scheme_open_input_output_file)(const char *name, const char *who, Scheme_Object **oport);
00695 Scheme_Object *(*scheme_open_output_file_with_mode)(const char *name, const char *who, int text);
00696 Scheme_Object *(*scheme_make_file_input_port)(FILE *fp);
00697 Scheme_Object *(*scheme_make_named_file_input_port)(FILE *fp, Scheme_Object *name);
00698 Scheme_Object *(*scheme_make_file_output_port)(FILE *fp);
00699 Scheme_Object *(*scheme_make_fd_input_port)(int fd, Scheme_Object *name, int regfile, int win_textmode);
00700 Scheme_Object *(*scheme_make_fd_output_port)(int fd, Scheme_Object *name, int regfile, int win_textmode, int read_too);
00701 Scheme_Object *(*scheme_make_byte_string_input_port)(const char *str);
00702 Scheme_Object *(*scheme_make_sized_byte_string_input_port)(const char *str, long len);
00703 Scheme_Object *(*scheme_make_byte_string_output_port)();
00704 char *(*scheme_get_sized_byte_string_output)(Scheme_Object *port, long *len);
00705 char *(*scheme_get_reset_sized_byte_string_output)(Scheme_Object *port, long *len, int reset, long startpos, long endpos);
00706 void (*scheme_pipe)(Scheme_Object **read, Scheme_Object **write);
00707 void (*scheme_pipe_with_limit)(Scheme_Object **write, Scheme_Object **read, int maxsize);
00708 Scheme_Object *(*scheme_make_null_output_port)(int can_write_special);
00709 Scheme_Object *(*scheme_make_redirect_output_port)(Scheme_Object *port);
00710 long (*scheme_set_file_position)(Scheme_Object *port, long pos);
00711 int (*scheme_file_exists)(char *filename);
00712 int (*scheme_directory_exists)(char *dirname);
00713 char *(*scheme_expand_filename)(char* filename, int ilen, const char *errorin, int *ex, int guards);
00714 char *(*scheme_expand_user_filename)(char* filename, int ilen, const char *errorin, int *ex, int guards);
00715 char *(*scheme_expand_string_filename)(Scheme_Object *f, const char *errorin, int *ex, int guards);
00716 char *(*scheme_os_getcwd)(char *buf, int buflen, int *actlen, int noexn);
00717 int (*scheme_os_setcwd)(char *buf, int noexn);
00718 char *(*scheme_getdrive)(void);
00719 Scheme_Object *(*scheme_split_path)(const char *path, int len, Scheme_Object **base, int *isdir, int kind);
00720 Scheme_Object *(*scheme_build_path)(int argc, Scheme_Object **argv);
00721 Scheme_Object *(*scheme_path_to_directory_path)(Scheme_Object *p);
00722 Scheme_Object *(*scheme_path_to_complete_path)(Scheme_Object *path, Scheme_Object *relto_path);
00723 Scheme_Object *(*scheme_make_path)(const char *chars);
00724 Scheme_Object *(*scheme_make_sized_path)(char *chars, long len, int copy);
00725 Scheme_Object *(*scheme_make_sized_offset_path)(char *chars, long d, long len, int copy);
00726 Scheme_Object *(*scheme_make_sized_offset_kind_path)(char *chars, long d, long len, int copy, int kind);
00727 Scheme_Object *(*scheme_make_path_without_copying)(char *chars);
00728 #ifdef MACINTOSH_EVENTS
00729 char *(*scheme_mac_spec_to_path)(mzFSSpec *spec);
00730 int (*scheme_mac_path_to_spec)(const char *filename, mzFSSpec *spec);
00731 #endif
00732 void *(*scheme_alloc_fdset_array)(int count, int permanent);
00733 void *(*scheme_init_fdset_array)(void *fdarray, int count);
00734 void *(*scheme_get_fdset)(void *fdarray, int pos);
00735 void (*scheme_fdzero)(void *fd);
00736 void (*scheme_fdset)(void *fd, int pos);
00737 void (*scheme_fdclr)(void *fd, int pos);
00738 int (*scheme_fdisset)(void *fd, int pos);
00739 void (*scheme_add_fd_handle)(void *h, void *fds, int repost);
00740 void (*scheme_add_fd_eventmask)(void *fds, int mask);
00741 void (*scheme_collapse_win_fd)(void *fds);
00742 void (*scheme_security_check_file)(const char *who, const char *filename, int guards);
00743 void (*scheme_security_check_file_link)(const char *who, const char *filename, const char *content);
00744 void (*scheme_security_check_network)(const char *who, const char *host, int port, int client);
00745 struct mz_addrinfo *(*scheme_get_host_address)(const char *address, int id, int *err, 
00746                                                 int family, int passive, int tcp);
00747 void (*scheme_free_host_address)(struct mz_addrinfo *a);
00748 const char *(*scheme_host_address_strerror)(int errnum);
00749 void (*scheme_getnameinfo)(void *sa, int salen, 
00750                               char *host, int hostlen,
00751                               char *serv, int servlen);
00752 int (*scheme_get_port_file_descriptor)(Scheme_Object *p, long *_fd);
00753 long (*scheme_get_port_fd)(Scheme_Object *p);
00754 int (*scheme_get_port_socket)(Scheme_Object *p, long *_s);
00755 void (*scheme_socket_to_ports)(long s, const char *name, int takeover,
00756                                       Scheme_Object **_inp, Scheme_Object **_outp);
00757 void (*scheme_set_type_printer)(Scheme_Type stype, Scheme_Type_Printer printer);
00758 void (*scheme_print_bytes)(Scheme_Print_Params *pp, const char *str, int offset, int len);
00759 void (*scheme_print_utf8)(Scheme_Print_Params *pp, const char *str, int offset, int len);
00760 void (*scheme_print_string)(Scheme_Print_Params *pp, const mzchar *str, int offset, int len);
00761 Scheme_Object *(*scheme_read_byte_string)(Scheme_Object *port);
00762 /*========================================================================*/
00763 /*                        namespace/environment                           */
00764 /*========================================================================*/
00765 Scheme_Object *(*scheme_make_namespace)(int argc, Scheme_Object *argv[]);
00766 void (*scheme_add_namespace_option)(Scheme_Object *key, void (*f)(Scheme_Env *));
00767 void (*scheme_add_global)(const char *name, Scheme_Object *val, Scheme_Env *env);
00768 void (*scheme_add_global_symbol)(Scheme_Object *name, Scheme_Object *val,
00769                            Scheme_Env *env);
00770 Scheme_Object *(*scheme_make_envunbox)(Scheme_Object *value);
00771 Scheme_Object *(*scheme_lookup_global)(Scheme_Object *symbol, Scheme_Env *env);
00772 Scheme_Bucket *(*scheme_global_bucket)(Scheme_Object *symbol, Scheme_Env *env);
00773 Scheme_Bucket *(*scheme_global_keyword_bucket)(Scheme_Object *symbol, Scheme_Env *env);
00774 Scheme_Bucket *(*scheme_module_bucket)(Scheme_Object *mod, Scheme_Object *var, int pos, Scheme_Env *env);
00775 Scheme_Object *(*scheme_builtin_value)(const char *name); /* convenience */
00776 void (*scheme_set_global_bucket)(char *proc, Scheme_Bucket *var, Scheme_Object *val,
00777                                         int set_undef);
00778 void (*scheme_install_macro)(Scheme_Bucket *b, Scheme_Object *v);
00779 void (*scheme_save_initial_module_set)(Scheme_Env *env);
00780 Scheme_Env *(*scheme_primitive_module)(Scheme_Object *name, Scheme_Env *for_env);
00781 void (*scheme_finish_primitive_module)(Scheme_Env *env);
00782 void (*scheme_protect_primitive_provide)(Scheme_Env *env, Scheme_Object *name);
00783 Scheme_Object *(*scheme_make_modidx)(Scheme_Object *path,
00784                               Scheme_Object *base,
00785                               Scheme_Object *resolved);
00786 Scheme_Object *(*scheme_apply_for_syntax_in_env)(Scheme_Object *proc, Scheme_Env *env);
00787 Scheme_Object *(*scheme_dynamic_require)(int argc, Scheme_Object *argv[]);
00788 Scheme_Object *(*scheme_namespace_require)(Scheme_Object *);
00789 int (*scheme_is_module_path)(Scheme_Object *);
00790 Scheme_Object *(*scheme_datum_to_kernel_stx)(Scheme_Object *e);
00791 /*========================================================================*/
00792 /*                                symbols                                 */
00793 /*========================================================================*/
00794 Scheme_Object *(*scheme_intern_symbol)(const char *name);
00795 Scheme_Object *(*scheme_intern_exact_symbol)(const char *name, unsigned int len);
00796 Scheme_Object *(*scheme_intern_exact_char_symbol)(const mzchar *name, unsigned int len);
00797 Scheme_Object *(*scheme_make_symbol)(const char *name); /* Make uninterned */
00798 Scheme_Object *(*scheme_make_exact_symbol)(const char *name, unsigned int len); /* Exact case */
00799 Scheme_Object *(*scheme_make_exact_char_symbol)(const mzchar *name, unsigned int len); /* Exact case */
00800 const char *(*scheme_symbol_name)(Scheme_Object *sym);
00801 const char *(*scheme_symbol_name_and_size)(Scheme_Object *sym, unsigned int *l, int flags);
00802 char *(*scheme_symbol_val)(Scheme_Object *sym);
00803 Scheme_Object *(*scheme_intern_exact_keyword)(const char *name, unsigned int len);
00804 Scheme_Object *(*scheme_intern_exact_char_keyword)(const mzchar *name, unsigned int len);
00805 /*========================================================================*/
00806 /*                                structs                                 */
00807 /*========================================================================*/
00808 Scheme_Object **(*scheme_make_struct_values)(Scheme_Object *struct_type,
00809                                      Scheme_Object **names,
00810                                      int count, int flags);
00811 Scheme_Object **(*scheme_make_struct_names)(Scheme_Object *base,
00812                                     Scheme_Object *field_names,
00813                                     int flags, int *count_out);
00814 Scheme_Object *(*scheme_make_struct_type)(Scheme_Object *base,
00815                                            Scheme_Object *parent,
00816                                            Scheme_Object *inspector,
00817                                            int num_fields, int num_uninit_fields,
00818                                            Scheme_Object *uninit_val,
00819                                            Scheme_Object *properties,
00820                                            Scheme_Object *guard);
00821 Scheme_Object *(*scheme_make_struct_instance)(Scheme_Object *stype,
00822                                                int argc,
00823                                                Scheme_Object **argv);
00824 Scheme_Object *(*scheme_make_struct_exptime)(Scheme_Object **names, int count,
00825                                               Scheme_Object *super_sym,
00826                                               Scheme_Object *super_exptime,
00827                                               int flags);
00828 int (*scheme_is_struct_instance)(Scheme_Object *type, Scheme_Object *v);
00829 Scheme_Object *(*scheme_struct_ref)(Scheme_Object *s, int pos);
00830 void (*scheme_struct_set)(Scheme_Object *s, int pos, Scheme_Object *v);
00831 Scheme_Object *(*scheme_make_struct_type_property)(Scheme_Object *name);
00832 Scheme_Object *(*scheme_make_struct_type_property_w_guard)(Scheme_Object *name, Scheme_Object *guard);
00833 Scheme_Object *(*scheme_struct_type_property_ref)(Scheme_Object *prop, Scheme_Object *s);
00834 Scheme_Object *(*scheme_make_location)(Scheme_Object *src,
00835                                          Scheme_Object *line,
00836                                          Scheme_Object *col,
00837                                          Scheme_Object *pos,
00838                                          Scheme_Object *span);
00839 int (*scheme_is_location)(Scheme_Object *o);
00840 Scheme_Object *(*scheme_make_inspector)(Scheme_Object *superior);
00841 int (*scheme_is_subinspector)(Scheme_Object *i, Scheme_Object *sup);
00842 /*========================================================================*/
00843 /*                              utilities                                 */
00844 /*========================================================================*/
00845 int (*scheme_eq)(Scheme_Object *obj1, Scheme_Object *obj2);
00846 int (*scheme_eqv)(Scheme_Object *obj1, Scheme_Object *obj2);
00847 int (*scheme_equal)(Scheme_Object *obj1, Scheme_Object *obj2);
00848 #ifdef MZ_PRECISE_GC
00849 long (*scheme_hash_key)(Scheme_Object *o);
00850 #endif
00851 long (*scheme_equal_hash_key)(Scheme_Object *o);
00852 long (*scheme_equal_hash_key2)(Scheme_Object *o);
00853 long (*scheme_recur_equal_hash_key)(Scheme_Object *o, void *cycle_data);
00854 long (*scheme_recur_equal_hash_key2)(Scheme_Object *o, void *cycle_data);
00855 long (*scheme_eqv_hash_key)(Scheme_Object *o);
00856 long (*scheme_eqv_hash_key2)(Scheme_Object *o);
00857 void (*scheme_set_type_equality)(Scheme_Type type, 
00858                                         Scheme_Equal_Proc f,
00859                                         Scheme_Primary_Hash_Proc hash1,
00860                                         Scheme_Secondary_Hash_Proc hash2);
00861 int (*scheme_recur_equal)(Scheme_Object *obj1, Scheme_Object *obj2, void *cycle_info);
00862 Scheme_Object *(*scheme_build_list)(int argc, Scheme_Object **argv);
00863 Scheme_Object *(*scheme_build_list_offset)(int argc, Scheme_Object **argv, int delta);
00864 int (*scheme_is_list)(Scheme_Object *obj1);
00865 int (*scheme_list_length)(Scheme_Object *list);
00866 int (*scheme_proper_list_length)(Scheme_Object *list);
00867 Scheme_Object *(*scheme_alloc_list)(int size);
00868 Scheme_Object *(*scheme_map_1)(Scheme_Object *(*f)(Scheme_Object*),
00869                          Scheme_Object *l);
00870 Scheme_Object *(*scheme_car)(Scheme_Object *pair);
00871 Scheme_Object *(*scheme_cdr)(Scheme_Object *pair);
00872 Scheme_Object *(*scheme_cadr)(Scheme_Object *pair);
00873 Scheme_Object *(*scheme_caddr)(Scheme_Object *pair);
00874 Scheme_Object *(*scheme_vector_to_list)(Scheme_Object *vec);
00875 Scheme_Object *(*scheme_list_to_vector)(Scheme_Object *list);
00876 Scheme_Object *(*scheme_append)(Scheme_Object *lstx, Scheme_Object *lsty);
00877 Scheme_Object *(*scheme_reverse)(Scheme_Object *l);
00878 Scheme_Object *(*scheme_box)(Scheme_Object *v);
00879 Scheme_Object *(*scheme_unbox)(Scheme_Object *obj);
00880 void (*scheme_set_box)(Scheme_Object *b, Scheme_Object *v);
00881 Scheme_Object *(*scheme_make_weak_box)(Scheme_Object *v);
00882 Scheme_Object *(*scheme_make_ephemeron)(Scheme_Object *key, Scheme_Object *val);
00883 Scheme_Object *(*scheme_ephemeron_value)(Scheme_Object *o);
00884 Scheme_Object *(*scheme_ephemeron_key)(Scheme_Object *o);
00885 Scheme_Object *(*scheme_load)(const char *file);
00886 Scheme_Object *(*scheme_load_extension)(const char *filename, Scheme_Env *env);
00887 void (*scheme_register_extension_global)(void *ptr, long size);
00888 long (*scheme_get_seconds)(void);
00889 long (*scheme_get_milliseconds)(void);
00890 double (*scheme_get_inexact_milliseconds)(void);
00891 long (*scheme_get_process_milliseconds)(void);
00892 long (*scheme_get_thread_milliseconds)(Scheme_Object *thrd);
00893 char *(*scheme_banner)(void);
00894 char *(*scheme_version)(void);
00895 int (*scheme_check_proc_arity)(const char *where, int a,
00896                                   int which, int argc, Scheme_Object **argv);
00897 int (*scheme_check_proc_arity2)(const char *where, int a,
00898                                    int which, int argc, Scheme_Object **argv,
00899                                    int false_ok);
00900 char *(*scheme_make_provided_string)(Scheme_Object *o, int count, int *len);
00901 char *(*scheme_make_args_string)(char *s, int which, int argc, Scheme_Object **argv, long *len);
00902 const char *(*scheme_system_library_subpath)();
00903 void (*scheme_signal_received)(void);
00904 int (*scheme_char_strlen)(const mzchar *s);
00905 #ifndef SCHEME_EX_INLINE
00906 } Scheme_Extension_Table;
00907 #endif