static SCHEME_OBJECT find_signal_code_name (int signo, SIGINFO_T info, SIGCONTEXT_T * scp) { unsigned long code = 0; const char * name = 0; if (SIGINFO_VALID_P (info)) { code = (SIGINFO_CODE (info)); SPECIAL_SIGNAL_CODE_NAMES (); if (name == 0) { struct ux_sig_code_desc * entry = (& (ux_signal_codes[0])); while ((entry -> signo) != 0) if ((((entry -> signo) < 0) || ((entry -> signo) == signo)) && (((entry -> code_mask) & code) == (entry -> code_value))) { name = (entry -> name); break; } else entry += 1; } } return (cons ((ulong_to_integer (code)), ((name == 0) ? SHARP_F : (char_pointer_to_string (name))))); }
static SCHEME_OBJECT store_context (MHASH context, hashid id) { if (context == MHASH_FAILED) return (SHARP_F); { size_t i = (allocate_context_entry ()); ((context_table[i]) . context) = context; ((context_table[i]) . id) = id; return (ulong_to_integer (i)); } }
#include "syscall.h" #include "ntproc.h" #include "ostty.h" extern HANDLE master_tty_window; extern Tchannel arg_to_channel (SCHEME_OBJECT, int); static Tchannel * object_to_channel_vector (SCHEME_OBJECT, int, unsigned long *, long *); static long wait_for_multiple_objects (unsigned long, Tchannel *, long, int); static long wait_for_multiple_objects_1 (unsigned long, Tchannel *, long, int); DEFINE_PRIMITIVE ("CHANNEL-DESCRIPTOR", Prim_channel_descriptor, 1, 1, 0) { PRIMITIVE_HEADER (1); PRIMITIVE_RETURN (ulong_to_integer (arg_channel (1))); } DEFINE_PRIMITIVE ("WIN32-GUI-TRACE", Prim_win32_gui_trace, 2, 2, 0) { PRIMITIVE_HEADER (2); { win32_trace_level = (arg_ulong_integer (1)); if (win32_trace_file != 0) { fflush (win32_trace_file); fclose (win32_trace_file); win32_trace_file = 0; } if (win32_trace_level > 0) win32_trace_file