Back to index

plt-scheme  4.2.1
Defines | Functions | Variables
schemef.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define scheme_bignum_to_float   scheme_bignum_to_double
#define scheme_bignum_from_float   scheme_bignum_from_double
#define scheme_rational_to_float   scheme_rational_to_double
#define scheme_rational_from_float   scheme_rational_from_double

Functions

MZ_EXTERN void scheme_init_jmpup_buf (Scheme_Jumpup_Buf *b)
MZ_EXTERN int scheme_setjmpup_relative (Scheme_Jumpup_Buf *b, void *base, void *volatile start, struct Scheme_Cont *cont)
MZ_EXTERN void scheme_longjmpup (Scheme_Jumpup_Buf *b)
MZ_EXTERN void scheme_reset_jmpup_buf (Scheme_Jumpup_Buf *b)
MZ_EXTERN void scheme_clear_escape (void)
MZ_EXTERN
Scheme_Jumpup_Buf_Holder
scheme_new_jmpupbuf_holder (void)
MZ_EXTERN Scheme_Configscheme_current_config (void)
MZ_EXTERN Scheme_Configscheme_extend_config (Scheme_Config *c, int pos, Scheme_Object *init_val)
MZ_EXTERN void scheme_install_config (Scheme_Config *)
MZ_EXTERN Scheme_Objectscheme_get_param (Scheme_Config *c, int pos)
MZ_EXTERN void scheme_set_param (Scheme_Config *c, int pos, Scheme_Object *o)
MZ_EXTERN Scheme_Objectscheme_get_thread_param (Scheme_Config *c, Scheme_Thread_Cell_Table *cells, int pos)
MZ_EXTERN void scheme_set_thread_param (Scheme_Config *c, Scheme_Thread_Cell_Table *cells, int pos, Scheme_Object *o)
MZ_EXTERN Scheme_Envscheme_get_env (Scheme_Config *config)
MZ_EXTERN
Scheme_Thread_Cell_Table
scheme_inherit_cells (Scheme_Thread_Cell_Table *cells)
MZ_EXTERN Scheme_Objectscheme_current_break_cell ()
MZ_EXTERN Scheme_Threadscheme_get_current_thread ()
MZ_EXTERN void scheme_start_atomic (void)
MZ_EXTERN void scheme_end_atomic (void)
MZ_EXTERN void scheme_end_atomic_no_swap (void)
MZ_EXTERN void scheme_start_in_scheduler (void)
MZ_EXTERN void scheme_end_in_scheduler (void)
MZ_EXTERN void scheme_out_of_fuel (void)
MZ_EXTERN Scheme_Objectscheme_thread (Scheme_Object *thunk)
MZ_EXTERN Scheme_Objectscheme_thread_w_details (Scheme_Object *thunk, Scheme_Config *init_config, Scheme_Thread_Cell_Table *copy_from, Scheme_Object *break_cell, Scheme_Custodian *owning_custodian, int suspend_to_kill)
MZ_EXTERN void scheme_kill_thread (Scheme_Thread *p)
MZ_EXTERN void scheme_break_thread (Scheme_Thread *p)
MZ_EXTERN void scheme_break_main_thread ()
MZ_EXTERN void scheme_set_break_main_target (Scheme_Thread *p)
MZ_EXTERN void scheme_thread_block (float sleep_time)
MZ_EXTERN void scheme_thread_block_enable_break (float sleep_time, int enable)
MZ_EXTERN void scheme_swap_thread (Scheme_Thread *process)
MZ_EXTERN void scheme_making_progress ()
MZ_EXTERN void scheme_weak_suspend_thread (Scheme_Thread *p)
MZ_EXTERN void scheme_weak_resume_thread (Scheme_Thread *p)
MZ_EXTERN int scheme_block_until (Scheme_Ready_Fun f, Scheme_Needs_Wakeup_Fun, Scheme_Object *, float)
MZ_EXTERN int scheme_block_until_enable_break (Scheme_Ready_Fun f, Scheme_Needs_Wakeup_Fun, Scheme_Object *, float, int enable)
MZ_EXTERN int scheme_block_until_unless (Scheme_Ready_Fun f, Scheme_Needs_Wakeup_Fun fdf, Scheme_Object *data, float delay, Scheme_Object *unless, int enable_break)
MZ_EXTERN void scheme_wait_input_allowed (Scheme_Input_Port *port, int nonblock)
XFORM_NONGCING MZ_EXTERN int scheme_unless_ready (Scheme_Object *unless)
MZ_EXTERN int scheme_in_main_thread (void)
MZ_EXTERN void scheme_cancel_sleep (void)
MZ_EXTERN void scheme_start_sleeper_thread (void(*mzsleep)(float seconds, void *fds), float secs, void *fds, int hit_fd)
MZ_EXTERN void scheme_end_sleeper_thread ()
MZ_EXTERN void scheme_notify_sleep_progress ()
MZ_EXTERN Scheme_Objectscheme_make_thread_cell (Scheme_Object *def_val, int inherited)
MZ_EXTERN Scheme_Objectscheme_thread_cell_get (Scheme_Object *cell, Scheme_Thread_Cell_Table *cells)
MZ_EXTERN void scheme_thread_cell_set (Scheme_Object *cell, Scheme_Thread_Cell_Table *cells, Scheme_Object *v)
MZ_EXTERN int scheme_tls_allocate ()
MZ_EXTERN void scheme_tls_set (int pos, void *v)
MZ_EXTERN voidscheme_tls_get (int pos)
MZ_EXTERN Scheme_Custodianscheme_make_custodian (Scheme_Custodian *)
MZ_EXTERN
Scheme_Custodian_Reference
scheme_add_managed (Scheme_Custodian *m, Scheme_Object *o, Scheme_Close_Custodian_Client *f, void *data, int strong)
MZ_EXTERN void scheme_custodian_check_available (Scheme_Custodian *m, const char *who, const char *what)
MZ_EXTERN int scheme_custodian_is_available (Scheme_Custodian *m)
MZ_EXTERN void scheme_remove_managed (Scheme_Custodian_Reference *m, Scheme_Object *o)
MZ_EXTERN void scheme_close_managed (Scheme_Custodian *m)
MZ_EXTERN void scheme_schedule_custodian_close (Scheme_Custodian *c)
MZ_EXTERN void scheme_add_custodian_extractor (Scheme_Type t, Scheme_Custodian_Extractor e)
MZ_EXTERN void scheme_add_atexit_closer (Scheme_Exit_Closer_Func f)
MZ_EXTERN void scheme_add_evt (Scheme_Type type, Scheme_Ready_Fun ready, Scheme_Needs_Wakeup_Fun wakeup, Scheme_Sync_Filter_Fun filter, int can_redirect)
MZ_EXTERN void scheme_add_evt_through_sema (Scheme_Type type, Scheme_Sync_Sema_Fun sema, Scheme_Sync_Filter_Fun filter)
MZ_EXTERN int scheme_is_evt (Scheme_Object *o)
MZ_EXTERN Scheme_Objectscheme_sync (int argc, Scheme_Object *argv[])
MZ_EXTERN Scheme_Objectscheme_sync_enable_break (int argc, Scheme_Object *argv[])
MZ_EXTERN Scheme_Objectscheme_sync_timeout (int argc, Scheme_Object *argv[])
MZ_EXTERN Scheme_Objectscheme_make_evt_set (int argc, Scheme_Object **argv)
MZ_EXTERN void scheme_add_swap_callback (Scheme_Closure_Func f, Scheme_Object *data)
MZ_EXTERN void scheme_add_swap_out_callback (Scheme_Closure_Func f, Scheme_Object *data)
MZ_EXTERN Scheme_Objectscheme_call_enable_break (Scheme_Prim *prim, int argc, Scheme_Object *argv[])
MZ_EXTERN int scheme_close_should_force_port_closed ()
MZ_EXTERN void scheme_push_kill_action (Scheme_Kill_Action_Func f, void *d)
MZ_EXTERN void scheme_pop_kill_action ()
MZ_EXTERN void scheme_set_can_break (int on)
MZ_EXTERN void scheme_push_break_enable (Scheme_Cont_Frame_Data *cframe, int on, int pre_check)
MZ_EXTERN void scheme_pop_break_enable (Scheme_Cont_Frame_Data *cframe, int post_check)
MZ_EXTERN void scheme_signal_error (const char *msg,...)
MZ_EXTERN void scheme_raise_exn (int exnid,...)
MZ_EXTERN void scheme_warning (char *msg,...)
MZ_EXTERN void scheme_raise (Scheme_Object *exn)
MZ_EXTERN int scheme_log_level_p (Scheme_Logger *logger, int level)
MZ_EXTERN void scheme_log (Scheme_Logger *logger, int level, int flags, char *msg,...)
MZ_EXTERN void scheme_log_message (Scheme_Logger *logger, int level, char *buffer, long len, Scheme_Object *data)
MZ_EXTERN void scheme_log_abort (char *buffer)
MZ_EXTERN void scheme_out_of_memory_abort ()
MZ_EXTERN void scheme_wrong_count (const char *name, int minc, int maxc, int argc, Scheme_Object **argv)
MZ_EXTERN void scheme_wrong_count_m (const char *name, int minc, int maxc, int argc, Scheme_Object **argv, int is_method)
MZ_EXTERN void scheme_case_lambda_wrong_count (const char *name, int argc, Scheme_Object **argv, int is_method, int count,...)
MZ_EXTERN void scheme_wrong_type (const char *name, const char *expected, int which, int argc, Scheme_Object **argv)
MZ_EXTERN void scheme_wrong_field_type (Scheme_Object *c_name, const char *expected, Scheme_Object *o)
MZ_EXTERN void scheme_arg_mismatch (const char *name, const char *msg, Scheme_Object *o)
MZ_EXTERN void scheme_wrong_return_arity (const char *where, int expected, int got, Scheme_Object **argv, const char *context_detail,...)
MZ_EXTERN void scheme_unbound_global (Scheme_Bucket *b)
MZ_EXTERN Scheme_Objectscheme_dynamic_wind (void(*pre)(void *), Scheme_Object *(*volatile act)(void *), void(*volatile post)(void *), Scheme_Object *(*jmp_handler)(void *), void *volatile data)
MZ_EXTERN Scheme_Type scheme_make_type (const char *name)
MZ_EXTERN char * scheme_get_type_name (Scheme_Type type)
XFORM_NONGCING MZ_EXTERN
Scheme_Object
scheme_make_eof (void)
XFORM_NONGCING MZ_EXTERN
Scheme_Object
scheme_make_null (void)
XFORM_NONGCING MZ_EXTERN
Scheme_Object
scheme_make_true (void)
XFORM_NONGCING MZ_EXTERN
Scheme_Object
scheme_make_false (void)
XFORM_NONGCING MZ_EXTERN
Scheme_Object
scheme_make_void (void)
MZ_EXTERN Scheme_Objectscheme_eval (Scheme_Object *obj, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_eval_multi (Scheme_Object *obj, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_eval_with_prompt (Scheme_Object *obj, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_eval_multi_with_prompt (Scheme_Object *obj, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_eval_compiled (Scheme_Object *obj, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_eval_compiled_multi (Scheme_Object *obj, Scheme_Env *env)
MZ_EXTERN Scheme_Object_scheme_eval_compiled (Scheme_Object *obj, Scheme_Env *env)
MZ_EXTERN Scheme_Object_scheme_eval_compiled_multi (Scheme_Object *obj, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_apply (Scheme_Object *rator, int num_rands, Scheme_Object **rands)
MZ_EXTERN Scheme_Objectscheme_apply_multi (Scheme_Object *rator, int num_rands, Scheme_Object **rands)
MZ_EXTERN Scheme_Objectscheme_apply_no_eb (Scheme_Object *rator, int num_rands, Scheme_Object **rands)
MZ_EXTERN Scheme_Objectscheme_apply_multi_no_eb (Scheme_Object *rator, int num_rands, Scheme_Object **rands)
MZ_EXTERN Scheme_Objectscheme_apply_to_list (Scheme_Object *rator, Scheme_Object *argss)
MZ_EXTERN Scheme_Objectscheme_apply_with_prompt (Scheme_Object *rator, int num_rands, Scheme_Object **rands)
MZ_EXTERN Scheme_Objectscheme_apply_multi_with_prompt (Scheme_Object *rator, int num_rands, Scheme_Object **rands)
MZ_EXTERN Scheme_Object_scheme_apply_with_prompt (Scheme_Object *rator, int num_rands, Scheme_Object **rands)
MZ_EXTERN Scheme_Object_scheme_apply_multi_with_prompt (Scheme_Object *rator, int num_rands, Scheme_Object **rands)
MZ_EXTERN Scheme_Objectscheme_eval_string (const char *str, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_eval_string_multi (const char *str, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_eval_string_all (const char *str, Scheme_Env *env, int all)
MZ_EXTERN Scheme_Objectscheme_eval_string_with_prompt (const char *str, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_eval_string_multi_with_prompt (const char *str, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_eval_string_all_with_prompt (const char *str, Scheme_Env *env, int all)
MZ_EXTERN Scheme_Objectscheme_eval_module_string (const char *str, Scheme_Env *env)
MZ_EXTERN Scheme_Object_scheme_apply_known_prim_closure (Scheme_Object *rator, int argc, Scheme_Object **argv)
MZ_EXTERN Scheme_Object_scheme_apply_known_prim_closure_multi (Scheme_Object *rator, int argc, Scheme_Object **argv)
MZ_EXTERN Scheme_Object_scheme_apply_prim_closure (Scheme_Object *rator, int argc, Scheme_Object **argv)
MZ_EXTERN Scheme_Object_scheme_apply_prim_closure_multi (Scheme_Object *rator, int argc, Scheme_Object **argv)
MZ_EXTERN Scheme_Objectscheme_call_with_prompt (Scheme_Closed_Prim f, void *data)
MZ_EXTERN Scheme_Objectscheme_call_with_prompt_multi (Scheme_Closed_Prim f, void *data)
MZ_EXTERN Scheme_Object_scheme_call_with_prompt (Scheme_Closed_Prim f, void *data)
MZ_EXTERN Scheme_Object_scheme_call_with_prompt_multi (Scheme_Closed_Prim f, void *data)
MZ_EXTERN Scheme_Objectscheme_values (int c, Scheme_Object **v)
MZ_EXTERN Scheme_Objectscheme_check_one_value (Scheme_Object *v)
MZ_EXTERN Scheme_Objectscheme_tail_apply (Scheme_Object *f, int n, Scheme_Object **arg)
MZ_EXTERN Scheme_Objectscheme_tail_apply_no_copy (Scheme_Object *f, int n, Scheme_Object **arg)
MZ_EXTERN Scheme_Objectscheme_tail_apply_to_list (Scheme_Object *f, Scheme_Object *l)
MZ_EXTERN Scheme_Objectscheme_tail_eval_expr (Scheme_Object *obj)
MZ_EXTERN void scheme_set_tail_buffer_size (int s)
MZ_EXTERN Scheme_Objectscheme_force_value (Scheme_Object *)
MZ_EXTERN Scheme_Objectscheme_force_one_value (Scheme_Object *)
MZ_EXTERN MZ_MARK_STACK_TYPE scheme_set_cont_mark (Scheme_Object *key, Scheme_Object *val)
MZ_EXTERN void scheme_push_continuation_frame (Scheme_Cont_Frame_Data *)
MZ_EXTERN void scheme_pop_continuation_frame (Scheme_Cont_Frame_Data *)
MZ_EXTERN void scheme_temp_dec_mark_depth ()
MZ_EXTERN void scheme_temp_inc_mark_depth ()
MZ_EXTERN Scheme_Objectscheme_current_continuation_marks (Scheme_Object *prompt_tag)
MZ_EXTERN Scheme_Objectscheme_extract_one_cc_mark (Scheme_Object *mark_set, Scheme_Object *key)
MZ_EXTERN Scheme_Objectscheme_extract_one_cc_mark_to_tag (Scheme_Object *mark_set, Scheme_Object *key, Scheme_Object *prompt_tag)
MZ_EXTERN Scheme_Objectscheme_do_eval (Scheme_Object *obj, int _num_rands, Scheme_Object **rands, int val)
MZ_EXTERN Scheme_Objectscheme_eval_compiled_stx_string (Scheme_Object *expr, Scheme_Env *env, long shift, Scheme_Object *modidx)
MZ_EXTERN Scheme_Objectscheme_load_compiled_stx_string (const char *str, long len)
MZ_EXTERN Scheme_Objectscheme_compiled_stx_symbol (Scheme_Object *stx)
MZ_EXTERN Scheme_Objectscheme_eval_compiled_sized_string (const char *str, int len, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_eval_compiled_sized_string_with_magic (const char *str, int len, Scheme_Env *env, Scheme_Object *magic_symbol, Scheme_Object *magic_val, int multi_ok)
MZ_EXTERN void scheme_detach_multple_array (Scheme_Object **a)
MZ_EXTERN voidGC_malloc (size_t size_in_bytes)
MZ_EXTERN voidGC_malloc_atomic (size_t size_in_bytes)
MZ_EXTERN voidGC_malloc_stubborn (size_t size_in_bytes)
MZ_EXTERN voidGC_malloc_uncollectable (size_t size_in_bytes)
MZ_EXTERN voidscheme_malloc_code (long size)
MZ_EXTERN void scheme_free_code (void *p)
MZ_EXTERN voidscheme_malloc_gcable_code (long size)
MZ_EXTERN voidscheme_malloc_eternal (size_t n)
MZ_EXTERN void scheme_end_stubborn_change (void *p)
MZ_EXTERN voidscheme_calloc (size_t num, size_t size)
MZ_EXTERN char * scheme_strdup (const char *str)
MZ_EXTERN char * scheme_strdup_eternal (const char *str)
MZ_EXTERN voidscheme_malloc_fail_ok (void *(*f)(size_t), size_t)
MZ_EXTERN void scheme_weak_reference (void **p)
MZ_EXTERN void scheme_weak_reference_indirect (void **p, void *v)
MZ_EXTERN void scheme_unweak_reference (void **p)
MZ_EXTERN void scheme_add_finalizer (void *p, void(*f)(void *p, void *data), void *data)
MZ_EXTERN void scheme_add_finalizer_once (void *p, void(*f)(void *p, void *data), void *data)
MZ_EXTERN void scheme_subtract_finalizer (void *p, void(*f)(void *p, void *data), void *data)
MZ_EXTERN void scheme_add_scheme_finalizer (void *p, void(*f)(void *p, void *data), void *data)
MZ_EXTERN void scheme_add_scheme_finalizer_once (void *p, void(*f)(void *p, void *data), void *data)
MZ_EXTERN void scheme_register_finalizer (void *p, void(*f)(void *p, void *data), void *data, void(**oldf)(void *p, void *data), void **olddata)
MZ_EXTERN void scheme_remove_all_finalization (void *p)
MZ_EXTERN void scheme_dont_gc_ptr (void *p)
MZ_EXTERN void scheme_gc_ptr_ok (void *p)
MZ_EXTERN void scheme_collect_garbage (void)
MZ_EXTERN void ** scheme_malloc_immobile_box (void *p)
MZ_EXTERN void scheme_free_immobile_box (void **b)
MZ_EXTERN Scheme_Bucket_Tablescheme_make_bucket_table (int size_hint, int type)
MZ_EXTERN void scheme_add_to_table (Scheme_Bucket_Table *table, const char *key, void *val, int)
MZ_EXTERN void scheme_change_in_table (Scheme_Bucket_Table *table, const char *key, void *new_val)
MZ_EXTERN voidscheme_lookup_in_table (Scheme_Bucket_Table *table, const char *key)
MZ_EXTERN Scheme_Bucketscheme_bucket_from_table (Scheme_Bucket_Table *table, const char *key)
MZ_EXTERN int scheme_bucket_table_equal (Scheme_Bucket_Table *t1, Scheme_Bucket_Table *t2)
MZ_EXTERN Scheme_Bucket_Tablescheme_clone_bucket_table (Scheme_Bucket_Table *bt)
MZ_EXTERN Scheme_Hash_Tablescheme_make_hash_table (int type)
MZ_EXTERN Scheme_Hash_Tablescheme_make_hash_table_equal ()
MZ_EXTERN Scheme_Hash_Tablescheme_make_hash_table_eqv ()
MZ_EXTERN void scheme_hash_set (Scheme_Hash_Table *table, Scheme_Object *key, Scheme_Object *val)
MZ_EXTERN Scheme_Objectscheme_hash_get (Scheme_Hash_Table *table, Scheme_Object *key)
XFORM_NONGCING MZ_EXTERN
Scheme_Object
scheme_eq_hash_get (Scheme_Hash_Table *table, Scheme_Object *key)
MZ_EXTERN void scheme_hash_set_atomic (Scheme_Hash_Table *table, Scheme_Object *key, Scheme_Object *val)
MZ_EXTERN Scheme_Objectscheme_hash_get_atomic (Scheme_Hash_Table *table, Scheme_Object *key)
MZ_EXTERN int scheme_hash_table_equal (Scheme_Hash_Table *t1, Scheme_Hash_Table *t2)
MZ_EXTERN int scheme_is_hash_table_equal (Scheme_Object *o)
MZ_EXTERN int scheme_is_hash_table_eqv (Scheme_Object *o)
MZ_EXTERN Scheme_Hash_Tablescheme_clone_hash_table (Scheme_Hash_Table *bt)
MZ_EXTERN Scheme_Hash_Treescheme_make_hash_tree (int kind)
MZ_EXTERN Scheme_Hash_Treescheme_hash_tree_set (Scheme_Hash_Tree *tree, Scheme_Object *key, Scheme_Object *val)
MZ_EXTERN Scheme_Objectscheme_hash_tree_get (Scheme_Hash_Tree *tree, Scheme_Object *key)
MZ_EXTERN long scheme_hash_tree_next (Scheme_Hash_Tree *tree, long pos)
MZ_EXTERN int scheme_hash_tree_index (Scheme_Hash_Tree *tree, long pos, Scheme_Object **_key, Scheme_Object **_val)
MZ_EXTERN int scheme_hash_tree_equal (Scheme_Hash_Tree *t1, Scheme_Hash_Tree *t2)
MZ_EXTERN int scheme_is_hash_tree_equal (Scheme_Object *o)
MZ_EXTERN int scheme_is_hash_tree_eqv (Scheme_Object *o)
MZ_EXTERN Scheme_Objectscheme_make_prim (Scheme_Prim *prim)
MZ_EXTERN Scheme_Objectscheme_make_noneternal_prim (Scheme_Prim *prim)
MZ_EXTERN Scheme_Objectscheme_make_prim_w_arity (Scheme_Prim *prim, const char *name, mzshort mina, mzshort maxa)
MZ_EXTERN Scheme_Objectscheme_make_folding_prim (Scheme_Prim *prim, const char *name, mzshort mina, mzshort maxa, short functional)
MZ_EXTERN Scheme_Objectscheme_make_immed_prim (Scheme_Prim *prim, const char *name, mzshort mina, mzshort maxa)
MZ_EXTERN Scheme_Objectscheme_make_noncm_prim (Scheme_Prim *prim, const char *name, mzshort mina, mzshort maxa)
MZ_EXTERN Scheme_Objectscheme_make_noneternal_prim_w_arity (Scheme_Prim *prim, const char *name, mzshort mina, mzshort maxa)
MZ_EXTERN Scheme_Objectscheme_make_prim_w_everything (Scheme_Prim *fun, int eternal, const char *name, mzshort mina, mzshort maxa, int folding, mzshort minr, mzshort maxr)
MZ_EXTERN Scheme_Objectscheme_make_prim_closure_w_arity (Scheme_Primitive_Closure_Proc *prim, int size, Scheme_Object **vals, const char *name, mzshort mina, mzshort maxa)
MZ_EXTERN Scheme_Objectscheme_make_folding_prim_closure (Scheme_Primitive_Closure_Proc *prim, int size, Scheme_Object **vals, const char *name, mzshort mina, mzshort maxa, short functional)
MZ_EXTERN Scheme_Objectscheme_make_closed_prim (Scheme_Closed_Prim *prim, void *data)
MZ_EXTERN Scheme_Objectscheme_make_closed_prim_w_arity (Scheme_Closed_Prim *prim, void *data, const char *name, mzshort mina, mzshort maxa)
MZ_EXTERN Scheme_Objectscheme_make_folding_closed_prim (Scheme_Closed_Prim *prim, void *data, const char *name, mzshort mina, mzshort maxa, short functional)
MZ_EXTERN Scheme_Objectscheme_make_closed_prim_w_everything (Scheme_Closed_Prim *fun, void *data, const char *name, mzshort mina, mzshort maxa, short folding, mzshort minr, mzshort maxr)
MZ_EXTERN void scheme_prim_is_method (Scheme_Object *o)
MZ_EXTERN Scheme_Objectscheme_make_pair (Scheme_Object *car, Scheme_Object *cdr)
MZ_EXTERN Scheme_Objectscheme_make_mutable_pair (Scheme_Object *car, Scheme_Object *cdr)
MZ_EXTERN Scheme_Objectscheme_make_raw_pair (Scheme_Object *, Scheme_Object *)
MZ_EXTERN Scheme_Objectscheme_make_byte_string (const char *chars)
MZ_EXTERN Scheme_Objectscheme_make_sized_byte_string (char *chars, long len, int copy)
MZ_EXTERN Scheme_Objectscheme_make_sized_offset_byte_string (char *chars, long d, long len, int copy)
MZ_EXTERN Scheme_Objectscheme_make_immutable_sized_byte_string (char *chars, long len, int copy)
MZ_EXTERN Scheme_Objectscheme_make_byte_string_without_copying (char *chars)
MZ_EXTERN Scheme_Objectscheme_alloc_byte_string (long size, char fill)
MZ_EXTERN Scheme_Objectscheme_append_byte_string (Scheme_Object *, Scheme_Object *)
MZ_EXTERN Scheme_Objectscheme_make_utf8_string (const char *chars)
MZ_EXTERN Scheme_Objectscheme_make_sized_utf8_string (char *chars, long len)
MZ_EXTERN Scheme_Objectscheme_make_sized_offset_utf8_string (char *chars, long d, long len)
MZ_EXTERN Scheme_Objectscheme_make_immutable_sized_utf8_string (char *chars, long len)
MZ_EXTERN Scheme_Objectscheme_make_locale_string (const char *chars)
MZ_EXTERN Scheme_Objectscheme_char_string_to_byte_string (Scheme_Object *s)
MZ_EXTERN Scheme_Objectscheme_byte_string_to_char_string (Scheme_Object *s)
MZ_EXTERN Scheme_Objectscheme_char_string_to_byte_string_locale (Scheme_Object *s)
MZ_EXTERN Scheme_Objectscheme_byte_string_to_char_string_locale (Scheme_Object *s)
MZ_EXTERN Scheme_Objectscheme_char_string_to_path (Scheme_Object *p)
MZ_EXTERN Scheme_Objectscheme_path_to_char_string (Scheme_Object *p)
MZ_EXTERN Scheme_Objectscheme_make_char_string (const mzchar *chars)
MZ_EXTERN Scheme_Objectscheme_make_sized_char_string (mzchar *chars, long len, int copy)
MZ_EXTERN Scheme_Objectscheme_make_sized_offset_char_string (mzchar *chars, long d, long len, int copy)
MZ_EXTERN Scheme_Objectscheme_make_immutable_sized_char_string (mzchar *chars, long len, int copy)
MZ_EXTERN Scheme_Objectscheme_make_char_string_without_copying (mzchar *chars)
MZ_EXTERN Scheme_Objectscheme_alloc_char_string (long size, mzchar fill)
MZ_EXTERN Scheme_Objectscheme_append_char_string (Scheme_Object *, Scheme_Object *)
MZ_EXTERN mzcharscheme_string_recase (mzchar *s, int d, int len, int mode, int inplace, int *_len)
MZ_EXTERN Scheme_Objectscheme_make_vector (long size, Scheme_Object *fill)
MZ_EXTERN Scheme_Objectscheme_make_integer_value (long i)
MZ_EXTERN Scheme_Objectscheme_make_integer_value_from_unsigned (unsigned long i)
MZ_EXTERN Scheme_Objectscheme_make_integer_value_from_long_long (mzlonglong i)
MZ_EXTERN Scheme_Objectscheme_make_integer_value_from_unsigned_long_long (umzlonglong i)
MZ_EXTERN Scheme_Objectscheme_make_integer_value_from_long_halves (unsigned long lowhalf, unsigned long hihalf)
MZ_EXTERN Scheme_Objectscheme_make_integer_value_from_unsigned_long_halves (unsigned long lowhalf, unsigned long hihalf)
MZ_EXTERN Scheme_Objectscheme_make_double (double d)
MZ_EXTERN Scheme_Objectscheme_make_char (mzchar ch)
MZ_EXTERN Scheme_Objectscheme_make_char_or_nul (mzchar ch)
MZ_EXTERN Scheme_Objectscheme_make_sema (long v)
MZ_EXTERN void scheme_post_sema (Scheme_Object *o)
MZ_EXTERN void scheme_post_sema_all (Scheme_Object *o)
MZ_EXTERN int scheme_wait_sema (Scheme_Object *o, int just_try)
XFORM_NONGCING MZ_EXTERN int scheme_try_plain_sema (Scheme_Object *o)
MZ_EXTERN Scheme_Objectscheme_make_channel ()
MZ_EXTERN Scheme_Objectscheme_make_channel_put_evt (Scheme_Object *ch, Scheme_Object *v)
XFORM_NONGCING MZ_EXTERN int scheme_get_int_val (Scheme_Object *o, long *v)
XFORM_NONGCING MZ_EXTERN int scheme_get_unsigned_int_val (Scheme_Object *o, unsigned long *v)
XFORM_NONGCING MZ_EXTERN int scheme_get_long_long_val (Scheme_Object *o, mzlonglong *v)
XFORM_NONGCING MZ_EXTERN int scheme_get_unsigned_long_long_val (Scheme_Object *o, umzlonglong *v)
XFORM_NONGCING MZ_EXTERN double scheme_real_to_double (Scheme_Object *r)
MZ_EXTERN Scheme_Objectscheme_make_cptr (void *cptr, Scheme_Object *typetag)
MZ_EXTERN Scheme_Objectscheme_make_offset_cptr (void *cptr, long offset, Scheme_Object *typetag)
MZ_EXTERN const char * scheme_get_proc_name (Scheme_Object *p, int *len, int for_error)
MZ_EXTERN int scheme_utf8_decode (const unsigned char *s, int start, int end, unsigned int *us, int dstart, int dend, long *ipos, char utf16, int permissive)
MZ_EXTERN int scheme_utf8_decode_as_prefix (const unsigned char *s, int start, int end, unsigned int *us, int dstart, int dend, long *ipos, char utf16, int permissive)
MZ_EXTERN int scheme_utf8_decode_all (const unsigned char *s, int len, unsigned int *us, int permissive)
MZ_EXTERN int scheme_utf8_decode_prefix (const unsigned char *s, int len, unsigned int *us, int permissive)
MZ_EXTERN mzcharscheme_utf8_decode_to_buffer (const unsigned char *s, int len, mzchar *buf, int blen)
MZ_EXTERN mzcharscheme_utf8_decode_to_buffer_len (const unsigned char *s, int len, mzchar *buf, int blen, long *rlen)
XFORM_NONGCING MZ_EXTERN int scheme_utf8_decode_count (const unsigned char *s, int start, int end, int *_state, int might_continue, int permissive)
MZ_EXTERN int scheme_utf8_encode (const unsigned int *us, int start, int end, unsigned char *s, int dstart, char utf16)
MZ_EXTERN int scheme_utf8_encode_all (const unsigned int *us, int len, unsigned char *s)
MZ_EXTERN char * scheme_utf8_encode_to_buffer (const mzchar *s, int len, char *buf, int blen)
MZ_EXTERN char * scheme_utf8_encode_to_buffer_len (const mzchar *s, int len, char *buf, int blen, long *rlen)
MZ_EXTERN unsigned short * scheme_ucs4_to_utf16 (const mzchar *text, int start, int end, unsigned short *buf, int bufsize, long *ulen, int term_size)
MZ_EXTERN mzcharscheme_utf16_to_ucs4 (const unsigned short *text, int start, int end, mzchar *buf, int bufsize, long *ulen, int term_size)
MZ_EXTERN Scheme_Objectscheme_open_converter (const char *from_e, const char *to_e)
MZ_EXTERN void scheme_close_converter (Scheme_Object *conv)
MZ_EXTERN Scheme_Objectscheme_make_bignum (long v)
MZ_EXTERN Scheme_Objectscheme_make_bignum_from_unsigned (unsigned long v)
MZ_EXTERN Scheme_Objectscheme_make_bignum_from_long_long (mzlonglong v)
MZ_EXTERN Scheme_Objectscheme_make_bignum_from_unsigned_long_long (umzlonglong v)
MZ_EXTERN double scheme_bignum_to_double (const Scheme_Object *n)
MZ_EXTERN Scheme_Objectscheme_bignum_from_double (double d)
MZ_EXTERN char * scheme_bignum_to_string (const Scheme_Object *n, int radix)
MZ_EXTERN char * scheme_bignum_to_allocated_string (const Scheme_Object *n, int radix, int alloc)
MZ_EXTERN Scheme_Objectscheme_read_bignum (const mzchar *str, int offset, int radix)
MZ_EXTERN Scheme_Objectscheme_read_bignum_bytes (const char *str, int offset, int radix)
XFORM_NONGCING MZ_EXTERN
Scheme_Object
scheme_bignum_normalize (const Scheme_Object *n)
MZ_EXTERN Scheme_Objectscheme_make_rational (const Scheme_Object *r, const Scheme_Object *d)
MZ_EXTERN double scheme_rational_to_double (const Scheme_Object *n)
MZ_EXTERN Scheme_Objectscheme_rational_from_double (double d)
MZ_EXTERN Scheme_Objectscheme_rational_normalize (const Scheme_Object *n)
XFORM_NONGCING MZ_EXTERN
Scheme_Object
scheme_rational_numerator (const Scheme_Object *n)
XFORM_NONGCING MZ_EXTERN
Scheme_Object
scheme_rational_denominator (const Scheme_Object *n)
MZ_EXTERN Scheme_Objectscheme_make_complex (const Scheme_Object *r, const Scheme_Object *i)
MZ_EXTERN Scheme_Objectscheme_complex_normalize (const Scheme_Object *n)
XFORM_NONGCING MZ_EXTERN
Scheme_Object
scheme_complex_real_part (const Scheme_Object *n)
XFORM_NONGCING MZ_EXTERN
Scheme_Object
scheme_complex_imaginary_part (const Scheme_Object *n)
XFORM_NONGCING MZ_EXTERN int scheme_is_exact (const Scheme_Object *n)
XFORM_NONGCING MZ_EXTERN int scheme_is_inexact (const Scheme_Object *n)
MZ_EXTERN Scheme_Objectscheme_expand (Scheme_Object *form, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_compile (Scheme_Object *form, Scheme_Env *env, int writeable)
MZ_EXTERN Scheme_Objectscheme_read (Scheme_Object *port)
MZ_EXTERN Scheme_Objectscheme_read_syntax (Scheme_Object *port, Scheme_Object *stxsrc)
MZ_EXTERN void scheme_write (Scheme_Object *obj, Scheme_Object *port)
MZ_EXTERN void scheme_display (Scheme_Object *obj, Scheme_Object *port)
MZ_EXTERN void scheme_print (Scheme_Object *obj, Scheme_Object *port)
MZ_EXTERN void scheme_write_w_max (Scheme_Object *obj, Scheme_Object *port, long maxl)
MZ_EXTERN void scheme_display_w_max (Scheme_Object *obj, Scheme_Object *port, long maxl)
MZ_EXTERN void scheme_print_w_max (Scheme_Object *obj, Scheme_Object *port, long maxl)
MZ_EXTERN void scheme_write_byte_string (const char *str, long len, Scheme_Object *port)
MZ_EXTERN void scheme_write_char_string (const mzchar *str, long len, Scheme_Object *port)
MZ_EXTERN long scheme_put_byte_string (const char *who, Scheme_Object *port, const char *str, long d, long len, int rarely_block)
MZ_EXTERN long scheme_put_char_string (const char *who, Scheme_Object *port, const mzchar *str, long d, long len)
MZ_EXTERN char * scheme_write_to_string (Scheme_Object *obj, long *len)
MZ_EXTERN char * scheme_display_to_string (Scheme_Object *obj, long *len)
MZ_EXTERN char * scheme_print_to_string (Scheme_Object *obj, long *len)
MZ_EXTERN char * scheme_write_to_string_w_max (Scheme_Object *obj, long *len, long maxl)
MZ_EXTERN char * scheme_display_to_string_w_max (Scheme_Object *obj, long *len, long maxl)
MZ_EXTERN char * scheme_print_to_string_w_max (Scheme_Object *obj, long *len, long maxl)
MZ_EXTERN void scheme_debug_print (Scheme_Object *obj)
MZ_EXTERN void scheme_flush_output (Scheme_Object *port)
MZ_EXTERN char * scheme_format (mzchar *format, int flen, int argc, Scheme_Object **argv, long *rlen)
MZ_EXTERN void scheme_printf (mzchar *format, int flen, int argc, Scheme_Object **argv)
MZ_EXTERN char * scheme_format_utf8 (char *format, int flen, int argc, Scheme_Object **argv, long *rlen)
MZ_EXTERN void scheme_printf_utf8 (char *format, int flen, int argc, Scheme_Object **argv)
MZ_EXTERN int scheme_getc (Scheme_Object *port)
MZ_EXTERN int scheme_get_byte (Scheme_Object *port)
MZ_EXTERN int scheme_peekc (Scheme_Object *port)
MZ_EXTERN int scheme_peek_byte (Scheme_Object *port)
MZ_EXTERN int scheme_peekc_skip (Scheme_Object *port, Scheme_Object *skip)
MZ_EXTERN int scheme_peek_byte_skip (Scheme_Object *port, Scheme_Object *skip, Scheme_Object *unless_evt)
MZ_EXTERN int scheme_getc_special_ok (Scheme_Object *port)
MZ_EXTERN int scheme_get_byte_special_ok (Scheme_Object *port)
MZ_EXTERN int scheme_peekc_special_ok (Scheme_Object *port)
MZ_EXTERN int scheme_peek_byte_special_ok_skip (Scheme_Object *port, Scheme_Object *skip, Scheme_Object *unless_evt)
MZ_EXTERN int scheme_peekc_special_ok_skip (Scheme_Object *port, Scheme_Object *skip)
MZ_EXTERN void scheme_ungetc (int ch, Scheme_Object *port)
MZ_EXTERN int scheme_byte_ready (Scheme_Object *port)
MZ_EXTERN int scheme_char_ready (Scheme_Object *port)
MZ_EXTERN int scheme_peekc_is_ungetc (Scheme_Object *port)
MZ_EXTERN void scheme_need_wakeup (Scheme_Object *port, void *fds)
MZ_EXTERN long scheme_get_byte_string (const char *who, Scheme_Object *port, char *buffer, long offset, long size, int only_avail, int peek, Scheme_Object *peek_skip)
MZ_EXTERN long scheme_get_byte_string_unless (const char *who, Scheme_Object *port, char *buffer, long offset, long size, int only_avail, int peek, Scheme_Object *peek_skip, Scheme_Object *unless_evt)
MZ_EXTERN long scheme_get_byte_string_special_ok_unless (const char *who, Scheme_Object *port, char *buffer, long offset, long size, int only_avail, int peek, Scheme_Object *peek_skip, Scheme_Object *unless_evt)
MZ_EXTERN Scheme_Objectscheme_progress_evt (Scheme_Object *port)
MZ_EXTERN int scheme_peeked_read (Scheme_Object *port, long size, Scheme_Object *unless_evt, Scheme_Object *target_evt)
MZ_EXTERN long scheme_get_char_string (const char *who, Scheme_Object *port, mzchar *buffer, long offset, long size, int peek, Scheme_Object *peek_skip)
MZ_EXTERN long scheme_get_bytes (Scheme_Object *port, long size, char *buffer, int offset)
MZ_EXTERN Scheme_Objectscheme_get_ready_special (Scheme_Object *port, Scheme_Object *stxsrc, int peek)
MZ_EXTERN long scheme_tell (Scheme_Object *port)
MZ_EXTERN long scheme_output_tell (Scheme_Object *port)
MZ_EXTERN long scheme_tell_line (Scheme_Object *port)
MZ_EXTERN long scheme_tell_column (Scheme_Object *port)
MZ_EXTERN void scheme_tell_all (Scheme_Object *port, long *line, long *col, long *pos)
MZ_EXTERN void scheme_count_lines (Scheme_Object *port)
MZ_EXTERN void scheme_close_input_port (Scheme_Object *port)
MZ_EXTERN void scheme_close_output_port (Scheme_Object *port)
MZ_EXTERN Scheme_Objectscheme_write_special (int argc, Scheme_Object *argv[])
MZ_EXTERN Scheme_Objectscheme_write_special_nonblock (int argc, Scheme_Object *argv[])
MZ_EXTERN Scheme_Objectscheme_make_write_evt (const char *who, Scheme_Object *port, Scheme_Object *special, char *str, long start, long size)
MZ_EXTERN Scheme_Portscheme_port_record (Scheme_Object *port)
MZ_EXTERN Scheme_Input_Portscheme_input_port_record (Scheme_Object *port)
MZ_EXTERN Scheme_Output_Portscheme_output_port_record (Scheme_Object *port)
XFORM_NONGCING MZ_EXTERN int scheme_is_input_port (Scheme_Object *port)
XFORM_NONGCING MZ_EXTERN int scheme_is_output_port (Scheme_Object *port)
MZ_EXTERN Scheme_Objectscheme_make_port_type (const char *name)
MZ_EXTERN Scheme_Input_Portscheme_make_input_port (Scheme_Object *subtype, void *data, Scheme_Object *name, Scheme_Get_String_Fun get_byte_string_fun, Scheme_Peek_String_Fun peek_string_fun, Scheme_Progress_Evt_Fun progress_evt_fun, Scheme_Peeked_Read_Fun peeked_read_fun, Scheme_In_Ready_Fun byte_ready_fun, Scheme_Close_Input_Fun close_fun, Scheme_Need_Wakeup_Input_Fun need_wakeup_fun, int must_close)
MZ_EXTERN Scheme_Output_Portscheme_make_output_port (Scheme_Object *subtype, void *data, Scheme_Object *name, Scheme_Write_String_Evt_Fun write_byte_string_evt_fun, Scheme_Write_String_Fun write_byte_string_fun, Scheme_Out_Ready_Fun ready_fun, Scheme_Close_Output_Fun close_fun, Scheme_Need_Wakeup_Output_Fun need_wakeup_fun, Scheme_Write_Special_Evt_Fun write_special_evt_fun, Scheme_Write_Special_Fun write_special_fun, int must_close)
MZ_EXTERN void scheme_set_next_port_custodian (Scheme_Custodian *c)
MZ_EXTERN void scheme_set_port_location_fun (Scheme_Port *port, Scheme_Location_Fun location_fun)
MZ_EXTERN void scheme_set_port_count_lines_fun (Scheme_Port *port, Scheme_Count_Lines_Fun count_lines_fun)
MZ_EXTERN Scheme_Objectscheme_progress_evt_via_get (Scheme_Input_Port *port)
MZ_EXTERN int scheme_peeked_read_via_get (Scheme_Input_Port *port, long size, Scheme_Object *unless_evt, Scheme_Object *target_ch)
MZ_EXTERN Scheme_Objectscheme_write_evt_via_write (Scheme_Output_Port *port, const char *str, long offset, long size)
MZ_EXTERN Scheme_Objectscheme_write_special_evt_via_write_special (Scheme_Output_Port *port, Scheme_Object *special)
MZ_EXTERN Scheme_Objectscheme_open_input_file (const char *name, const char *who)
MZ_EXTERN Scheme_Objectscheme_open_output_file (const char *name, const char *who)
MZ_EXTERN Scheme_Objectscheme_open_input_output_file (const char *name, const char *who, Scheme_Object **oport)
MZ_EXTERN Scheme_Objectscheme_open_output_file_with_mode (const char *name, const char *who, int text)
MZ_EXTERN Scheme_Objectscheme_make_file_input_port (FILE *fp)
MZ_EXTERN Scheme_Objectscheme_make_named_file_input_port (FILE *fp, Scheme_Object *name)
MZ_EXTERN Scheme_Objectscheme_make_file_output_port (FILE *fp)
MZ_EXTERN Scheme_Objectscheme_make_fd_input_port (int fd, Scheme_Object *name, int regfile, int win_textmode)
MZ_EXTERN Scheme_Objectscheme_make_fd_output_port (int fd, Scheme_Object *name, int regfile, int win_textmode, int read_too)
MZ_EXTERN Scheme_Objectscheme_make_byte_string_input_port (const char *str)
MZ_EXTERN Scheme_Objectscheme_make_sized_byte_string_input_port (const char *str, long len)
MZ_EXTERN Scheme_Objectscheme_make_byte_string_output_port ()
MZ_EXTERN char * scheme_get_sized_byte_string_output (Scheme_Object *port, long *len)
MZ_EXTERN char * scheme_get_reset_sized_byte_string_output (Scheme_Object *port, long *len, int reset, long startpos, long endpos)
MZ_EXTERN void scheme_pipe (Scheme_Object **read, Scheme_Object **write)
MZ_EXTERN void scheme_pipe_with_limit (Scheme_Object **write, Scheme_Object **read, int maxsize)
MZ_EXTERN Scheme_Objectscheme_make_null_output_port (int can_write_special)
MZ_EXTERN Scheme_Objectscheme_make_redirect_output_port (Scheme_Object *port)
MZ_EXTERN long scheme_set_file_position (Scheme_Object *port, long pos)
MZ_EXTERN int scheme_file_exists (char *filename)
MZ_EXTERN int scheme_directory_exists (char *dirname)
MZ_EXTERN char * scheme_expand_filename (char *filename, int ilen, const char *errorin, int *ex, int guards)
MZ_EXTERN char * scheme_expand_user_filename (char *filename, int ilen, const char *errorin, int *ex, int guards)
MZ_EXTERN char * scheme_expand_string_filename (Scheme_Object *f, const char *errorin, int *ex, int guards)
MZ_EXTERN char * scheme_os_getcwd (char *buf, int buflen, int *actlen, int noexn)
MZ_EXTERN int scheme_os_setcwd (char *buf, int noexn)
MZ_EXTERN char * scheme_getdrive (void)
MZ_EXTERN Scheme_Objectscheme_split_path (const char *path, int len, Scheme_Object **base, int *isdir, int kind)
MZ_EXTERN Scheme_Objectscheme_build_path (int argc, Scheme_Object **argv)
MZ_EXTERN Scheme_Objectscheme_path_to_directory_path (Scheme_Object *p)
MZ_EXTERN Scheme_Objectscheme_path_to_complete_path (Scheme_Object *path, Scheme_Object *relto_path)
MZ_EXTERN Scheme_Objectscheme_make_path (const char *chars)
MZ_EXTERN Scheme_Objectscheme_make_sized_path (char *chars, long len, int copy)
MZ_EXTERN Scheme_Objectscheme_make_sized_offset_path (char *chars, long d, long len, int copy)
MZ_EXTERN Scheme_Objectscheme_make_sized_offset_kind_path (char *chars, long d, long len, int copy, int kind)
MZ_EXTERN Scheme_Objectscheme_make_path_without_copying (char *chars)
MZ_EXTERN voidscheme_alloc_fdset_array (int count, int permanent)
MZ_EXTERN voidscheme_init_fdset_array (void *fdarray, int count)
MZ_EXTERN voidscheme_get_fdset (void *fdarray, int pos)
MZ_EXTERN void scheme_fdzero (void *fd)
MZ_EXTERN void scheme_fdset (void *fd, int pos)
MZ_EXTERN void scheme_fdclr (void *fd, int pos)
MZ_EXTERN int scheme_fdisset (void *fd, int pos)
MZ_EXTERN void scheme_add_fd_handle (void *h, void *fds, int repost)
MZ_EXTERN void scheme_add_fd_eventmask (void *fds, int mask)
MZ_EXTERN void scheme_collapse_win_fd (void *fds)
MZ_EXTERN void scheme_security_check_file (const char *who, const char *filename, int guards)
MZ_EXTERN void scheme_security_check_file_link (const char *who, const char *filename, const char *content)
MZ_EXTERN void scheme_security_check_network (const char *who, const char *host, int port, int client)
MZ_EXTERN struct mz_addrinfoscheme_get_host_address (const char *address, int id, int *err, int family, int passive, int tcp)
MZ_EXTERN void scheme_free_host_address (struct mz_addrinfo *a)
MZ_EXTERN const char * scheme_host_address_strerror (int errnum)
MZ_EXTERN void scheme_getnameinfo (void *sa, int salen, char *host, int hostlen, char *serv, int servlen)
MZ_EXTERN int scheme_get_port_file_descriptor (Scheme_Object *p, long *_fd)
MZ_EXTERN long scheme_get_port_fd (Scheme_Object *p)
MZ_EXTERN int scheme_get_port_socket (Scheme_Object *p, long *_s)
MZ_EXTERN void scheme_socket_to_ports (long s, const char *name, int takeover, Scheme_Object **_inp, Scheme_Object **_outp)
MZ_EXTERN void scheme_set_type_printer (Scheme_Type stype, Scheme_Type_Printer printer)
MZ_EXTERN void scheme_print_bytes (Scheme_Print_Params *pp, const char *str, int offset, int len)
MZ_EXTERN void scheme_print_utf8 (Scheme_Print_Params *pp, const char *str, int offset, int len)
MZ_EXTERN void scheme_print_string (Scheme_Print_Params *pp, const mzchar *str, int offset, int len)
MZ_EXTERN Scheme_Objectscheme_read_byte_string (Scheme_Object *port)
MZ_EXTERN Scheme_Objectscheme_make_namespace (int argc, Scheme_Object *argv[])
MZ_EXTERN void scheme_add_namespace_option (Scheme_Object *key, void(*f)(Scheme_Env *))
MZ_EXTERN void scheme_add_global (const char *name, Scheme_Object *val, Scheme_Env *env)
MZ_EXTERN void scheme_add_global_symbol (Scheme_Object *name, Scheme_Object *val, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_make_envunbox (Scheme_Object *value)
MZ_EXTERN Scheme_Objectscheme_lookup_global (Scheme_Object *symbol, Scheme_Env *env)
MZ_EXTERN Scheme_Bucketscheme_global_bucket (Scheme_Object *symbol, Scheme_Env *env)
MZ_EXTERN Scheme_Bucketscheme_global_keyword_bucket (Scheme_Object *symbol, Scheme_Env *env)
MZ_EXTERN Scheme_Bucketscheme_module_bucket (Scheme_Object *mod, Scheme_Object *var, int pos, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_builtin_value (const char *name)
MZ_EXTERN void scheme_set_global_bucket (char *proc, Scheme_Bucket *var, Scheme_Object *val, int set_undef)
MZ_EXTERN void scheme_install_macro (Scheme_Bucket *b, Scheme_Object *v)
MZ_EXTERN void scheme_save_initial_module_set (Scheme_Env *env)
MZ_EXTERN Scheme_Envscheme_primitive_module (Scheme_Object *name, Scheme_Env *for_env)
MZ_EXTERN void scheme_finish_primitive_module (Scheme_Env *env)
MZ_EXTERN void scheme_protect_primitive_provide (Scheme_Env *env, Scheme_Object *name)
MZ_EXTERN Scheme_Objectscheme_make_modidx (Scheme_Object *path, Scheme_Object *base, Scheme_Object *resolved)
MZ_EXTERN Scheme_Objectscheme_apply_for_syntax_in_env (Scheme_Object *proc, Scheme_Env *env)
MZ_EXTERN Scheme_Objectscheme_dynamic_require (int argc, Scheme_Object *argv[])
MZ_EXTERN Scheme_Objectscheme_namespace_require (Scheme_Object *)
MZ_EXTERN int scheme_is_module_path (Scheme_Object *)
MZ_EXTERN Scheme_Objectscheme_datum_to_kernel_stx (Scheme_Object *e)
MZ_EXTERN Scheme_Objectscheme_intern_symbol (const char *name)
MZ_EXTERN Scheme_Objectscheme_intern_exact_symbol (const char *name, unsigned int len)
MZ_EXTERN Scheme_Objectscheme_intern_exact_char_symbol (const mzchar *name, unsigned int len)
MZ_EXTERN Scheme_Objectscheme_make_symbol (const char *name)
MZ_EXTERN Scheme_Objectscheme_make_exact_symbol (const char *name, unsigned int len)
MZ_EXTERN Scheme_Objectscheme_make_exact_char_symbol (const mzchar *name, unsigned int len)
MZ_EXTERN const char * scheme_symbol_name (Scheme_Object *sym)
MZ_EXTERN const char * scheme_symbol_name_and_size (Scheme_Object *sym, unsigned int *l, int flags)
MZ_EXTERN char * scheme_symbol_val (Scheme_Object *sym)
MZ_EXTERN Scheme_Objectscheme_intern_exact_keyword (const char *name, unsigned int len)
MZ_EXTERN Scheme_Objectscheme_intern_exact_char_keyword (const mzchar *name, unsigned int len)
MZ_EXTERN Scheme_Object ** scheme_make_struct_values (Scheme_Object *struct_type, Scheme_Object **names, int count, int flags)
MZ_EXTERN Scheme_Object ** scheme_make_struct_names (Scheme_Object *base, Scheme_Object *field_names, int flags, int *count_out)
MZ_EXTERN Scheme_Objectscheme_make_struct_type (Scheme_Object *base, Scheme_Object *parent, Scheme_Object *inspector, int num_fields, int num_uninit_fields, Scheme_Object *uninit_val, Scheme_Object *properties, Scheme_Object *guard)
MZ_EXTERN Scheme_Objectscheme_make_struct_instance (Scheme_Object *stype, int argc, Scheme_Object **argv)
MZ_EXTERN Scheme_Objectscheme_make_struct_exptime (Scheme_Object **names, int count, Scheme_Object *super_sym, Scheme_Object *super_exptime, int flags)
XFORM_NONGCING MZ_EXTERN int scheme_is_struct_instance (Scheme_Object *type, Scheme_Object *v)
MZ_EXTERN Scheme_Objectscheme_struct_ref (Scheme_Object *s, int pos)
MZ_EXTERN void scheme_struct_set (Scheme_Object *s, int pos, Scheme_Object *v)
MZ_EXTERN Scheme_Objectscheme_make_struct_type_property (Scheme_Object *name)
MZ_EXTERN Scheme_Objectscheme_make_struct_type_property_w_guard (Scheme_Object *name, Scheme_Object *guard)
XFORM_NONGCING MZ_EXTERN
Scheme_Object
scheme_struct_type_property_ref (Scheme_Object *prop, Scheme_Object *s)
MZ_EXTERN Scheme_Objectscheme_make_location (Scheme_Object *src, Scheme_Object *line, Scheme_Object *col, Scheme_Object *pos, Scheme_Object *span)
MZ_EXTERN int scheme_is_location (Scheme_Object *o)
MZ_EXTERN Scheme_Objectscheme_make_inspector (Scheme_Object *superior)
XFORM_NONGCING MZ_EXTERN int scheme_is_subinspector (Scheme_Object *i, Scheme_Object *sup)
XFORM_NONGCING MZ_EXTERN int scheme_eq (Scheme_Object *obj1, Scheme_Object *obj2)
XFORM_NONGCING MZ_EXTERN int scheme_eqv (Scheme_Object *obj1, Scheme_Object *obj2)
MZ_EXTERN int scheme_equal (Scheme_Object *obj1, Scheme_Object *obj2)
MZ_EXTERN long scheme_equal_hash_key (Scheme_Object *o)
MZ_EXTERN long scheme_equal_hash_key2 (Scheme_Object *o)
MZ_EXTERN long scheme_recur_equal_hash_key (Scheme_Object *o, void *cycle_data)
MZ_EXTERN long scheme_recur_equal_hash_key2 (Scheme_Object *o, void *cycle_data)
MZ_EXTERN long scheme_eqv_hash_key (Scheme_Object *o)
MZ_EXTERN long scheme_eqv_hash_key2 (Scheme_Object *o)
MZ_EXTERN void scheme_set_type_equality (Scheme_Type type, Scheme_Equal_Proc f, Scheme_Primary_Hash_Proc hash1, Scheme_Secondary_Hash_Proc hash2)
MZ_EXTERN int scheme_recur_equal (Scheme_Object *obj1, Scheme_Object *obj2, void *cycle_info)
MZ_EXTERN Scheme_Objectscheme_build_list (int argc, Scheme_Object **argv)
MZ_EXTERN Scheme_Objectscheme_build_list_offset (int argc, Scheme_Object **argv, int delta)
MZ_EXTERN int scheme_is_list (Scheme_Object *obj1)
MZ_EXTERN int scheme_list_length (Scheme_Object *list)
MZ_EXTERN int scheme_proper_list_length (Scheme_Object *list)
MZ_EXTERN Scheme_Objectscheme_alloc_list (int size)
MZ_EXTERN Scheme_Objectscheme_map_1 (Scheme_Object *(*f)(Scheme_Object *), Scheme_Object *l)
MZ_EXTERN Scheme_Objectscheme_car (Scheme_Object *pair)
MZ_EXTERN Scheme_Objectscheme_cdr (Scheme_Object *pair)
MZ_EXTERN Scheme_Objectscheme_cadr (Scheme_Object *pair)
MZ_EXTERN Scheme_Objectscheme_caddr (Scheme_Object *pair)
MZ_EXTERN Scheme_Objectscheme_vector_to_list (Scheme_Object *vec)
MZ_EXTERN Scheme_Objectscheme_list_to_vector (Scheme_Object *list)
MZ_EXTERN Scheme_Objectscheme_append (Scheme_Object *lstx, Scheme_Object *lsty)
MZ_EXTERN Scheme_Objectscheme_reverse (Scheme_Object *l)
MZ_EXTERN Scheme_Objectscheme_box (Scheme_Object *v)
MZ_EXTERN Scheme_Objectscheme_unbox (Scheme_Object *obj)
MZ_EXTERN void scheme_set_box (Scheme_Object *b, Scheme_Object *v)
MZ_EXTERN Scheme_Objectscheme_make_weak_box (Scheme_Object *v)
MZ_EXTERN Scheme_Objectscheme_make_ephemeron (Scheme_Object *key, Scheme_Object *val)
MZ_EXTERN Scheme_Objectscheme_ephemeron_value (Scheme_Object *o)
MZ_EXTERN Scheme_Objectscheme_ephemeron_key (Scheme_Object *o)
MZ_EXTERN Scheme_Objectscheme_load (const char *file)
MZ_EXTERN Scheme_Objectscheme_load_extension (const char *filename, Scheme_Env *env)
MZ_EXTERN void scheme_register_extension_global (void *ptr, long size)
MZ_EXTERN long scheme_get_seconds (void)
MZ_EXTERN long scheme_get_milliseconds (void)
MZ_EXTERN double scheme_get_inexact_milliseconds (void)
MZ_EXTERN long scheme_get_process_milliseconds (void)
MZ_EXTERN long scheme_get_thread_milliseconds (Scheme_Object *thrd)
MZ_EXTERN char * scheme_banner (void)
MZ_EXTERN char * scheme_version (void)
MZ_EXTERN int scheme_check_proc_arity (const char *where, int a, int which, int argc, Scheme_Object **argv)
MZ_EXTERN int scheme_check_proc_arity2 (const char *where, int a, int which, int argc, Scheme_Object **argv, int false_ok)
MZ_EXTERN char * scheme_make_provided_string (Scheme_Object *o, int count, int *len)
MZ_EXTERN char * scheme_make_args_string (char *s, int which, int argc, Scheme_Object **argv, long *len)
MZ_EXTERN const char * scheme_system_library_subpath ()
MZ_EXTERN void scheme_signal_received (void)
MZ_EXTERN int scheme_char_strlen (const mzchar *s)

Variables

MZ_EXTERN THREAD_LOCAL
Scheme_Thread
scheme_current_thread
MZ_EXTERN volatile int scheme_fuel_counter
MZ_EXTERN Scheme_Object scheme_eof [1]
MZ_EXTERN Scheme_Object scheme_null [1]
MZ_EXTERN Scheme_Object scheme_true [1]
MZ_EXTERN Scheme_Object scheme_false [1]
MZ_EXTERN Scheme_Object scheme_void [1]
MZ_EXTERN Scheme_Object scheme_undefined [1]
MZ_EXTERN Scheme_Objectscheme_tail_call_waiting
MZ_EXTERN Scheme_Objectscheme_multiple_values
MZ_EXTERN unsigned short * scheme_uchar_table []
MZ_EXTERN unsigned char * scheme_uchar_cases_table []
MZ_EXTERN unsigned char * scheme_uchar_cats_table []
MZ_EXTERN int scheme_uchar_ups []
MZ_EXTERN int scheme_uchar_downs []
MZ_EXTERN int scheme_uchar_titles []
MZ_EXTERN int scheme_uchar_folds []
MZ_EXTERN unsigned char scheme_uchar_combining_classes []
MZ_EXTERN Scheme_Object ** scheme_char_constants

Define Documentation

Definition at line 638 of file schemef.h.

Definition at line 637 of file schemef.h.

Definition at line 658 of file schemef.h.

Definition at line 657 of file schemef.h.


Function Documentation

Definition at line 7139 of file eval.c.

{
#define PRIM_CHECK_ARITY 0
#define PRIM_CHECK_MULTI 1
#include "schapp.inc"
}

Definition at line 7121 of file eval.c.

{
#define PRIM_CHECK_ARITY 0
#define PRIM_CHECK_MULTI 0
#include "schapp.inc"
}

Definition at line 2382 of file fun.c.

{
  return do_apply_with_prompt(rator, num_rands, rands, 1, 0);
}

Here is the call graph for this function:

Definition at line 7148 of file eval.c.

{
#define PRIM_CHECK_ARITY 1
#define PRIM_CHECK_MULTI 1
#include "schapp.inc"
}

Definition at line 7130 of file eval.c.

{
#define PRIM_CHECK_ARITY 1
#define PRIM_CHECK_MULTI 0
#include "schapp.inc"
}

Definition at line 2377 of file fun.c.

{
  return do_apply_with_prompt(rator, num_rands, rands, 0, 0);
}

Here is the call graph for this function:

Definition at line 6433 of file fun.c.

{
  return do_call_with_prompt(f, data, 0, 0);
}

Here is the call graph for this function:

Definition at line 6438 of file fun.c.

{
  return do_call_with_prompt(f, data, 1, 0);
}

Here is the call graph for this function:

Definition at line 8988 of file eval.c.

{
  return _eval(obj, env, 0, 0, 0, 0);
}

Here is the call graph for this function:

Definition at line 8993 of file eval.c.

{
  return _eval(obj, env, 0, 1, 0, 0);
}

Here is the call graph for this function:

MZ_EXTERN void* GC_malloc ( size_t  size_in_bytes)

Definition at line 300 of file malloc.c.

{
register ptr_t op;
register ptr_t *opp;
register word lw;
DCL_LOCK_STATE;

    if( EXPECT(SMALL_OBJ(lb), 1) ) {
#       ifdef MERGE_SIZES
         lw = GC_size_map[lb];
#      else
         lw = ALIGNED_WORDS(lb);
#       endif
       opp = &(GC_objfreelist[lw]);
       FASTLOCK();
        if( EXPECT(!FASTLOCK_SUCCEEDED() || (op = *opp) == 0, 0) ) {
            FASTUNLOCK();
            return(GENERAL_MALLOC((word)lb, NORMAL));
        }
        /* See above comment on signals.  */
       GC_ASSERT(0 == obj_link(op)
                || (word)obj_link(op)
                     <= (word)GC_greatest_plausible_heap_addr
                   && (word)obj_link(op)
                     >= (word)GC_least_plausible_heap_addr);
        *opp = obj_link(op);
        obj_link(op) = 0;
        GC_words_allocd += lw;
        FASTUNLOCK();
        return((GC_PTR) op);
   } else {
       return(GENERAL_MALLOC((word)lb, NORMAL));
   }
}

Here is the call graph for this function:

MZ_EXTERN void* GC_malloc_atomic ( size_t  size_in_bytes)

Definition at line 245 of file malloc.c.

{
register ptr_t op;
register ptr_t * opp;
register word lw;
DCL_LOCK_STATE;

    if( EXPECT(SMALL_OBJ(lb), 1) ) {
#       ifdef MERGE_SIZES
         lw = GC_size_map[lb];
#      else
         lw = ALIGNED_WORDS(lb);
#       endif
       opp = &(GC_aobjfreelist[lw]);
       FASTLOCK();
        if( EXPECT(!FASTLOCK_SUCCEEDED() || (op = *opp) == 0, 0) ) {
            FASTUNLOCK();
            return(GENERAL_MALLOC((word)lb, PTRFREE));
        }
        /* See above comment on signals.  */
        *opp = obj_link(op);
        GC_words_allocd += lw;
        FASTUNLOCK();
        return((GC_PTR) op);
   } else {
       return(GENERAL_MALLOC((word)lb, PTRFREE));
   }
}

Here is the call graph for this function:

MZ_EXTERN void* GC_malloc_stubborn ( size_t  size_in_bytes)

Definition at line 303 of file stubborn.c.

{
    return(GC_malloc(lb));
}
MZ_EXTERN void* GC_malloc_uncollectable ( size_t  size_in_bytes)

Definition at line 538 of file mallocx.c.

{
register ptr_t op;
register ptr_t *opp;
register word lw;
DCL_LOCK_STATE;

    if( SMALL_OBJ(lb) ) {
#       ifdef MERGE_SIZES
         if (EXTRA_BYTES != 0 && lb != 0) lb--;
                /* We don't need the extra byte, since this won't be  */
                /* collected anyway.                                  */
         lw = GC_size_map[lb];
#      else
         lw = ALIGNED_WORDS(lb);
#       endif
       opp = &(GC_uobjfreelist[lw]);
       FASTLOCK();
        if( FASTLOCK_SUCCEEDED() && (op = *opp) != 0 ) {
            /* See above comment on signals.     */
            *opp = obj_link(op);
            obj_link(op) = 0;
            GC_words_allocd += lw;
            /* Mark bit ws already set on free list.  It will be      */
           /* cleared only temporarily during a collection, as a      */
           /* result of the normal free list mark bit clearing.       */
            GC_non_gc_bytes += WORDS_TO_BYTES(lw);
            FASTUNLOCK();
            return((GC_PTR) op);
        }
        FASTUNLOCK();
        op = (ptr_t)GC_generic_malloc((word)lb, UNCOLLECTABLE);
    } else {
       op = (ptr_t)GC_generic_malloc((word)lb, UNCOLLECTABLE);
    }
    if (0 == op) return(0);
    /* We don't need the lock here, since we have an undisguised      */
    /* pointer.  We do need to hold the lock while we adjust          */
    /* mark bits.                                              */
    {
       register struct hblk * h;
       
       h = HBLKPTR(op);
       lw = HDR(h) -> hb_sz;
       
       DISABLE_SIGNALS();
       LOCK();
       GC_set_mark_bit(op);
       GC_non_gc_bytes += WORDS_TO_BYTES(lw);
       UNLOCK();
       ENABLE_SIGNALS();
       return((GC_PTR) op);
    }
}

Here is the call graph for this function:

Definition at line 1911 of file thread.c.

{
  if (!closers) {
#ifdef USE_ON_EXIT_FOR_ATEXIT
    on_exit(run_atexit_closers, NULL);
#else
    atexit(run_atexit_closers);
#endif

    REGISTER_SO(closers);
    closers = scheme_null;
  }

  closers = scheme_make_raw_pair((Scheme_Object *)f, closers);
}

Here is the call graph for this function:

Definition at line 1661 of file thread.c.

Here is the call graph for this function:

Definition at line 5192 of file thread.c.

{
  Evt *naya;

  if (!evts) {
    REGISTER_SO(evts);
  }

  if (evts_array_size <= type) {
    Evt **nevts;
    int new_size;
    new_size = type + 1;
    if (new_size < _scheme_last_type_)
      new_size = _scheme_last_type_;
    nevts = MALLOC_N(Evt*, new_size);
    memcpy(nevts, evts, evts_array_size * sizeof(Evt*));
    evts = nevts;
    evts_array_size = new_size;
  }

  naya = MALLOC_ONE_RT(Evt);
#ifdef MZTAG_REQUIRED
  naya->type = scheme_rt_evt;
#endif
  naya->sync_type = type;
  naya->ready = (Scheme_Ready_Fun_FPC)ready;
  naya->needs_wakeup = wakeup;
  naya->filter = filter;
  naya->can_redirect = can_redirect;

  evts[type] = naya;
}

Definition at line 5229 of file thread.c.

{
  scheme_add_evt(type, NULL, NULL, filter, 0);
  evts[type]->get_sema = get_sema;
}

Definition at line 922 of file port.c.

{
#if defined(WIN32_FD_HANDLES)
  win_extended_fd_set *efd = (win_extended_fd_set *)fds;
  efd->wait_event_mask = scheme_make_integer(mask | SCHEME_INT_VAL(efd->wait_event_mask));
#endif
}
MZ_EXTERN void scheme_add_fd_handle ( void h,
void fds,
int  repost 
)

Definition at line 888 of file port.c.

{
#if defined(WIN32_FD_HANDLES)
  win_extended_fd_set *efd = (win_extended_fd_set *)fds;
  OS_SEMAPHORE_TYPE *hs;
  int i, *rps;

  i = SCHEME_INT_VAL(efd->num_handles);
  hs = MALLOC_N_ATOMIC(OS_SEMAPHORE_TYPE, i + 1);
  rps = MALLOC_N_ATOMIC(int, i + 1);
  hs[i] = (OS_SEMAPHORE_TYPE)h;
  rps[i] = repost;
  while (i--) {
    hs[i] = efd->handles[i];
    rps[i] = efd->repost_sema[i];
  }
  efd->num_handles = scheme_make_integer(1 + SCHEME_INT_VAL(efd->num_handles));
  efd->handles = hs;
  efd->repost_sema = rps;
  reset_wait_array(efd);
#else
  /* Do nothing. */
#endif
}
MZ_EXTERN void scheme_add_finalizer ( void p,
void(*)(void *p, void *data f,
void data 
)

Definition at line 1199 of file salloc.c.

{
  add_finalizer(p, f, data, 1, 0, NULL, NULL, 0, 0);
}

Here is the call graph for this function:

MZ_EXTERN void scheme_add_finalizer_once ( void p,
void(*)(void *p, void *data f,
void data 
)

Definition at line 1204 of file salloc.c.

{
  add_finalizer(p, f, data, 1, 0, NULL, NULL, 1, 0);
}

Here is the call graph for this function:

MZ_EXTERN void scheme_add_global ( const char *  name,
Scheme_Object val,
Scheme_Env env 
)

Definition at line 1134 of file env.c.

Here is the call graph for this function:

Definition at line 1140 of file env.c.

{
  scheme_do_add_global_symbol(env, sym, obj, 1, 0);
}

Here is the call graph for this function:

Definition at line 1351 of file thread.c.

{
#ifdef MZ_PRECISE_GC
    Scheme_Object *b;
#else
    Scheme_Object **b;
#endif
  Scheme_Custodian_Reference *mr;

  if (!m)
    m = (Scheme_Custodian *)scheme_get_param(scheme_current_config(), MZCONFIG_CUSTODIAN);
  
  if (m->shut_down) {
    /* The custodian was shut down in the time that it took
       to allocate o. This situation should be avoided if at
       all possible, but here's the fail-safe. */
    if (f)
      f(o, data);
    return NULL;
  }

#ifdef MZ_PRECISE_GC
  b = scheme_make_weak_box(NULL);
#else
  b = MALLOC_ONE_WEAK(Scheme_Object*);
#endif
  xCUSTODIAN_FAM(b) = o;

  mr = MALLOC_MREF();

  CUSTODIAN_FAM(mr) = m;

  /* The atomic link via the box `b' allows the execution of wills for
     o. After this, we should either drop the object or we have to
     hold on to the object strongly (for when custodian-close-all is
     called). */
  if (must_close)
    scheme_add_finalizer(o, rebox_willdone_object, mr);
  else
    scheme_add_finalizer(o, managed_object_gone, mr);

  add_managed_box(m, (Scheme_Object **)b, mr, f, data);

  return mr;
}

Here is the call graph for this function:

Definition at line 6850 of file thread.c.

{
  Scheme_NSO *old = namespace_options;
  
  namespace_options = MALLOC_N_RT(Scheme_NSO, (num_nsos + 1));

  memcpy(namespace_options, old, num_nsos * sizeof(Scheme_NSO));

#ifdef MZTAG_REQUIRED
  namespace_options[num_nsos].type = scheme_rt_namespace_option;
#endif
  namespace_options[num_nsos].key = key;
  namespace_options[num_nsos].f = f;
  
  num_nsos++;
}
MZ_EXTERN void scheme_add_scheme_finalizer ( void p,
void(*)(void *p, void *data f,
void data 
)

Definition at line 1214 of file salloc.c.

{
  add_finalizer(p, f, data, 0, 0, NULL, NULL, 0, 0);
}

Here is the call graph for this function:

Definition at line 1219 of file salloc.c.

{
  add_finalizer(p, f, data, 0, 0, NULL, NULL, 1, 0);
}

Here is the call graph for this function:

MZ_EXTERN void scheme_add_to_table ( Scheme_Bucket_Table table,
const char *  key,
void val,
int   
)

Definition at line 750 of file hash.c.

{
  Scheme_Bucket *b;

  b = get_bucket(table, key, 1, NULL);

  if (val)
    b->val = val;
  if (constant && table->with_home)
    ((Scheme_Bucket_With_Flags *)b)->flags |= GLOB_IS_CONST;
}

Here is the call graph for this function:

MZ_EXTERN Scheme_Object* scheme_alloc_byte_string ( long  size,
char  fill 
)

Here is the caller graph for this function:

Here is the caller graph for this function:

MZ_EXTERN void* scheme_alloc_fdset_array ( int  count,
int  permanent 
)

Definition at line 741 of file port.c.

{
#if defined(FILES_HAVE_FDS) || defined(USE_SOCKETS_TCP) || defined(WIN32_FD_HANDLES)
  void *fdarray;
# if defined(WIN32_FD_HANDLES)
  if (count) {
    fdarray = scheme_malloc_allow_interior(count * sizeof(fdset_type));
    if (permanent)
      scheme_dont_gc_ptr(fdarray);
    
    scheme_init_fdset_array(fdarray, count);
  } else
    fdarray = NULL;
# else
  if (permanent)
    fdarray = scheme_malloc_eternal(count * sizeof(fdset_type));
  else
    fdarray = scheme_malloc_atomic(count * sizeof(fdset_type));
# endif
  return fdarray;
#else
  return NULL;
#endif
}

Definition at line 752 of file list.c.

{
  Scheme_Object *pair = scheme_null;
  int i;

  for (i = size; i--; ) {
    pair = cons(scheme_false, pair);
  }

  return pair;
}

Definition at line 1072 of file list.c.

{
  Scheme_Object *first, *last, *orig1, *v;

  orig1 = lst1;

  first = last = NULL;
  while (SCHEME_PAIRP(lst1)) {
    v = cons(SCHEME_CAR(lst1), scheme_null);
    if (!first)
      first = v;
    else
      SCHEME_CDR(last) = v;
    last = v;
    lst1 = SCHEME_CDR(lst1);

    SCHEME_USE_FUEL(1);
  }

  if (!SCHEME_NULLP(lst1))
    scheme_wrong_type("append", "proper list", -1, 0, &orig1);

  if (!last)
    return lst2;

  SCHEME_CDR(last) = lst2;

  return first;
}

Here is the caller graph for this function:

Here is the caller graph for this function:

MZ_EXTERN Scheme_Object* scheme_apply ( Scheme_Object rator,
int  num_rands,
Scheme_Object **  rands 
)

Definition at line 2256 of file fun.c.

{
  return _apply(rator, num_rands, rands, 0, 1);
}

Here is the call graph for this function:

Definition at line 5582 of file module.c.

{
  Scheme_Comp_Env *rhs_env;
  Scheme_Dynamic_State dyn_state;

  rhs_env = scheme_new_comp_env(env, NULL, SCHEME_TOPLEVEL_FRAME);

  scheme_set_dynamic_state(&dyn_state, rhs_env, NULL, scheme_false, NULL, 
      env, (env->link_midx 
        ? env->link_midx 
        : (env->module
          ? env->module->me->src_modidx
          : NULL)));

  return scheme_apply_multi_with_dynamic_state(proc, 0, NULL, &dyn_state);
}

Here is the call graph for this function:

MZ_EXTERN Scheme_Object* scheme_apply_multi ( Scheme_Object rator,
int  num_rands,
Scheme_Object **  rands 
)

Definition at line 2262 of file fun.c.

{
  return _apply(rator, num_rands, rands, 1, 1);
}

Here is the call graph for this function:

Definition at line 2313 of file fun.c.

{
  return _apply(rator, num_rands, rands, 1, 0);
}

Here is the call graph for this function:

Definition at line 2371 of file fun.c.

{
  return do_apply_with_prompt(rator, num_rands, rands, 1, 1);
}

Here is the call graph for this function:

MZ_EXTERN Scheme_Object* scheme_apply_no_eb ( Scheme_Object rator,
int  num_rands,
Scheme_Object **  rands 
)

Definition at line 2307 of file fun.c.

{
  return _apply(rator, num_rands, rands, 0, 0);
}

Here is the call graph for this function:

Definition at line 2468 of file fun.c.

{
  return X_scheme_apply_to_list(rator, rands, 1, 1);
}

Here is the call graph for this function:

Definition at line 2365 of file fun.c.

{
  return do_apply_with_prompt(rator, num_rands, rands, 0, 1);
}

Here is the call graph for this function:

MZ_EXTERN void scheme_arg_mismatch ( const char *  name,
const char *  msg,
Scheme_Object o 
)

Definition at line 1377 of file error.c.

{
  char *s;
  int slen;

  if (o)
    s = scheme_make_provided_string(o, 1, &slen);
  else {
    s = "";
    slen = 0;
  }

  scheme_raise_exn(MZEXN_FAIL_CONTRACT,
                 "%s: %s%t",
                 name, msg, s, slen);
}

Definition at line 1936 of file string.c.

{
  if (embedding_banner)
    return embedding_banner;
  else
    return "Welcome to MzScheme"
      " v" MZSCHEME_VERSION VERSION_SUFFIX
      ", Copyright (c) 2004-2009 PLT Scheme Inc.\n";
}

Definition at line 461 of file bignum.c.

{
  long v;

  if (!SCHEME_BIGNUMP(o))
    return (Scheme_Object *) mzALIAS o;

  if (scheme_bignum_get_int_val(o, &v)) {
    long t;

    t = v & MAX_TWO_BIT_MASK;
    if (t == 0 || t == MAX_TWO_BIT_MASK)
      return scheme_make_integer(v);
    else
      return (Scheme_Object*) mzALIAS o;
  } else
    return (Scheme_Object*) mzALIAS o;
}

Here is the call graph for this function:

Definition at line 1194 of file bignum.c.

{
  Scheme_Object *c;
  unsigned char* str, *str2;
  int i, slen, start, clen;
  bigdig *c_digs;
  SAFE_SPACE(csd)

  if (radix != 10 && radix != 2 && radix != 8 && radix != 16)
    scheme_raise_exn(MZEXN_FAIL_CONTRACT, "bad bignum radix: %d", radix);

  if (SCHEME_BIGLEN(b) == 0) {
    if (alloc) {
      str2 = (unsigned char *)scheme_malloc_atomic(2);
      str2[0] = '0';
      str2[1] = 0;
      return (char *)str2;
    } else
      return "0";
  }

  c = bignum_copy(b, 1);  /* mpn_get_string may need a word of scratch space */

  if (radix == 2)
    slen = WORD_SIZE * SCHEME_BIGLEN(b) + 2;
  else if (radix == 8)
    slen = (int)(ceil(WORD_SIZE * SCHEME_BIGLEN(b) / 3.0) + 2);
  else if (radix == 16)
    slen = WORD_SIZE * SCHEME_BIGLEN(b) / 4 + 2;
  else /* (radix == 10) */
    slen = (int)(ceil(WORD_SIZE * SCHEME_BIGLEN(b) * 0.30102999566398115)) + 1;

  str = (unsigned char *)MALLOC_PROTECT(slen);

  c_digs = SCHEME_BIGDIG_SAFE(c, csd);
  clen = SCHEME_BIGLEN(c);
  PROTECT(c_digs, clen);

  slen = mpn_get_str(str, radix, c_digs, SCHEME_BIGLEN(c) - 1);

  RELEASE(c_digs);

#ifdef MZ_PRECISE_GC
  {
    unsigned char *save = str;
    str = (unsigned char*)scheme_malloc_atomic(slen);
    memcpy(str, save, slen);
    FREE_PROTECT(save);
  }
#endif

  i = 0;
  while (i < slen && str[i] == 0) {
    ++i;
  }

  if (i == slen) {
    if (alloc) {
      str2 = (unsigned char *)scheme_malloc_atomic(2);
      str2[0] = '0';
      str2[1] = 0;
      return (char *)str2;
    } else
      return "0";
  } else
    slen = slen - i + 1 + (SCHEME_BIGPOS(b) ? 0 : 1);

  str2 = (unsigned char *)scheme_malloc_atomic(slen);

  start = i;

  if (!(SCHEME_BIGPOS(b))) {
    i = 1;
    start--;
    str2[0] = '-';
  } else
    i = 0;

  for (; i < slen - 1; ++i) {
    if (str[i + start] < 10)
      str2[i] = str[i + start] + '0';
    else
      str2[i] = str[i + start] + 'a' - 10;
  }

  str2[slen - 1] = 0;

  return (char *)str2;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1284 of file bignum.c.

{
  return scheme_bignum_to_allocated_string(b, radix, 0);
}

Definition at line 4272 of file thread.c.

{
  int result;
  Scheme_Thread *p = scheme_current_thread;
  Scheme_Ready_Fun_FPC f = (Scheme_Ready_Fun_FPC)_f;
  Scheme_Schedule_Info sinfo;
  double sleep_end;

  if (!delay)
    sleep_end = 0.0;
  else {
    sleep_end = scheme_get_inexact_milliseconds();
    sleep_end += (delay * 1000.0);    
  }

  /* We make an sinfo to be polite, but we also assume
     that f will not generate any redirections! */
  init_schedule_info(&sinfo, NULL, sleep_end);

  while (!(result = f((Scheme_Object *)data, &sinfo))) {
    sleep_end = sinfo.sleep_end;
    if (sinfo.spin) {
      init_schedule_info(&sinfo, NULL, 0.0);
      scheme_thread_block(0.0);
      scheme_current_thread->ran_some = 1;
    } else {
      if (sleep_end) {
       delay = (float)(sleep_end - scheme_get_inexact_milliseconds());
       delay /= 1000.0;
       if (delay < 0)
         delay = (float)0.00001;
      } else
       delay = 0.0;

      p->block_descriptor = GENERIC_BLOCKED;
      p->blocker = (Scheme_Object *)data;
      p->block_check = (Scheme_Ready_Fun)f;
      p->block_needs_wakeup = fdf;
      
      scheme_thread_block(delay);
      
      p->block_descriptor = NOT_BLOCKED;
      p->blocker = NULL;
      p->block_check = NULL;
      p->block_needs_wakeup = NULL;
    }
  }
  p->ran_some = 1;

  return result;
}

Here is the call graph for this function:

Definition at line 4325 of file thread.c.

{
  if (enable_break) {
    int v;
    Scheme_Cont_Frame_Data cframe;

    scheme_push_break_enable(&cframe, 1, 1);
    v = scheme_block_until(_f, fdf, data, delay);
    scheme_pop_break_enable(&cframe, 0);

    return v;
  } else
    return scheme_block_until(_f, fdf, data, delay);
}
MZ_EXTERN int scheme_block_until_unless ( Scheme_Ready_Fun  f,
Scheme_Needs_Wakeup_Fun  fdf,
Scheme_Object data,
float  delay,
Scheme_Object unless,
int  enable_break 
)

Definition at line 4365 of file thread.c.

{
  if (unless) {
    void **a;
    a = MALLOC_N(void *, 4);
    a[0] = data;
    a[1] = unless;
    a[2] = f;
    a[3] = fdf;

    data = (Scheme_Object *) mzALIAS a;
    f = ready_unless;
    if (fdf)
      fdf = needs_wakeup_unless;
  }
   
  return scheme_block_until_enable_break(f, fdf, data, delay, enable_break);
}

Here is the call graph for this function:

Definition at line 1396 of file list.c.

{
  Scheme_Object *obj;

  obj = scheme_alloc_small_object();
  obj->type = scheme_box_type;
  SCHEME_BOX_VAL(obj) = v;

  return obj;
}

Definition at line 3863 of file thread.c.

Definition at line 3891 of file thread.c.

{
  if (!p) {
    p = scheme_main_thread;
    if (!p)
      return;
  }

  /* Propagate breaks: */
  while (p->nestee) {
    p = p->nestee;
  }

  p->external_break = 1;

  if (p == scheme_current_thread) {
    if (scheme_can_break(p)) {
      scheme_fuel_counter = 0;
      scheme_jit_stack_boundary = (unsigned long)-1;
    }
  }
  scheme_weak_resume_thread(p);
# if defined(WINDOWS_PROCESSES) || defined(WINDOWS_FILE_HANDLES)
  if (SAME_OBJ(p, scheme_main_thread))
    ReleaseSemaphore(scheme_break_semaphore, 1, NULL);
# endif
}

Here is the call graph for this function:

Definition at line 744 of file hash.c.

{
  return scheme_bucket_or_null_from_table(table, key, 1);
}

Here is the call graph for this function:

Definition at line 855 of file hash.c.

{
  return scheme_equal((Scheme_Object *)t1, (Scheme_Object *)t2);
}

Definition at line 728 of file list.c.

{
  Scheme_Object *pair = scheme_null;
  int i;

  for (i = size; i--; ) {
    pair = cons(argv[i], pair);
  }

  return pair;
}

Definition at line 740 of file list.c.

{
  Scheme_Object *pair = scheme_null;
  int i;

  for (i = size; i-- > delta; ) {
    pair = cons(argv[i], pair);
  }

  return pair;
}

Definition at line 3093 of file file.c.

{
  int kind = SCHEME_PLATFORM_PATH_KIND, i;

  for (i = 0; i < argc; i++) {
    if (SCHEME_GENERAL_PATHP(argv[i])) {
      kind = SCHEME_PATH_KIND(argv[i]);
      break;
    } else if (SCHEME_CHAR_STRINGP(argv[i])) {
      kind = SCHEME_PLATFORM_PATH_KIND;
      break;
    }
  }
  
  return do_build_path(argc, argv, 0, 0, kind);
}

Here is the call graph for this function:

Definition at line 4395 of file module.c.

{
  Scheme_Object *a[2], *v;

  a[1] = scheme_intern_symbol(name);

  /* Try kernel first: */
  a[0] = kernel_modname;
  v = _dynamic_require(2, a, scheme_get_env(NULL), 0, 0, 0, 0, 0, -1);
  if (v)
    return v;

  /* Also try #%utils... */
  a[0] = scheme_make_pair(quote_symbol,
                          scheme_make_pair(scheme_intern_symbol("#%utils"),
                                           scheme_null));
  v = _dynamic_require(2, a, initial_modules_env, 0, 0, 0, 0, 0, -1);
  if (v)
    return v;

  return NULL;
}

Here is the call graph for this function:

Definition at line 3032 of file port.c.

{
  Scheme_Input_Port *ip;
  int retval;

  ip = scheme_input_port_record(port);

  CHECK_PORT_CLOSED("char-ready?", "input", port, ip->closed);

  if (ip->ungotten_count || ip->ungotten_special
      || (ip->pending_eof > 1)
      || pipe_char_count(ip->peeked_read))
    retval = 1;
  else {
    Scheme_In_Ready_Fun f = ip->byte_ready_fun;
    retval = f(ip);
  }

  return retval;
}

Here is the call graph for this function:

Definition at line 1296 of file string.c.

{
  return do_byte_string_to_char_string("s->s", o, 0, SCHEME_BYTE_STRLEN_VAL(o), 0xFFFD, 0);
}

Here is the call graph for this function:

Definition at line 1301 of file string.c.

{
  return do_byte_string_to_char_string_locale("s->s", o, 0, SCHEME_BYTE_STRLEN_VAL(o), 0xFFFD);
}

Here is the call graph for this function:

Definition at line 851 of file list.c.

{
  return (SCHEME_CAR (SCHEME_CDR (SCHEME_CDR (pair))));
}

Definition at line 845 of file list.c.

{
  return (SCHEME_CAR (SCHEME_CDR (pair)));
}

Definition at line 3622 of file portfun.c.

{
  Scheme_Cont_Frame_Data cframe;
  Scheme_Object *v;

  scheme_push_break_enable(&cframe, 1, 1);

  v = prim(argc, argv);

  scheme_pop_break_enable(&cframe, 0);

  return v;
}

Definition at line 6423 of file fun.c.

{
  return do_call_with_prompt(f, data, 0, 1);
}

Here is the call graph for this function:

Definition at line 6428 of file fun.c.

{
  return do_call_with_prompt(f, data, 1, 1);
}

Here is the call graph for this function:

MZ_EXTERN void* scheme_calloc ( size_t  num,
size_t  size 
)

Definition at line 285 of file salloc.c.

{
  void *space;
  
  space = MALLOC(num*size);
  if (!space)
    scheme_raise_out_of_memory(NULL, NULL);
#ifdef NO_GC
  memset(space, 0, (num*size));
#endif

  return (space);
}

Here is the call graph for this function:

Definition at line 3604 of file thread.c.

Definition at line 833 of file list.c.

{
  return (SCHEME_CAR (pair));
}
MZ_EXTERN void scheme_case_lambda_wrong_count ( const char *  name,
int  argc,
Scheme_Object **  argv,
int  is_method,
int  count,
  ... 
)

Definition at line 1165 of file error.c.

{
  char *s;
  long len;

  /* Watch out for impossible is_method claims: */
  if (!argc)
    is_method = 0;

  s = make_arity_expect_string(name, -1, -2, 0, argc, argv, &len, is_method);

  scheme_raise_exn(MZEXN_FAIL_CONTRACT_ARITY, "%t", s, len);
}

Here is the call graph for this function:

Definition at line 839 of file list.c.

{
  return (SCHEME_CDR (pair));
}
MZ_EXTERN void scheme_change_in_table ( Scheme_Bucket_Table table,
const char *  key,
void new_val 
)

Definition at line 782 of file hash.c.

{
  Scheme_Bucket *bucket;

  bucket = get_bucket(table, key, 0, NULL);

  if (bucket)
    bucket->val = naya;
}

Here is the call graph for this function:

Definition at line 3054 of file port.c.

{
  int unavail;

  if (!scheme_byte_ready(port))
    return 0;

  do_peekc_skip(port, scheme_make_integer(0), 2, &unavail);
  
  return !unavail;
}

Here is the call graph for this function:

Definition at line 1367 of file string.c.

Here is the call graph for this function:

Definition at line 1372 of file string.c.

Here is the call graph for this function:

Definition at line 711 of file file.c.

Definition at line 3985 of file string.c.

{
  int i;
  for (i = 0; s[i]; i++) {
  }
  return i;
}
MZ_EXTERN int scheme_check_proc_arity ( const char *  where,
int  a,
int  which,
int  argc,
Scheme_Object **  argv 
)

Definition at line 3093 of file fun.c.

{
  return scheme_check_proc_arity2(where, a, which, argc, argv, 0);
}
MZ_EXTERN int scheme_check_proc_arity2 ( const char *  where,
int  a,
int  which,
int  argc,
Scheme_Object **  argv,
int  false_ok 
)

Definition at line 3063 of file fun.c.

{
  Scheme_Object *p;

  if (which < 0)
    p = argv[0];
  else
    p = argv[which];

  if (false_ok && SCHEME_FALSEP(p))
    return 1;

  if (!SCHEME_PROCP(p) || SCHEME_FALSEP(get_or_check_arity(p, a, NULL))) {
    if (where) {
      char buffer[60];

      sprintf(buffer, "procedure (arity %d)%s", 
             a,
             false_ok ? " or #f" : "");

      scheme_wrong_type(where, buffer, which, argc, argv);
    } else
      return 0;
  }

  return 1;
}

Here is the call graph for this function:

Definition at line 3943 of file fun.c.

Here is the call graph for this function:

Definition at line 543 of file hash.c.

{
  Scheme_Bucket_Table *table;
  size_t asize;

  table = MALLOC_ONE_TAGGED(Scheme_Bucket_Table);
  table->so.type = scheme_bucket_table_type;
  table->size = bt->size;
  table->count = bt->count;
  table->weak = bt->weak;
  table->with_home = 0;
  table->make_hash_indices = bt->make_hash_indices;
  table->compare = bt->compare;
  if (bt->mutex) {
    Scheme_Object *sema;
    sema = scheme_make_sema(1);
    table->mutex = sema;
  }
  {
    Scheme_Bucket **ba;
    asize = (size_t)table->size * sizeof(Scheme_Bucket *);
    ba = (Scheme_Bucket **)scheme_malloc(asize);
    table->buckets = ba;
    memcpy(ba, bt->buckets, asize);
  }

  return table;
}

Definition at line 463 of file hash.c.

{
  Scheme_Hash_Table *table;
  Scheme_Object **ba;

  table = MALLOC_ONE_TAGGED(Scheme_Hash_Table);
  memcpy(table, ht, sizeof(Scheme_Hash_Table));
  MZ_OPT_HASH_KEY(&(table->iso)) = 0;

  if (table->size) {
    ba = MALLOC_N(Scheme_Object *, table->size);
    memcpy(ba, table->vals, sizeof(Scheme_Object *) * table->size);
    table->vals = ba;
    ba = MALLOC_N(Scheme_Object *, table->size);
    memcpy(ba, table->keys, sizeof(Scheme_Object *) * table->size);
    table->keys = ba;
  }

  if (table->mutex) {
    Scheme_Object *sema;
    sema = scheme_make_sema(1);
    table->mutex = sema;
  }

  return table;
}

Definition at line 4503 of file string.c.

{
  close_converter(conv, NULL);
}

Here is the call graph for this function:

Definition at line 3378 of file port.c.

{
  Scheme_Input_Port *ip;

  ip = scheme_input_port_record(port);

  if (!ip->closed) {
    if (ip->close_fun) {
      Scheme_Close_Input_Fun f = ip->close_fun;
      f(ip);
    }

    if (ip->progress_evt) {
      scheme_post_sema_all(ip->progress_evt);
      ip->progress_evt = NULL;
    }

    if (ip->mref) {
      scheme_remove_managed(ip->mref, (Scheme_Object *)ip);
      ip->mref = NULL;
    }

    ip->closed = 1;
    ip->ungotten_count = 0;
    ip->ungotten_special = NULL;
  }
}

Definition at line 1603 of file thread.c.

{
  if (scheme_do_close_managed(m, NULL)) {
    /* Kill/suspend self */
    if (scheme_current_thread->suspend_to_kill)
      suspend_thread(scheme_current_thread);
    else
      scheme_thread_block(0.0);
  }

  /* Give killed threads time to die: */
  scheme_thread_block(0);
  scheme_current_thread->ran_some = 1;
}

Here is the call graph for this function:

Definition at line 3528 of file port.c.

{
  Scheme_Output_Port *op;

  op = scheme_output_port_record(port);

  if (!op->closed) {
    /* call close function first; it might raise an exception */
    if (op->close_fun) {
      Scheme_Close_Output_Fun f = op->close_fun;
      f(op);
    }

    /* NOTE: Allow the possibility that some other thread finishes the
       close while f blocks. */

    if (op->mref) {
      scheme_remove_managed(op->mref, (Scheme_Object *)op);
      op->mref = NULL;
    }
    
    op->closed = 1;
  }
}

Definition at line 3414 of file port.c.

Definition at line 959 of file port.c.

{
#if defined(WIN32_FD_HANDLES)
  win_extended_fd_set *rfd, *wfd, *efd;
  HANDLE *wa, e;
  int i, p = 0, mask, j;
  SOCKET s;

  rfd = (win_extended_fd_set *)fds;
  wfd = (win_extended_fd_set *)scheme_get_fdset(fds, 1);
  efd = (win_extended_fd_set *)scheme_get_fdset(fds, 2);

  if (rfd->combined_wait_array) {
    /* clean up */
    for (i = SCHEME_INT_VAL(rfd->added); i--; ) {
      if (rfd->sockets[i] != INVALID_SOCKET)
       WSAEventSelect(rfd->sockets[i], NULL, 0);
    }
    for (i = SCHEME_INT_VAL(wfd->added); i--; ) {
      if (wfd->sockets[i] != INVALID_SOCKET)
       WSAEventSelect(wfd->sockets[i], NULL, 0);
    }
    for (i = SCHEME_INT_VAL(efd->added); i--; ) {
      if (efd->sockets[i] != INVALID_SOCKET)
       WSAEventSelect(efd->sockets[i], NULL, 0);
    }
    p = SCHEME_INT_VAL(rfd->num_handles);
    for (i = SCHEME_INT_VAL(rfd->combined_len); i-- > p; ) {
      WSACloseEvent(rfd->combined_wait_array[i]);
    }
    rfd->combined_wait_array = NULL;
  } else {
    /* merge */
    if (SCHEME_INT_VAL(rfd->alloc) < SCHEME_INT_VAL(wfd->alloc)) {
      if (SCHEME_INT_VAL(wfd->alloc) < SCHEME_INT_VAL(efd->alloc))
       wa = efd->wait_array;
      else
       wa = wfd->wait_array;
    } else {
      if (SCHEME_INT_VAL(rfd->alloc) < SCHEME_INT_VAL(efd->alloc))
       wa = efd->wait_array;
      else
       wa = rfd->wait_array;
    }

    rfd->combined_wait_array = wa;

    p = SCHEME_INT_VAL(rfd->num_handles);
    for (i = 0; i < p; i++) {
      wa[i] = rfd->handles[i];
    }
  
    for (i = SCHEME_INT_VAL(rfd->added); i--; ) {
      s = rfd->sockets[i];
      if (s != INVALID_SOCKET) {
       mask = FD_READ | FD_ACCEPT | FD_CLOSE;
       
       for (j = SCHEME_INT_VAL(wfd->added); j--; ) {
         if (wfd->sockets[j] == s) {
           mask |= FD_WRITE;
           break;
         }
       }

       for (j = SCHEME_INT_VAL(efd->added); j--; ) {
         if (efd->sockets[j] == s) {
           mask |= FD_OOB;
           break;
         }
       }

       e = WSACreateEvent();
       wa[p++] = e;
       WSAEventSelect_plus_check(s, e, mask);
      }
    }

    for (i = SCHEME_INT_VAL(wfd->added); i--; ) {
      s = wfd->sockets[i];
      if (s != INVALID_SOCKET) {
       mask = FD_WRITE | FD_CONNECT | FD_CLOSE;
       
       for (j = SCHEME_INT_VAL(rfd->added); j--; ) {
         if (rfd->sockets[j] == s) {
           mask = 0;
           break;
         }
       }

       if (mask) {
         for (j = SCHEME_INT_VAL(efd->added); j--; ) {
           if (efd->sockets[j] == s) {
             mask |= FD_OOB;
             break;
           }
         }
         
         e = WSACreateEvent();
         wa[p++] = e;
         WSAEventSelect_plus_check(s, e, mask);
       }
      }
    }

    for (i = SCHEME_INT_VAL(efd->added); i--; ) {
      s = efd->sockets[i];
      if (s != INVALID_SOCKET) {
       mask = FD_OOB | FD_CLOSE;
       
       for (j = SCHEME_INT_VAL(rfd->added); j--; ) {
         if (rfd->sockets[j] == s) {
           mask = 0;
           break;
         }
       }

       if (mask) {
         for (j = SCHEME_INT_VAL(wfd->added); j--; ) {
           if (wfd->sockets[j] == s) {
             mask = 0;
             break;
           }
         }
         
         if (mask) {
           e = WSACreateEvent();
           wa[p++] = e;
           WSAEventSelect_plus_check(s, e, mask);
         }
       }
      }
    }

    rfd->combined_len = scheme_make_integer(p);
  }
#endif
}

Definition at line 1236 of file salloc.c.

{
  GC_gcollect();
}

Here is the call graph for this function:

MZ_EXTERN Scheme_Object* scheme_compile ( Scheme_Object form,
Scheme_Env env,
int  writeable 
)

Definition at line 5233 of file eval.c.

{
  return _compile(form, env, writeable, 0, 1, 1);
}

Here is the call graph for this function:

Definition at line 9051 of file eval.c.

{
  return SCHEME_STX_VAL(stx);
}

Definition at line 126 of file complex.c.

{
  return ((Scheme_Complex *)n)->i;
}

Definition at line 83 of file complex.c.

{
  Scheme_Complex *c = (Scheme_Complex *)o;

  if (c->i == zero)
    return c->r;
  if (c->r == zero) {
    /* No coercions */
    return (Scheme_Object *)c; 
  }

  if (SCHEME_DBLP(c->i)) {
    if (!SCHEME_DBLP(c->r)) {
      Scheme_Object *r;
      r = scheme_make_double(scheme_get_val_as_double(c->r));
      c->r = r;
    }
  } else if (SCHEME_DBLP(c->r)) {
    Scheme_Object *i;
    i = scheme_make_double(scheme_get_val_as_double(c->i));
    c->i = i;
  }

#ifdef MZ_USE_SINGLE_FLOATS
  if (SCHEME_FLTP(c->i)) {
    if (!SCHEME_FLTP(c->r)) {
      if (SCHEME_DBLP(c->r)) {
       c->i = scheme_make_double(SCHEME_FLT_VAL(c->i));
      } else {
       c->r = scheme_make_float(scheme_get_val_as_float(c->r));
      }
    }
  }
#endif

  return (Scheme_Object *)c;
}

Here is the call graph for this function:

Definition at line 121 of file complex.c.

{
  return ((Scheme_Complex *)n)->r;
}

Definition at line 3362 of file port.c.

{
  Scheme_Port *ip;

  ip = scheme_port_record(port);

  if (!ip->count_lines) {
    ip->count_lines = 1;
    if (ip->count_lines_fun) {
      Scheme_Count_Lines_Fun cl = ip->count_lines_fun;
      cl(ip);
    }
  }
}

Definition at line 3665 of file thread.c.

Definition at line 6105 of file thread.c.

{
  Scheme_Object *v;

  v = scheme_extract_one_cc_mark(NULL, scheme_parameterization_key);

  if (!SAME_TYPE(scheme_config_type, SCHEME_TYPE(v))) {
    /* Someone has grabbed parameterization-key out of #%paramz
       and misused it.
       Printing an error message requires consulting parameters,
       so just escape. */
    scheme_longjmp(scheme_error_buf, 1);
  }

  return (Scheme_Config *)v;
}

Definition at line 6884 of file fun.c.

{
  return continuation_marks(scheme_current_thread, NULL, NULL, NULL, 
                            prompt_tag ? prompt_tag : scheme_default_prompt_tag,
                            "continuation-marks",
                            0);
}

Here is the call graph for this function:

MZ_EXTERN void scheme_custodian_check_available ( Scheme_Custodian m,
const char *  who,
const char *  what 
)

Definition at line 1341 of file thread.c.

{
  if (!m)
    m = (Scheme_Custodian *)scheme_get_param(scheme_current_config(), MZCONFIG_CUSTODIAN);
  
  if (!scheme_custodian_is_available(m))
    scheme_arg_mismatch(who, "the custodian has been shut down: ",
                        (Scheme_Object *)m);
}

Definition at line 1334 of file thread.c.

{
  if (m->shut_down)
    return 0;
  return 1;
}

Definition at line 9345 of file eval.c.

Here is the call graph for this function:

Definition at line 194 of file print.c.

{
  scheme_write(obj, scheme_orig_stdout_port);
  fflush (stdout);
}

Definition at line 3922 of file fun.c.

MZ_EXTERN int scheme_directory_exists ( char *  dirname)

Definition at line 2172 of file file.c.

{
# ifdef NO_STAT_PROC
  return 0;
# else
#  ifdef DOS_FILE_SYSTEM
  int isdir;

  return (UNC_stat(dirname, strlen(dirname), NULL, &isdir, NULL, NULL)
         && isdir);
#  else
  struct MSC_IZE(stat) buf;

  while (1) {
    if (!MSC_IZE(stat)(dirname, &buf))
      break;
    else if (errno != EINTR)
      return 0;
  }

  return S_ISDIR(buf.st_mode);
#  endif
# endif
}

Definition at line 280 of file print.c.

{
  scheme_display_w_max(obj, port, -1);
}
MZ_EXTERN char* scheme_display_to_string ( Scheme_Object obj,
long *  len 
)

Definition at line 357 of file print.c.

{
  return scheme_display_to_string_w_max(obj, len, -1);
}
MZ_EXTERN char* scheme_display_to_string_w_max ( Scheme_Object obj,
long *  len,
long  maxl 
)

Definition at line 344 of file print.c.

{
  Scheme_Thread *p = scheme_current_thread;

  p->ku.k.p1 = obj;
  p->ku.k.p2 = len;
  p->ku.k.i1 = maxl;
  p->ku.k.i2 = 0;
  p->ku.k.i3 = 0;

  return (char *)scheme_top_level_do(print_to_string_k, 0);
}

Here is the call graph for this function:

MZ_EXTERN void scheme_display_w_max ( Scheme_Object obj,
Scheme_Object port,
long  maxl 
)

Definition at line 263 of file print.c.

{
  if (((Scheme_Output_Port *)port)->display_handler)
    do_handled_print(obj, port, scheme_display_proc, maxl);
  else {
    Scheme_Thread *p = scheme_current_thread;
    
    p->ku.k.p1 = port;
    p->ku.k.p2 = obj;
    p->ku.k.i1 = maxl;
    p->ku.k.i2 = 0;
    p->ku.k.i3 = 0;
    
    (void)scheme_top_level_do(print_to_port_k, 0);
  }
}

Here is the call graph for this function:

MZ_EXTERN Scheme_Object* scheme_do_eval ( Scheme_Object obj,
int  _num_rands,
Scheme_Object **  rands,
int  val 
)

Definition at line 7683 of file eval.c.

{
  Scheme_Type type;
  Scheme_Object *v;
  GC_CAN_IGNORE Scheme_Object *tmpv; /* safe-for-space relies on GC_CAN_IGNORE */
  GC_MAYBE_IGNORE_INTERIOR Scheme_Object **old_runstack;
  GC_MAYBE_IGNORE_INTERIOR MZ_MARK_STACK_TYPE old_cont_mark_stack;
#if USE_LOCAL_RUNSTACK
  GC_MAYBE_IGNORE_INTERIOR Scheme_Object **runstack;
#endif
  MZ_MARK_STACK_TYPE pmstack = -1;
# define p scheme_current_thread

#ifdef DO_STACK_CHECK
# define SCHEME_CURRENT_PROCESS p
# include "mzstkchk.h"
  {
    p->ku.k.p1 = (void *)obj;
    p->ku.k.i1 = num_rands;
    if (num_rands >= 0) {
      /* Copy rands: */
      GC_CAN_IGNORE void *ra;
      if (rands == p->tail_buffer)
       make_tail_buffer_safe();
      ra = (void *)MALLOC_N(Scheme_Object*, num_rands);
      p->ku.k.p2 = ra;
      {
       int i;
       for (i = num_rands; i--; ) {
         ((Scheme_Object **)ra)[i] = rands[i];
       }
      }
    } else
      p->ku.k.p2 = (void *)rands;
    p->ku.k.i2 = get_value;
    return scheme_handle_stack_overflow(do_eval_k);
  }
#endif

#if USE_LOCAL_RUNSTACK
# define RUNSTACK runstack
# if DELAY_THREAD_RUNSTACK_UPDATE
#  define UPDATE_THREAD_RSPTR() (MZ_RUNSTACK = runstack)
#  define RUNSTACK_CHANGED() 
# else
#  define UPDATE_THREAD_RSPTR() 
#  define RUNSTACK_CHANGED() (MZ_RUNSTACK = runstack)
# endif
  runstack = MZ_RUNSTACK;
# define RESET_LOCAL_RUNSTACK() (runstack = MZ_RUNSTACK)
#else
# define RUNSTACK MZ_RUNSTACK
# define UPDATE_THREAD_RSPTR() 
# define RUNSTACK_CHANGED() 
# define RESET_LOCAL_RUNSTACK() 
#endif

#if 1
# define EVAL_SFS_CLEAR(runstack, obj)                                \
          if (SCHEME_LOCAL_FLAGS(obj) & SCHEME_LOCAL_CLEAR_ON_READ) { \
            runstack[SCHEME_LOCAL_POS(obj)] = NULL;                   \
          }
# define SFS_CLEAR_RUNSTACK_ONE(runstack, pos) runstack[pos] = NULL
# define SFS_CLEAR_RUNSTACK(runstack, i, n)  for (i = n; i--; ) { SFS_CLEAR_RUNSTACK_ONE(runstack, i); }
#else
# define EVAL_SFS_CLEAR(rs, obj) /* empty */
# define SFS_CLEAR_RUNSTACK_ONE(runstack, pos) /* empty */
# define SFS_CLEAR_RUNSTACK(runstack, i, n)  /* empty */
#endif

#define RUNSTACK_START MZ_RUNSTACK_START

#define UPDATE_THREAD_RSPTR_FOR_GC() UPDATE_THREAD_RSPTR()
#define UPDATE_THREAD_RSPTR_FOR_ERROR() UPDATE_THREAD_RSPTR()

#define UPDATE_THREAD_RSPTR_FOR_PROC_MARK() UPDATE_THREAD_RSPTR()

  MZ_CONT_MARK_POS += 2;
  old_runstack = RUNSTACK;
  old_cont_mark_stack = MZ_CONT_MARK_STACK;

  if (num_rands >= 0) {

    if ((RUNSTACK - RUNSTACK_START) < SCHEME_TAIL_COPY_THRESHOLD) {
      /* It's possible that a sequence of primitive _scheme_tail_apply()
        calls will exhaust the Scheme stack. Watch out for that. */
      rands = evacuate_runstack(num_rands, rands, RUNSTACK);

      p->ku.k.p1 = (void *)obj;
      p->ku.k.i1 = num_rands;
      p->ku.k.p2 = (void *)rands;
      p->ku.k.i2 = -1;
      
      UPDATE_THREAD_RSPTR();
      if (rands == p->tail_buffer)
       make_tail_buffer_safe();
      MZ_CONT_MARK_POS -= 2;
      return scheme_enlarge_runstack(SCHEME_TAIL_COPY_THRESHOLD, (void *(*)(void))do_eval_k);
    }

  apply_top:

    /* DANGER: if rands == p->tail_buffer, we have to be careful to
       get the arguments out of the buffer before a GC occurs.
       (Otherwise, they'll be zeroed.) One way to make things safe for
       GC is to let rands have the buffer and create a new one. */

    type = SCHEME_TYPE(obj);

    if (type == scheme_prim_type) {
      GC_CAN_IGNORE Scheme_Primitive_Proc *prim;
      GC_CAN_IGNORE Scheme_Primitive_Closure_Proc *f;
      
#define VACATE_TAIL_BUFFER_USE_RUNSTACK() \
      if (rands == p->tail_buffer) {                                \
       if (num_rands < SCHEME_TAIL_COPY_THRESHOLD) {               \
         int i;                                                    \
         GC_CAN_IGNORE Scheme_Object **quick_rands;                \
                                                                    \
         quick_rands = PUSH_RUNSTACK(p, RUNSTACK, num_rands);      \
         RUNSTACK_CHANGED();                                       \
                                                                    \
         for (i = num_rands; i--; ) {                              \
           quick_rands[i] = rands[i];                              \
         }                                                         \
         rands = quick_rands;                                      \
       } else {                                                    \
         UPDATE_THREAD_RSPTR_FOR_GC();                             \
         make_tail_buffer_safe();                                  \
       }                                                           \
      }

      VACATE_TAIL_BUFFER_USE_RUNSTACK();

      UPDATE_THREAD_RSPTR();

      prim = (Scheme_Primitive_Proc *)obj;

      if (num_rands < prim->mina 
         || (num_rands > prim->mu.maxa && prim->mina >= 0)) {
       scheme_wrong_count_m(prim->name, prim->mina, prim->mu.maxa,
                          num_rands, rands,
                          prim->pp.flags & SCHEME_PRIM_IS_METHOD);
       return NULL; /* Shouldn't get here */
      }

      f = prim->prim_val;
      v = f(num_rands, rands, (Scheme_Object *)prim);

      DEBUG_CHECK_TYPE(v);
    } else if (type == scheme_closure_type) {
      Scheme_Closure_Data *data;
      GC_CAN_IGNORE Scheme_Object **stack, **src;
      int i, has_rest, num_params;
      
      DO_CHECK_FOR_BREAK(p, UPDATE_THREAD_RSPTR_FOR_GC(); if (rands == p->tail_buffer) make_tail_buffer_safe(););

      data = SCHEME_COMPILED_CLOS_CODE(obj);

      if ((RUNSTACK - RUNSTACK_START) < data->max_let_depth) {
        rands = evacuate_runstack(num_rands, rands, RUNSTACK);

       if (rands == p->tail_buffer) {
         UPDATE_THREAD_RSPTR_FOR_GC();
         make_tail_buffer_safe();
       }

       p->ku.k.p1 = (void *)obj;
       p->ku.k.i1 = num_rands;
       p->ku.k.p2 = (void *)rands;
       p->ku.k.i2 = -1;

       UPDATE_THREAD_RSPTR();
       MZ_CONT_MARK_POS -= 2;
       v = (Scheme_Object *)scheme_enlarge_runstack(data->max_let_depth, (void *(*)(void))do_eval_k);
       MZ_CONT_MARK_POS += 2;
       goto returnv;
      }

      num_params = data->num_params;
      has_rest = SCHEME_CLOSURE_DATA_FLAGS(data) & CLOS_HAS_REST;
      
      if (num_params) {
       if (has_rest) {
         int extra, n;

         if (num_rands < (num_params - 1)) {
           UPDATE_THREAD_RSPTR_FOR_ERROR();
           /* note: scheme_wrong_count_m handles rands == p->tail_buffer */
           scheme_wrong_count_m((const char *)obj, 
                             -1, -1,
                             num_rands, rands,
                             SCHEME_CLOSURE_DATA_FLAGS(data) & CLOS_IS_METHOD);
           return NULL; /* Doesn't get here */
         }

         n = num_params - has_rest;
         
         RUNSTACK = old_runstack - num_params;
         CHECK_RUNSTACK(p, RUNSTACK);
         RUNSTACK_CHANGED();

         extra = num_rands - n;
         if (extra) {
           Scheme_Object *rest_vals;
            GC_CAN_IGNORE Scheme_Object *pairs;

           /* This is a special case: GC may be triggered, but
              p->runstack does not point at everything that needs
              to be kept if args are lower on the stack. 
              That's what runstack_tmp_keep is for. Also, if
              runstack_tmp_keep == tail_buffer, then the buffer
              won't be zeroed. */
           UPDATE_THREAD_RSPTR_FOR_GC();
           p->runstack_tmp_keep = rands;

           rest_vals = scheme_null;
           for (i = num_rands - 1; i >= n; --i) {
             pairs = scheme_alloc_object();
             pairs->type = scheme_pair_type;
             SCHEME_CDR(pairs) = rest_vals;
             SCHEME_CAR(pairs) = rands[i];
             rest_vals = pairs;
           }

           p->runstack_tmp_keep = NULL;

           stack = RUNSTACK;
           stack[n] = rest_vals;
           while (n--) {
             stack[n] = rands[n];
           }
         } else {
           stack = RUNSTACK;
           /* Possibly, but not necessarily, rands > stack: */
           if ((unsigned long)rands > (unsigned long)stack) {
             int i;
             for (i = 0; i < n; i++) {
              stack[i] = rands[i];
             }
             stack[n] = scheme_null;
           } else {
             stack[n] = scheme_null;
             while (n--) {
              stack[n] = rands[n];
             }
           }
         }
       } else {
         if (num_rands != num_params) {
           UPDATE_THREAD_RSPTR_FOR_ERROR();
           /* note: scheme_wrong_count_m handles rands == p->tail_buffer */
           scheme_wrong_count_m((const char *)obj,
                             -1, -1,
                             num_rands, rands,
                             SCHEME_CLOSURE_DATA_FLAGS(data) & CLOS_IS_METHOD);
           return NULL; /* Doesn't get here */
         }
       
          stack = RUNSTACK = old_runstack - num_params;
          CHECK_RUNSTACK(p, RUNSTACK);
          RUNSTACK_CHANGED();
          
          if (rands != stack) {
            int n = num_params; 
            while (n--) {
              stack[n] = rands[n];
            }
          }
       }
      } else {
       if (num_rands) {
         if (has_rest) {
           /* 0 params and has_rest => (lambda args E) where args is not in E,
              so accept any number of arguments and ignore them. */
           
         } else {
           UPDATE_THREAD_RSPTR_FOR_ERROR();
           /* note: scheme_wrong_count handles rands == p->tail_buffer */
           scheme_wrong_count((const char *)obj, -1, -1, num_rands, rands);
           return NULL; /* Doesn't get here */
         }
       }
       RUNSTACK = old_runstack;
       RUNSTACK_CHANGED();
      }
      
      {
       int n = data->closure_size;
      
       if (n) {
         src = SCHEME_COMPILED_CLOS_ENV(obj);
         stack = PUSH_RUNSTACK(p, RUNSTACK, n);
         RUNSTACK_CHANGED();

         while (n--) {
           stack[n] = src[n];
         }
       }
      }

      obj = data->code;

      if (SCHEME_RPAIRP(obj)) {
        UPDATE_THREAD_RSPTR_FOR_GC();
        make_tail_buffer_safe();
        scheme_delay_load_closure(data);
        obj = data->code;
      }

      if (pmstack >= 0) {
        long segpos = ((long)pmstack) >> SCHEME_LOG_MARK_SEGMENT_SIZE;
        long pos = ((long)pmstack) & SCHEME_MARK_SEGMENT_MASK;
        GC_CAN_IGNORE Scheme_Cont_Mark *pm = NULL;

        pm = p->cont_mark_stack_segments[segpos] + pos;

       if (!pm->cache)
         pm->val = data->name; 
       else {
         /* Need to clear caches, so do it the slow way */
         UPDATE_THREAD_RSPTR_FOR_PROC_MARK();
         pmstack = scheme_set_cont_mark(scheme_stack_dump_key, data->name); 
       }
      } else { 
       /* Allocate a new mark record: */
       long segpos = ((long)MZ_CONT_MARK_STACK) >> SCHEME_LOG_MARK_SEGMENT_SIZE;
       if (segpos >= p->cont_mark_seg_count) {
         UPDATE_THREAD_RSPTR_FOR_PROC_MARK();
         pmstack = scheme_set_cont_mark(scheme_stack_dump_key, data->name); 
       } else {
         long pos = ((long)MZ_CONT_MARK_STACK) & SCHEME_MARK_SEGMENT_MASK;
          GC_CAN_IGNORE Scheme_Cont_Mark *pm;
         GC_CAN_IGNORE Scheme_Cont_Mark *seg;
       
          pmstack = MZ_CONT_MARK_STACK;

         seg = p->cont_mark_stack_segments[segpos];
         pm = seg + pos;
         MZ_CONT_MARK_STACK++;

         pm->key = scheme_stack_dump_key;
         pm->val = data->name;
         pm->pos = MZ_CONT_MARK_POS;
         pm->cache = NULL;
       }
      }

      goto eval_top;
    } else if (type == scheme_case_closure_type) {
      Scheme_Case_Lambda *seq;
      Scheme_Closure_Data *data;
      
      int i;
      
      seq = (Scheme_Case_Lambda *)obj;
      for (i = 0; i < seq->count; i++) {
       data = SCHEME_COMPILED_CLOS_CODE(seq->array[i]);
       if ((!(SCHEME_CLOSURE_DATA_FLAGS(data) & CLOS_HAS_REST) 
            && (data->num_params == num_rands))
           || ((SCHEME_CLOSURE_DATA_FLAGS(data) & CLOS_HAS_REST)
              && (data->num_params - 1 <= num_rands))) {
         obj = seq->array[i];
         goto apply_top;
       }
      }
      
      UPDATE_THREAD_RSPTR_FOR_ERROR();
      /* note: scheme_wrong_count handles rands == p->tail_buffer */
      scheme_wrong_count((char *)seq, -1, -1, num_rands, rands);

      return NULL; /* Doesn't get here. */
#ifdef MZ_USE_JIT
    } else if (type == scheme_native_closure_type) {
      GC_CAN_IGNORE Scheme_Native_Closure_Data *data;

      VACATE_TAIL_BUFFER_USE_RUNSTACK();

      UPDATE_THREAD_RSPTR();
      
      DO_CHECK_FOR_BREAK(p, );

      if (!scheme_native_arity_check(obj, num_rands)) {
       scheme_wrong_count_m((const char *)obj, -1, -1,
                          num_rands, rands, 0);
       return NULL;
      }

      data = ((Scheme_Native_Closure *)obj)->code;

      /* Enlarge the runstack? This max_let_depth is in bytes instead of words. */
      if ((unsigned long)data->max_let_depth > ((unsigned long)RUNSTACK - (unsigned long)RUNSTACK_START)) {
       p->ku.k.p1 = (void *)obj;
       p->ku.k.i1 = num_rands;
       p->ku.k.p2 = (void *)rands;
       p->ku.k.i2 = -1;

       MZ_CONT_MARK_POS -= 2;
       v = (Scheme_Object *)scheme_enlarge_runstack(data->max_let_depth / sizeof(void *), 
                                               (void *(*)(void))do_eval_k);
       MZ_CONT_MARK_POS += 2;
       goto returnv;
      }

      tmpv = obj;
      obj = NULL; /* save for space, since tmpv is ignored by the GC */
      v = data->code(tmpv, num_rands, rands);

      if (v == SCHEME_TAIL_CALL_WAITING) {
        /* [TC-SFS]; see schnapp.inc */
        if (rands == old_runstack) {
          int i;
          for (i = 0; i < num_rands; i++) { rands[i] = NULL; }
        }
      }

      DEBUG_CHECK_TYPE(v);
#endif
    } else if (type == scheme_cont_type) {
      UPDATE_THREAD_RSPTR();
      v = scheme_jump_to_continuation(obj, num_rands, rands, old_runstack);
    } else if (type == scheme_escaping_cont_type) {
      UPDATE_THREAD_RSPTR();
      scheme_escape_to_continuation(obj, num_rands, rands);
      return NULL;
    } else if (type == scheme_proc_struct_type) {
      int is_method;
      int check_rands = num_rands;

      do {
        VACATE_TAIL_BUFFER_USE_RUNSTACK();

        UPDATE_THREAD_RSPTR_FOR_ERROR(); /* in case */

        v = obj;
        obj = scheme_extract_struct_procedure(obj, check_rands, rands, &is_method);
        if (is_method) {
          /* Have to add an extra argument to the front of rands */
          if ((rands == RUNSTACK) && (RUNSTACK != RUNSTACK_START)){
            /* Common case: we can just push self onto the front: */
            rands = PUSH_RUNSTACK(p, RUNSTACK, 1);
            rands[0] = v;
          } else {
            int i;
            Scheme_Object **a;

            if (p->tail_buffer && (num_rands < p->tail_buffer_size)) {
              /* Use tail-call buffer. Shift in such a way that this works if
                 rands == p->tail_buffer */
              a = p->tail_buffer;
            } else {
              /* Uncommon general case --- allocate an array */
              UPDATE_THREAD_RSPTR_FOR_GC();
              a = MALLOC_N(Scheme_Object *, num_rands + 1);
            }

            for (i = num_rands; i--; ) {
              a[i + 1] = rands[i];
            }
            a[0] = v;
            rands = a;
          }
          num_rands++;
        }

        /* After we check arity once, no need to check again
           (which would lead to O(n^2) checking for nested
           struct procs): */
        check_rands = -1;

        DO_CHECK_FOR_BREAK(p, UPDATE_THREAD_RSPTR_FOR_GC(); if (rands == p->tail_buffer) make_tail_buffer_safe(););
      } while (SAME_TYPE(scheme_proc_struct_type, SCHEME_TYPE(obj)));

      goto apply_top;
    } else if (type == scheme_closed_prim_type) {
      GC_CAN_IGNORE Scheme_Closed_Primitive_Proc *prim;
      
      DO_CHECK_FOR_BREAK(p, UPDATE_THREAD_RSPTR_FOR_GC(); if (rands == p->tail_buffer) make_tail_buffer_safe(););

      VACATE_TAIL_BUFFER_USE_RUNSTACK();

      UPDATE_THREAD_RSPTR();

      prim = (Scheme_Closed_Primitive_Proc *)obj;
      
      if (num_rands < prim->mina 
         || (num_rands > prim->maxa && prim->maxa >= 0)) {
       scheme_wrong_count_m(prim->name, prim->mina, prim->maxa, 
                          num_rands, rands,
                          prim->pp.flags & SCHEME_PRIM_IS_METHOD);
       return NULL; /* Shouldn't get here */
      }
      
      v = prim->prim_val(prim->data, num_rands, rands);

      if (v == SCHEME_TAIL_CALL_WAITING) {
        /* [TC-SFS]; see schnapp.inc */
        if (rands == old_runstack) {
          int i;
          for (i = 0; i < num_rands; i++) { rands[i] = NULL; }
        }
      }

      DEBUG_CHECK_TYPE(v);
    } else {
      UPDATE_THREAD_RSPTR_FOR_ERROR();
      if (rands == p->tail_buffer)
       make_tail_buffer_safe();
      scheme_wrong_rator(obj, num_rands, rands);
      return NULL; /* Doesn't get here. */
    }
  } else {

  eval_top:

    if (SCHEME_INTP(obj)) {
      v = obj;
      goto returnv_never_multi;
    }

    type = _SCHEME_TYPE(obj);
    switch (type)
      {
      case scheme_toplevel_type:
       {
          /* Make sure that the GC can ignore tmp: */
#define global_lookup(prefix, _obj, tmp)                                \
          tmp = RUNSTACK[SCHEME_TOPLEVEL_DEPTH(_obj)];                  \
          tmp = ((Scheme_Object **)tmp)[SCHEME_TOPLEVEL_POS(_obj)];     \
         tmp = (Scheme_Object *)(SCHEME_VAR_BUCKET(tmp))->val;         \
         if (!tmp) {                                                   \
            UPDATE_THREAD_RSPTR_FOR_ERROR();                            \
            unbound_global(_obj);                                       \
            return NULL;                                                \
         }                                                             \
         prefix tmp

         global_lookup(v = , obj, v);  
         goto returnv_never_multi;
       }
      case scheme_local_type:
       {
         v = RUNSTACK[SCHEME_LOCAL_POS(obj)];
          EVAL_SFS_CLEAR(RUNSTACK, obj);
          goto returnv_never_multi;
       }
      case scheme_local_unbox_type:
       {
         v = SCHEME_ENVBOX_VAL(RUNSTACK[SCHEME_LOCAL_POS(obj)]);
          EVAL_SFS_CLEAR(RUNSTACK, obj);
          goto returnv_never_multi;
       }
      case scheme_syntax_type:
       {
         Scheme_Syntax_Executer f;

         UPDATE_THREAD_RSPTR();
         f = scheme_syntax_executers[SCHEME_PINT_VAL(obj)];
         v = f((Scheme_Object *)SCHEME_IPTR_VAL(obj));
         break;
       }
      case scheme_application_type:
       {
         Scheme_App_Rec *app;
         GC_MAYBE_IGNORE_INTERIOR Scheme_Object **randsp;
         Scheme_Object **stack;
         int k;
         int d_evals;
#ifdef MZ_XFORM
# define GET_FIRST_EVAL ((char *)app)[d_evals]
#else
         char *evals;         
         Scheme_Object **args;
# define GET_FIRST_EVAL evals[0]
#endif

         app = (Scheme_App_Rec *)obj;
         num_rands = app->num_args;
         
         d_evals = sizeof(Scheme_App_Rec) + (num_rands * sizeof(Scheme_Object *));
#ifndef MZ_XFORM
         evals = ((char *)obj) + d_evals;
#endif

         obj = app->args[0];
         
         stack = PUSH_RUNSTACK(p, RUNSTACK, num_rands);
         RUNSTACK_CHANGED();
         UPDATE_THREAD_RSPTR();
          SFS_CLEAR_RUNSTACK(RUNSTACK, k, num_rands);

         /* Inline local & global variable lookups for speed */
         switch (GET_FIRST_EVAL) {
         case SCHEME_EVAL_CONSTANT:
           break;
         case SCHEME_EVAL_GLOBAL:
           global_lookup(obj =, obj, tmpv);
           break;
         case SCHEME_EVAL_LOCAL:
            {
              tmpv = stack[SCHEME_LOCAL_POS(obj)];
              EVAL_SFS_CLEAR(stack, obj);
              obj = tmpv;
            }
           break;
         case SCHEME_EVAL_LOCAL_UNBOX:
            {
              tmpv = SCHEME_ENVBOX_VAL(stack[SCHEME_LOCAL_POS(obj)]);
              EVAL_SFS_CLEAR(stack, obj);
              obj = tmpv;
            }
           break;
         default:
           obj = _scheme_eval_linked_expr_wp(obj, p);
           break;
         }

         if (num_rands) {
#ifdef MZ_XFORM
           int evalpos = 1;
#endif

           rands = stack;
       
           /* Inline local & global variable lookups for speed */
#ifdef MZ_XFORM
# define GET_NEXT_EVAL ((char *)app)[d_evals + evalpos++]          
# define GET_NEXT_ARG app->args[evalpos]
#else
           evals++;
           args = app->args + 1;
# define GET_NEXT_EVAL *(evals++)
# define GET_NEXT_ARG *(args++)
#endif
           randsp = rands;
           for (k = num_rands; k--; ) {
             v = GET_NEXT_ARG;
             switch (GET_NEXT_EVAL) {
             case SCHEME_EVAL_CONSTANT:
              *(randsp++) = v;
              break;
             case SCHEME_EVAL_GLOBAL:
              global_lookup(*(randsp++) =, v, tmpv);
              break;
             case SCHEME_EVAL_LOCAL:
              *(randsp++) = stack[SCHEME_LOCAL_POS(v)];
                EVAL_SFS_CLEAR(stack, v);
              break;
             case SCHEME_EVAL_LOCAL_UNBOX:
              *(randsp++) = SCHEME_ENVBOX_VAL(stack[SCHEME_LOCAL_POS(v)]);
                EVAL_SFS_CLEAR(stack, v);
              break;
             default:
              {
                GC_CAN_IGNORE Scheme_Object *er;
                er = _scheme_eval_linked_expr_wp(v, p);
                *(randsp++) = er;
              }
              break;
             }

             DEBUG_CHECK_TYPE(randsp[-1]);
           }
         } else
           rands = &zero_rands_ptr;
      
         goto apply_top;
       }

      case scheme_application2_type:
       {
         Scheme_App2_Rec *app;
         GC_CAN_IGNORE Scheme_Object *arg;
         short flags;

         app = (Scheme_App2_Rec *)obj;
         
         obj = app->rator;
         flags = SCHEME_APPN_FLAGS(app);

         rands = PUSH_RUNSTACK(p, RUNSTACK, 1);
         RUNSTACK_CHANGED();
         UPDATE_THREAD_RSPTR();
          SFS_CLEAR_RUNSTACK_ONE(RUNSTACK, 0);
         
         /* Inline local & global variable lookups for speed */
         switch (flags & 0x7) {
         case SCHEME_EVAL_CONSTANT:
           break;
         case SCHEME_EVAL_GLOBAL:
            {
              global_lookup(obj =, obj, tmpv);
            }
           break;
         case SCHEME_EVAL_LOCAL:
            {
              tmpv = rands[SCHEME_LOCAL_POS(obj)];
              EVAL_SFS_CLEAR(rands, obj);
              obj = tmpv;
            }
           break;
         case SCHEME_EVAL_LOCAL_UNBOX:
            {
              tmpv = SCHEME_ENVBOX_VAL(rands[SCHEME_LOCAL_POS(obj)]);
              EVAL_SFS_CLEAR(rands, obj);
              obj = tmpv;
            }
           break;
         default:
           obj = _scheme_eval_linked_expr_wp(obj, p);
           break;
         }

         arg = app->rand;

         switch (flags >> 3) {
         case SCHEME_EVAL_CONSTANT:
           break;
         case SCHEME_EVAL_GLOBAL:
            {
              global_lookup(arg =, arg, tmpv);
            }
           break;
         case SCHEME_EVAL_LOCAL:
            {
              tmpv = rands[SCHEME_LOCAL_POS(arg)];
              EVAL_SFS_CLEAR(rands, arg);
              arg = tmpv;
            }
           break;
         case SCHEME_EVAL_LOCAL_UNBOX:
            {
              tmpv = SCHEME_ENVBOX_VAL(rands[SCHEME_LOCAL_POS(arg)]);
              EVAL_SFS_CLEAR(rands, arg);
              arg = tmpv;
            }
           break;
         default:
           arg = _scheme_eval_linked_expr_wp(arg, p);
           break;
         }

         rands[0] = arg;
         num_rands = 1;
      
         goto apply_top;
       }
       
      case scheme_application3_type:
       {
         Scheme_App3_Rec *app;
         GC_CAN_IGNORE Scheme_Object *arg;
         short flags;

         app = (Scheme_App3_Rec *)obj;
         
         obj = app->rator;
         flags = SCHEME_APPN_FLAGS(app);

         rands = PUSH_RUNSTACK(p, RUNSTACK, 2);
         RUNSTACK_CHANGED();
         UPDATE_THREAD_RSPTR();
          SFS_CLEAR_RUNSTACK_ONE(RUNSTACK, 0);
          SFS_CLEAR_RUNSTACK_ONE(RUNSTACK, 1);

         /* Inline local & global variable lookups for speed */
         switch (flags & 0x7) {
         case SCHEME_EVAL_CONSTANT:
           break;
         case SCHEME_EVAL_GLOBAL:
           global_lookup(obj =, obj, tmpv);
           break;
         case SCHEME_EVAL_LOCAL:
           tmpv = rands[SCHEME_LOCAL_POS(obj)];
            EVAL_SFS_CLEAR(rands, obj);
            obj = tmpv;
           break;
         case SCHEME_EVAL_LOCAL_UNBOX:
           tmpv = SCHEME_ENVBOX_VAL(rands[SCHEME_LOCAL_POS(obj)]);
            EVAL_SFS_CLEAR(rands, obj);
            obj = tmpv;
           break;
         default:
           obj = _scheme_eval_linked_expr_wp(obj, p);
           break;
         }

         arg = app->rand1;

         switch ((flags >> 3) & 0x7) {
         case SCHEME_EVAL_CONSTANT:
           break;
         case SCHEME_EVAL_GLOBAL:
           global_lookup(arg =, arg, tmpv);
           break;
         case SCHEME_EVAL_LOCAL:
           tmpv = rands[SCHEME_LOCAL_POS(arg)];
            EVAL_SFS_CLEAR(rands, arg);
            arg = tmpv;
           break;
         case SCHEME_EVAL_LOCAL_UNBOX:
           tmpv = SCHEME_ENVBOX_VAL(rands[SCHEME_LOCAL_POS(arg)]);
            EVAL_SFS_CLEAR(rands, arg);
            arg = tmpv;
           break;
         default:
           arg = _scheme_eval_linked_expr_wp(arg, p);
           break;
         }

         rands[0] = arg;

         arg = app->rand2;

         switch (SCHEME_APPN_FLAGS(app) >> 6) {
         case SCHEME_EVAL_CONSTANT:
           break;
         case SCHEME_EVAL_GLOBAL:
           global_lookup(arg =, arg, tmpv);
           break;
         case SCHEME_EVAL_LOCAL:
           tmpv = rands[SCHEME_LOCAL_POS(arg)];
            EVAL_SFS_CLEAR(rands, arg);
            arg = tmpv;
           break;
         case SCHEME_EVAL_LOCAL_UNBOX:
           tmpv = SCHEME_ENVBOX_VAL(rands[SCHEME_LOCAL_POS(arg)]);
            EVAL_SFS_CLEAR(rands, arg);
            arg = tmpv;
           break;
         default:
           arg = _scheme_eval_linked_expr_wp(arg, p);
           break;
         }

         rands[1] = arg;

         num_rands = 2;
      
         goto apply_top;
       }
      
      case scheme_sequence_type:
       {
         int cnt;
         int i;
         
         cnt = ((Scheme_Sequence *)obj)->count - 1;
         
         UPDATE_THREAD_RSPTR();
         for (i = 0; i < cnt; i++) {
           (void)_scheme_eval_linked_expr_multi_wp(((Scheme_Sequence *)obj)->array[i], p);
         }

         obj = ((Scheme_Sequence *)obj)->array[cnt];
         goto eval_top;
       }
      case scheme_branch_type:
       {
         UPDATE_THREAD_RSPTR();
         obj = (NOT_SAME_OBJ(_scheme_eval_linked_expr_wp(((Scheme_Branch_Rec *)obj)->test, p), 
                           scheme_false)
               ? ((Scheme_Branch_Rec *)obj)->tbranch 
               : ((Scheme_Branch_Rec *)obj)->fbranch);

         goto eval_top;
       }
      case scheme_unclosed_procedure_type:
       UPDATE_THREAD_RSPTR();
       v = scheme_make_closure(p, obj, 1);
       goto returnv_never_multi;

      case scheme_let_value_type:
       {
         GC_CAN_IGNORE Scheme_Let_Value *lv;
         GC_CAN_IGNORE Scheme_Object *value, **values;
         int i, c, ab;

         lv = (Scheme_Let_Value *)obj;

         c = lv->count;

         i = lv->position;
         ab = SCHEME_LET_AUTOBOX(lv);
         value = lv->value;
         obj = lv->body;

         UPDATE_THREAD_RSPTR();

         if (c == 1) {
           value = _scheme_eval_linked_expr_wp(value, p);
           if (ab)
             SCHEME_ENVBOX_VAL(RUNSTACK[i]) = value;
           else
             RUNSTACK[i] = value;
         } else {
           int c2;
           GC_CAN_IGNORE Scheme_Object **stack;

           value = _scheme_eval_linked_expr_multi_wp(value, p);
           c2 = (SAME_OBJ(value, SCHEME_MULTIPLE_VALUES) ? p->ku.multiple.count : 1);
           if (c2 != c) {
             scheme_wrong_return_arity(NULL, c, c2, 
                                   (c2 == 1) ? (Scheme_Object **)value : p->ku.multiple.array,
                                   "lexical binding");
             return NULL;
           }

           /* Precise GC: values++ is ok because we exit the block
              before any GC can happen. Also, GC would zero `values'
              if it turns out to be p->values_buffer. */

           values = p->ku.multiple.array;
           p->ku.multiple.array = NULL;
           stack = RUNSTACK;
           if (ab) {
             while (c--) {
              SCHEME_ENVBOX_VAL(stack[i]) = *values;
              values++;
              i++;
             }
           } else {
             while (c--) {
              stack[i] = *values;
              values++;
              i++;
             }
           }
         }

         goto eval_top;
       }

      case scheme_let_void_type:
       {
         GC_CAN_IGNORE Scheme_Let_Void *lv;
         int c;

         lv = (Scheme_Let_Void *)obj;
         c = lv->count;
         obj = lv->body;

         PUSH_RUNSTACK(p, RUNSTACK, c);
         RUNSTACK_CHANGED();

         if (SCHEME_LET_AUTOBOX(lv)) {
           Scheme_Object **stack = RUNSTACK;

           UPDATE_THREAD_RSPTR_FOR_GC();

           while (c--) {
             GC_CAN_IGNORE Scheme_Object *ub;
             ub = scheme_make_envunbox(scheme_undefined);
             stack[c] = ub;
           }
         }

         goto eval_top;
       }

      case scheme_letrec_type:
       {
         Scheme_Letrec *l = (Scheme_Letrec *)obj;
         Scheme_Object **a, **stack;
         int i;

         stack = RUNSTACK;
         a = l->procs;
         i = l->count;
         
         UPDATE_THREAD_RSPTR_FOR_GC();

         /* Create unfinished closures */
         while (i--) {
           Scheme_Object *uc;
           uc = scheme_make_closure(p, a[i], 0);
           stack[i] = uc;
         }

         /* Close them: */
         i = l->count;
         while (i--) {
           GC_CAN_IGNORE Scheme_Object *clos;
           GC_CAN_IGNORE Scheme_Object **dest;
           GC_CAN_IGNORE mzshort *map;
           GC_CAN_IGNORE Scheme_Closure_Data *data;
           int j;

           clos = stack[i];

#ifdef MZ_USE_JIT
           if (SAME_TYPE(_SCHEME_TYPE(clos), scheme_closure_type)) {
             dest = ((Scheme_Closure *)clos)->vals;
           } else {
             dest = ((Scheme_Native_Closure *)clos)->vals;
           }
#else
           dest = ((Scheme_Closure *)clos)->vals;
#endif
           
           data = (Scheme_Closure_Data *)a[i];
             
           map = data->closure_map;
           j = data->closure_size;

           /* Beware - dest points to the middle of a block */

           while (j--) {
             dest[j] = stack[map[j]];
           }
         }

         obj = l->body;
         goto eval_top;
       }

      case scheme_let_one_type:
       {
         /* Macro instead of var for efficient precise GC conversion */
# define lo ((Scheme_Let_One *)obj)

         PUSH_RUNSTACK(p, RUNSTACK, 1);
         RUNSTACK_CHANGED();

         switch (SCHEME_LET_EVAL_TYPE(lo)) {
         case SCHEME_EVAL_CONSTANT:
           RUNSTACK[0] = lo->value;
           break;
         case SCHEME_EVAL_GLOBAL:
           {
             global_lookup(RUNSTACK[0] =, lo->value, tmpv);
           }
           break;
         case SCHEME_EVAL_LOCAL:
           RUNSTACK[0] = RUNSTACK[SCHEME_LOCAL_POS(lo->value)];
            EVAL_SFS_CLEAR(RUNSTACK, lo->value);
           break;
         case SCHEME_EVAL_LOCAL_UNBOX:
           RUNSTACK[0] = SCHEME_ENVBOX_VAL(RUNSTACK[SCHEME_LOCAL_POS(lo->value)]);
            EVAL_SFS_CLEAR(RUNSTACK, lo->value);
           break;
         default:
           UPDATE_THREAD_RSPTR();
           {
             GC_CAN_IGNORE Scheme_Object *val;
              SFS_CLEAR_RUNSTACK_ONE(RUNSTACK, 0);
             val = _scheme_eval_linked_expr_wp(lo->value, p);
             RUNSTACK[0] = val;
           }
           break;
         }

         obj = lo->body;
#undef lo
         goto eval_top;
       }
      
      case scheme_with_cont_mark_type:
       {
         Scheme_With_Continuation_Mark *wcm = (Scheme_With_Continuation_Mark *)obj;
         Scheme_Object *key;
         GC_CAN_IGNORE Scheme_Object *val;
         
         UPDATE_THREAD_RSPTR();
         key = wcm->key;
         if (SCHEME_TYPE(key) < _scheme_values_types_)
           key = _scheme_eval_linked_expr_wp(key, p);
         val = wcm->val;
         if (SCHEME_TYPE(val) < _scheme_values_types_)
           val = _scheme_eval_linked_expr_wp(val, p);

         scheme_set_cont_mark(key, val);

         obj = wcm->body;

         goto eval_top;
       }

      case scheme_quote_syntax_type:
       {
         GC_CAN_IGNORE Scheme_Quote_Syntax *qs = (Scheme_Quote_Syntax *)obj;
         Scheme_Object **globs;
         int i, c, p;

         i = qs->position;
         c = qs->depth;
         p = qs->midpoint;

         globs = (Scheme_Object **)RUNSTACK[c];
         v = globs[i+p+1];
         if (!v) {
           v = globs[p];
           v = scheme_delayed_rename((Scheme_Object **)v, i);
           globs[i+p+1] = v;
         }

         goto returnv_never_multi;
       }
      
      default:
       v = obj;
       goto returnv_never_multi;
      }
  }

  if (SAME_OBJ(v, SCHEME_TAIL_CALL_WAITING)) {
    obj = p->ku.apply.tail_rator;
    num_rands = p->ku.apply.tail_num_rands;
    rands = p->ku.apply.tail_rands;
    p->ku.apply.tail_rator = NULL;
    p->ku.apply.tail_rands = NULL;
    RUNSTACK = old_runstack;
    RUNSTACK_CHANGED();
    goto apply_top;
  }

  if (SAME_OBJ(v, SCHEME_EVAL_WAITING)) {
    RESET_LOCAL_RUNSTACK();
    obj = p->ku.eval.wait_expr;
    p->ku.eval.wait_expr = NULL;
    goto eval_top;
  }

 returnv:

  if (SAME_OBJ(v, SCHEME_MULTIPLE_VALUES))
    if (get_value > 0) {
      scheme_wrong_return_arity(NULL, 1, p->ku.multiple.count, 
                            p->ku.multiple.array,
                            NULL);
      return NULL;
    }

 returnv_never_multi:

  MZ_RUNSTACK = old_runstack;
  MZ_CONT_MARK_STACK = old_cont_mark_stack;
  MZ_CONT_MARK_POS -= 2;

  DEBUG_CHECK_TYPE(v);

  return v;

#ifdef p
# undef p
#endif
}

Here is the call graph for this function:

Definition at line 205 of file salloc.c.

{
  int i, oldsize;
  void **naya;
  int *nayac;

  /* look for existing: */
  for (i = 0; i < dgc_size; i++) {
    if (dgc_array[i] == p) {
      dgc_count[i]++;
      return;
    }
  }

  /* look for empty slot: */
  for (i = 0; i < dgc_size; i++) {
    if (!dgc_array[i]) {
      dgc_array[i] = p;
      dgc_count[i] = 1;
      return;
    }
  }

  /* Make more room: */
  oldsize = dgc_size;
  if (!dgc_array) {
    REGISTER_SO(dgc_array);
    REGISTER_SO(dgc_count);
    dgc_size = 50;
  } else
    dgc_size *= 2;

  naya = MALLOC_N(void*, dgc_size);
  nayac = MALLOC_N(int, dgc_size);

  for (i = 0; i < oldsize; i++) {
    naya[i] = dgc_array[i];
    nayac[i] = dgc_count[i];
  }

  for (; i < dgc_size; i++) {
    naya[i] = NULL;
    nayac[i] = 0;
  }

  dgc_array = naya;
  dgc_count = nayac;

  dgc_array[oldsize] = p;
  dgc_count[oldsize] = 1;
}

Definition at line 1029 of file module.c.

{
  if (scheme_module_demand_hook) {
    Scheme_Object *r;
    r = scheme_module_demand_hook(argc, argv);
    if (r) return r;
  }

  return _dynamic_require(argc, argv, scheme_get_env(NULL), 0, 0, 0, 0, 1, -1);
}

Here is the call graph for this function:

MZ_EXTERN Scheme_Object* scheme_dynamic_wind ( void(*)(void *)  pre,
Scheme_Object *(*)(void *)  act,
void(*)(void *)  post,
Scheme_Object *(*)(void *)  jmp_handler,
void *volatile  data 
)

Definition at line 7609 of file fun.c.

{
  mz_jmp_buf newbuf;
  Scheme_Object * volatile v, ** volatile save_values;
  volatile int err;
  Scheme_Dynamic_Wind * volatile dw;
  volatile int save_count, old_cac;
  Scheme_Thread *p;
  int delta;

  p = scheme_current_thread;

  dw = MALLOC_ONE_RT(Scheme_Dynamic_Wind);
#ifdef MZTAG_REQUIRED
  dw->type = scheme_rt_dyn_wind;
#endif

  dw->data = data;
  dw->pre = pre;
  dw->post = post;
  dw->prev = p->dw;
  if (dw->prev)
    dw->depth = dw->prev->depth + 1;
  else
    dw->depth = 0;
  dw->next_meta = p->next_meta;

  if (pre) {
    ASSERT_SUSPEND_BREAK_ZERO();
    p->suspend_break++;
    pre(data);
    p = scheme_current_thread;
    --p->suspend_break;
  }

  p->next_meta = 0;
  p->dw = dw;
  
  dw->saveerr = scheme_current_thread->error_buf;
  scheme_current_thread->error_buf = &newbuf;

   scheme_save_env_stack_w_thread(dw->envss, p);

  if (scheme_setjmp(newbuf)) {
    p = scheme_current_thread;
    scheme_restore_env_stack_w_thread(dw->envss, p);
    if ((p->dw != dw)
        && (!p->dw || !dw->id || (p->dw->id != dw->id))) {
      /* A full continuation jump was interrupted by an
        escape continuation jump (in a dw pre or post thunk). Either
           1. this dw's post is already done for an interupted upward
              jump; or
           2. we never actually got this far for an interrupted
             downward jump.
        In either case, skip up until we get to the right level. */
      scheme_longjmp(*dw->saveerr, 1);
    } else {
      if (jmp_handler)
       v = jmp_handler(data);
      else
       v = NULL;
      err = !v;
    }
  } else {
    if (pre) {
      /* Need to check for a break, in case one was queued during
        pre: */
      scheme_check_break_now();
    }

    v = act(data);

    err = 0;
  }

  p = scheme_current_thread;
  if (SAME_OBJ(v, SCHEME_MULTIPLE_VALUES)) {
    save_count = p->ku.multiple.count;
    save_values = p->ku.multiple.array;
    p->ku.multiple.array = NULL;
    if (SAME_OBJ(save_values, p->values_buffer))
      p->values_buffer = NULL;
  } else {
    save_count = 0;
    save_values = NULL;
  }

  delta = p->dw->next_meta;
  p->dw = p->dw->prev; /* note: use p->dw, not dw, in case
                          continuation was composed */
  p->next_meta += delta;

  /* Don't run Scheme-based dyn-winds when we're killing a nested thread. */
  if (err && p->cjs.is_kill && (post == post_dyn_wind))
    post = NULL;

  old_cac = scheme_continuation_application_count;

  if (post) {
    p->error_buf = &newbuf;
    if (scheme_setjmp(newbuf)) {
      p = scheme_current_thread;
      scheme_restore_env_stack_w_thread(dw->envss, p);
      err = 1;
    } else {
      Scheme_Continuation_Jump_State cjs;
      p = scheme_current_thread;
      ASSERT_SUSPEND_BREAK_ZERO();
      p->suspend_break++;
      copy_cjs(&cjs, &p->cjs);
      reset_cjs(&p->cjs);
      post(data);
      copy_cjs(&p->cjs, &cjs);
      p = scheme_current_thread;
      --p->suspend_break;
    }
  }

  if (err) {
    /* If we're escaping to a prompt or escape continuation,
       check that it's still there. */
    if ((old_cac != scheme_continuation_application_count)
        && p->cjs.jumping_to_continuation) {
      p->error_buf = dw->saveerr;
      if (SAME_TYPE(SCHEME_TYPE(p->cjs.jumping_to_continuation), scheme_prompt_type)) {
        Scheme_Object *tag;
        Scheme_Prompt *prompt;
        tag = ((Scheme_Prompt *)p->cjs.jumping_to_continuation)->tag;
        prompt = (Scheme_Prompt *)scheme_extract_one_cc_mark(NULL, SCHEME_PTR_VAL(tag));
        if (!prompt && SAME_OBJ(scheme_default_prompt_tag, tag)) {
          prompt = original_default_prompt;
        }
        if (!prompt) {
          scheme_arg_mismatch("abort-current-continuation", 
                              "abort in progress, but current continuation includes"
                              " no prompt with the given tag"
                              " after a `dynamic-wind' post-thunk return: ",
                              tag);
          return NULL;
        }
        p->cjs.jumping_to_continuation = (Scheme_Object *)prompt;
      } else if (SCHEME_ECONTP(p->cjs.jumping_to_continuation)) {
        if (!scheme_escape_continuation_ok(p->cjs.jumping_to_continuation)) {
          scheme_raise_exn(MZEXN_FAIL_CONTRACT_CONTINUATION,
                           "jump to escape continuation in progress,"
                           " but the target is not in the current continuation"
                           " after a `dynamic-wind' post-thunk return");
          return NULL;
        }
      }
    }

    scheme_longjmp(*dw->saveerr, 1);
  }

  p->error_buf = dw->saveerr;

  if (post) {
    /* Need to check for a break, in case one was queued during post: */
    scheme_check_break_now();
  }

  if (v == SCHEME_MULTIPLE_VALUES) {
    p->ku.multiple.count = save_count;
    p->ku.multiple.array = save_values;
  }

  return v;
}

Here is the call graph for this function:

Definition at line 4423 of file thread.c.

Definition at line 4406 of file thread.c.

{
  --do_atomic;
}

Definition at line 4417 of file thread.c.

Definition at line 8584 of file port.c.

{
}

Definition at line 413 of file salloc.c.

{
#ifndef MZ_PRECISE_GC
  GC_end_stubborn_change(p);
#endif
}

Here is the call graph for this function:

Definition at line 2404 of file list.c.

{
  return ((Scheme_Ephemeron *)o)->key;
}

Definition at line 2399 of file list.c.

{
  return ((Scheme_Ephemeron *)o)->val;
}

Definition at line 162 of file bool.c.

{
  return SAME_OBJ(obj1, obj2);
}

Definition at line 403 of file hash.c.

{
  if (!table->vals)
    return NULL;
  else
    return do_hash_get(table, key);
}

Here is the call graph for this function:

Definition at line 242 of file bool.c.

{
  Equal_Info eql;

  eql.depth = 1;
  eql.car_depth = 1;
  eql.ht = NULL;
  eql.recur = NULL;
  eql.next_next = NULL;
  eql.next = NULL;

  return is_equal(obj1, obj2, &eql);
}

Here is the call graph for this function:

Definition at line 1292 of file hash.c.

{
  Hash_Info hi;

  hi.depth = 1;
  hi.recur = NULL;

  return equal_hash_key(o, 0, &hi);
}

Here is the call graph for this function:

Definition at line 1302 of file hash.c.

{
  Hash_Info hi;

  hi.depth = 1;
  hi.recur = NULL;

  return equal_hash_key2(o, &hi);
}

Here is the call graph for this function:

Definition at line 203 of file bool.c.

{
  Scheme_Type t1, t2;

  if (SAME_OBJ(obj1, obj2))
    return 1;

  t1 = SCHEME_TYPE(obj1);
  t2 = SCHEME_TYPE(obj2);

  if (NOT_SAME_TYPE(t1, t2)) {
#ifdef MZ_USE_SINGLE_FLOATS
    /* If one is a float and the other is a double, coerce to double */
    if ((t1 == scheme_float_type) && (t2 == scheme_double_type))
      return double_eqv(SCHEME_FLT_VAL(obj1), SCHEME_DBL_VAL(obj2));
    else if ((t2 == scheme_float_type) && (t1 == scheme_double_type))
      return double_eqv(SCHEME_DBL_VAL(obj1), SCHEME_FLT_VAL(obj2));
#endif
    return 0;
#ifdef MZ_USE_SINGLE_FLOATS
  } else if (t1 == scheme_float_type) {
    return double_eqv(SCHEME_FLT_VAL(obj1), SCHEME_FLT_VAL(obj2));
#endif
  } else if (t1 == scheme_double_type) {
    return double_eqv(SCHEME_DBL_VAL(obj1), SCHEME_DBL_VAL(obj2));
  } else if (t1 == scheme_bignum_type)
    return scheme_bignum_eq(obj1, obj2);
  else if (t1 == scheme_rational_type)
    return scheme_rational_eq(obj1, obj2);
  else if (t1 == scheme_complex_type) {
    Scheme_Complex *c1 = (Scheme_Complex *)obj1;
    Scheme_Complex *c2 = (Scheme_Complex *)obj2;
    return scheme_eqv(c1->r, c2->r) && scheme_eqv(c1->i, c2->i);
  } else if (t1 == scheme_char_type)
    return SCHEME_CHAR_VAL(obj1) == SCHEME_CHAR_VAL(obj2);
  else
    return 0;
}

Here is the call graph for this function:

Definition at line 1312 of file hash.c.

{
  if (!SCHEME_INTP(o) && (SCHEME_NUMBERP(o) || SCHEME_CHARP(o)))
    return scheme_equal_hash_key(o);
  else
    return (PTR_TO_LONG(o) >> 2);
}

Definition at line 1320 of file hash.c.

{
  if (!SCHEME_INTP(o) && (SCHEME_NUMBERP(o) || SCHEME_CHARP(o)))
    return scheme_equal_hash_key2(o);
  else
    return (PTR_TO_LONG(o) >> 3);
}

Definition at line 8837 of file eval.c.

{
  return scheme_eval_compiled(scheme_compile_for_eval(obj, env), env);
}

Here is the call graph for this function:

Definition at line 8978 of file eval.c.

{
  return _eval(obj, env, 0, 0, 1, 0);
}

Here is the call graph for this function:

Definition at line 8983 of file eval.c.

{
  return _eval(obj, env, 0, 1, 1, 0);
}

Here is the call graph for this function:

Definition at line 60 of file builtin.c.

MZ_EXTERN Scheme_Object* scheme_eval_compiled_sized_string_with_magic ( const char *  str,
int  len,
Scheme_Env env,
Scheme_Object magic_symbol,
Scheme_Object magic_val,
int  multi_ok 
)

Definition at line 36 of file builtin.c.

{
  Scheme_Object *port, *expr;
  Scheme_Config *config;

  config = scheme_current_config();

  port = scheme_make_sized_byte_string_input_port(str, -len); /* negative means it's constant */

  if (!env)
    env = scheme_get_env(NULL);
    
  expr = scheme_internal_read(port, NULL, 1, 1, 0, 0, 0, -1, NULL, 
                              magic_sym, magic_val,
                              NULL);

  if (multi_ok)
    return _scheme_eval_compiled_multi(expr, env);
  else
    return _scheme_eval_compiled(expr, env);
}

Here is the call graph for this function:

Definition at line 9057 of file eval.c.

{
  /* If modidx, then last element is a module index; shift the rest. */
  if (modidx) {
    int i, len = SCHEME_VEC_SIZE(expr);
    Scheme_Object *orig = SCHEME_VEC_ELS(expr)[len - 1], *s, *result;

    orig = SCHEME_STX_VAL(orig);
    result = scheme_make_vector(len - 1, NULL);

    for (i = 0; i < len - 1; i++) {
      s = scheme_stx_phase_shift(SCHEME_VEC_ELS(expr)[i], shift, orig, modidx, env->export_registry);
      SCHEME_VEC_ELS(result)[i] = s;
    }
    
    return result;
  } else
    return expr;
}

Here is the call graph for this function:

Definition at line 9931 of file eval.c.

{
  return do_eval_string_all(str, env, -2, 0);
}

Here is the call graph for this function:

Definition at line 8842 of file eval.c.

Here is the call graph for this function:

Definition at line 8867 of file eval.c.

Here is the call graph for this function:

Definition at line 9926 of file eval.c.

{
  return do_eval_string_all(str, env, -1, 0);
}

Here is the call graph for this function:

MZ_EXTERN Scheme_Object* scheme_eval_string_all ( const char *  str,
Scheme_Env env,
int  all 
)

Definition at line 9921 of file eval.c.

{
  return do_eval_string_all(str, env, cont, 0);
}

Here is the call graph for this function:

Definition at line 9941 of file eval.c.

{
  return do_eval_string_all(str, env, cont, 1);
}

Here is the call graph for this function:

Definition at line 9936 of file eval.c.

{
  return do_eval_string_all(str, env, 0, 0);
}

Here is the call graph for this function:

Definition at line 9951 of file eval.c.

{
  return do_eval_string_all(str, env, 0, 1);
}

Here is the call graph for this function:

Definition at line 9946 of file eval.c.

{
  return do_eval_string_all(str, env, -1, 1);
}

Here is the call graph for this function:

Definition at line 8853 of file eval.c.

Here is the call graph for this function:

Definition at line 9212 of file eval.c.

{
  return _expand(obj, scheme_new_expand_env(env, NULL, SCHEME_TOPLEVEL_FRAME), 
               -1, 1, 0, scheme_true, -1, NULL, 0);
}

Here is the call graph for this function:

MZ_EXTERN char* scheme_expand_filename ( char *  filename,
int  ilen,
const char *  errorin,
int ex,
int  guards 
)

Definition at line 1964 of file file.c.

{
  return do_expand_filename(NULL, filename, ilen, errorin, expanded, 1, 1, guards, SCHEME_PLATFORM_PATH_KIND, 0);
}

Here is the call graph for this function:

MZ_EXTERN char* scheme_expand_string_filename ( Scheme_Object f,
const char *  errorin,
int ex,
int  guards 
)

Definition at line 1974 of file file.c.

{
  return do_expand_filename(o, NULL, 0, errorin, expanded, 1, 1, guards, SCHEME_PLATFORM_PATH_KIND, 0);
}

Here is the call graph for this function:

MZ_EXTERN char* scheme_expand_user_filename ( char *  filename,
int  ilen,
const char *  errorin,
int ex,
int  guards 
)

Definition at line 1969 of file file.c.

{
  return do_expand_filename(NULL, filename, ilen, errorin, expanded, 1, 1, guards, SCHEME_PLATFORM_PATH_KIND, 1);
}

Here is the call graph for this function:

Definition at line 6144 of file thread.c.

{
  return do_extend_config(c, scheme_make_integer(pos), init_val);
}

Here is the call graph for this function:

Definition at line 7388 of file fun.c.

{
  return scheme_extract_one_cc_mark_with_meta(mark_set, key, NULL, NULL, NULL);
}

Here is the call graph for this function:

Definition at line 7394 of file fun.c.

{
  return scheme_extract_one_cc_mark_with_meta(mark_set, key, prompt_tag, NULL, NULL);
}

Here is the call graph for this function:

MZ_EXTERN void scheme_fdclr ( void fd,
int  pos 
)

Definition at line 824 of file port.c.

{
#if defined(WIN32_FD_HANDLES)
  win_extended_fd_set *efd = (win_extended_fd_set *)fd;
  int i;
  for (i = SCHEME_INT_VAL(efd->added); i--; ) {
    if (efd->sockets[i] == n)
      efd->sockets[i] = INVALID_SOCKET;
  }
#else
# if defined(FILES_HAVE_FDS) || defined(USE_SOCKETS_TCP)
  FD_CLR((unsigned)n, ((fd_set *)fd));
# endif
#endif
}
MZ_EXTERN int scheme_fdisset ( void fd,
int  pos 
)

Definition at line 869 of file port.c.

{
#if defined(WIN32_FD_HANDLES)
  win_extended_fd_set *efd = (win_extended_fd_set *)fd;
  int i;
  for (i = SCHEME_INT_VAL(efd->added); i--; ) {
    if (efd->sockets[i] == n)
      return 1;
  }
  return 0;
#else
# if defined(FILES_HAVE_FDS) || defined(USE_SOCKETS_TCP)
  return FD_ISSET(n, ((fd_set *)fd));
# else
  return 0;
# endif
#endif
}
MZ_EXTERN void scheme_fdset ( void fd,
int  pos 
)

Definition at line 840 of file port.c.

{
#if defined(WIN32_FD_HANDLES)
  win_extended_fd_set *efd = (win_extended_fd_set *)fd;
  if (SCHEME_INT_VAL(efd->added) >= SCHEME_INT_VAL(efd->alloc)) {
    SOCKET *naya;
    int na;
    na = (SCHEME_INT_VAL(efd->alloc) * 2) + 10;
    naya = (SOCKET *)scheme_malloc_atomic(na * sizeof(SOCKET));
    memcpy(naya, efd->sockets, SCHEME_INT_VAL(efd->alloc) * sizeof(SOCKET));
    efd->sockets = naya;
    efd->alloc = scheme_make_integer(na);
    reset_wait_array(efd);
  }
  efd->sockets[SCHEME_INT_VAL(efd->added)] = n;
  efd->added = scheme_make_integer(1 + SCHEME_INT_VAL(efd->added));
#else
# if defined(FILES_HAVE_FDS) || defined(USE_SOCKETS_TCP)
#  ifdef STORED_ACTUAL_FDSET_LIMIT
  int mx;
  mx = FDSET_LIMIT(fd);
  if (n > mx)
    FDSET_LIMIT(fd) = n;
#  endif
  FD_SET(n, ((fd_set *)fd));
# endif
#endif
}

Definition at line 811 of file port.c.

{
#if defined(WIN32_FD_HANDLES)
  scheme_init_fdset_array(fd, 1);
#else
# if defined(FILES_HAVE_FDS) || defined(USE_SOCKETS_TCP)
  FD_ZERO((fd_set *)fd);
# endif
#endif
}
MZ_EXTERN int scheme_file_exists ( char *  filename)

Definition at line 2137 of file file.c.

{
# ifdef NO_STAT_PROC
  FILE *fp;

  fp = fopen(filename, "r");
  if (fp) {
    fclose(fp);
    return 1;
  } else
    return 0;
# else
#  ifdef DOS_FILE_SYSTEM
  /* Claim that all special files exist: */
  if (scheme_is_special_filename(filename, 0))
    return 1;

  {
    int isdir;
    return (UNC_stat(filename, strlen(filename), NULL, &isdir, NULL, NULL)
           && !isdir);
  }
#  else
  struct MSC_IZE(stat) buf;
  int ok;

  do {
    ok = MSC_W_IZE(stat)(MSC_WIDE_PATH(filename), &buf);
  } while ((ok == -1) && (errno == EINTR));

  return !ok && !S_ISDIR(buf.st_mode);
#  endif
# endif
}

Definition at line 4311 of file module.c.

{
  Scheme_Module *m = env->module;
  Scheme_Bucket_Table *ht;
  Scheme_Bucket **bs;
  Scheme_Object **exs;
  int i, count;

  /* Provide all variables: */
  count = 0;
  ht = env->toplevel;

  bs = ht->buckets;
  for (i = ht->size; i--; ) {
    Scheme_Bucket *b = bs[i];
    if (b && b->val)
      count++;
  }

  exs = MALLOC_N(Scheme_Object *, count);
  count = 0;
  for (i = ht->size; i--; ) {
    Scheme_Bucket *b = bs[i];
    if (b && b->val)
      exs[count++] = (Scheme_Object *)b->key;
  }
 
  m->me->rt->provides = exs;
  m->me->rt->provide_srcs = NULL;
  m->me->rt->provide_src_names = exs;
  m->me->rt->num_provides = count;
  m->me->rt->num_var_provides = count;

  qsort_provides(exs, NULL, NULL, NULL, NULL, NULL, NULL, 0, count, 1);

  env->running = 1;
}

Here is the call graph for this function: