home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mitsch75.zip / scheme-7_5_17-src.zip / scheme-7.5.17 / src / microcode / os2api.h < prev    next >
Text File  |  1999-04-07  |  27KB  |  978 lines

  1. /* -*-C-*-
  2.  
  3. $Id: os2api.h,v 1.12 1999/04/07 04:01:45 cph Exp $
  4.  
  5. Copyright (c) 1994-1999 Massachusetts Institute of Technology
  6.  
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or (at
  10. your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful, but
  13. WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15. General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21.  
  22. /* This flag, defined by "syscall.h", means to define the syscall
  23.    enums normally defined by that file.  */
  24. #ifdef DEFINE_OS2_SYSCALLS
  25.  
  26. enum syscall_names
  27. {
  28.   syscall_dos_alloc_mem,
  29.   syscall_dos_alloc_shared_mem,
  30.   syscall_dos_async_timer,
  31.   syscall_dos_close,
  32.   syscall_dos_close_event_sem,
  33.   syscall_dos_close_mutex_sem,
  34.   syscall_dos_close_queue,
  35.   syscall_dos_copy,
  36.   syscall_dos_create_dir,
  37.   syscall_dos_create_event_sem,
  38.   syscall_dos_create_mutex_sem,
  39.   syscall_dos_create_pipe,
  40.   syscall_dos_create_queue,
  41.   syscall_dos_create_thread,
  42.   syscall_dos_delete,
  43.   syscall_dos_delete_dir,
  44.   syscall_dos_dup_handle,
  45.   syscall_dos_exec_pgm,
  46.   syscall_dos_exit,
  47.   syscall_dos_find_close,
  48.   syscall_dos_find_first,
  49.   syscall_dos_find_next,
  50.   syscall_dos_free_mem,
  51.   syscall_dos_get_info_blocks,
  52.   syscall_dos_get_message,
  53.   syscall_dos_get_named_shared_mem,
  54.   syscall_dos_get_shared_mem,
  55.   syscall_dos_give_shared_mem,
  56.   syscall_dos_kill_process,
  57.   syscall_dos_kill_thread,
  58.   syscall_dos_move,
  59.   syscall_dos_open,
  60.   syscall_dos_post_event_sem,
  61.   syscall_dos_query_current_dir,
  62.   syscall_dos_query_current_disk,
  63.   syscall_dos_query_fh_state,
  64.   syscall_dos_query_file_info,
  65.   syscall_dos_query_fs_attach,
  66.   syscall_dos_query_fs_info,
  67.   syscall_dos_query_h_type,
  68.   syscall_dos_query_mem,
  69.   syscall_dos_query_n_p_h_state,
  70.   syscall_dos_query_path_info,
  71.   syscall_dos_query_sys_info,
  72.   syscall_dos_read,
  73.   syscall_dos_read_queue,
  74.   syscall_dos_release_mutex_sem,
  75.   syscall_dos_request_mutex_sem,
  76.   syscall_dos_reset_event_sem,
  77.   syscall_dos_scan_env,
  78.   syscall_dos_send_signal_exception,
  79.   syscall_dos_set_current_dir,
  80.   syscall_dos_set_default_disk,
  81.   syscall_dos_set_fh_state,
  82.   syscall_dos_set_file_ptr,
  83.   syscall_dos_set_file_size,
  84.   syscall_dos_set_max_fh,
  85.   syscall_dos_set_mem,
  86.   syscall_dos_set_path_info,
  87.   syscall_dos_set_rel_max_fh,
  88.   syscall_dos_start_timer,
  89.   syscall_dos_stop_timer,
  90.   syscall_dos_wait_child,
  91.   syscall_dos_wait_event_sem,
  92.   syscall_dos_write,
  93.   syscall_dos_write_queue,
  94.   syscall_beginthread,
  95.   syscall_gmtime,
  96.   syscall_kbd_char_in,
  97.   syscall_localtime,
  98.   syscall_malloc,
  99.   syscall_mktime,
  100.   syscall_realloc,
  101.   syscall_time,
  102.   syscall_vio_wrt_tty,
  103.  
  104.   /* Socket calls: */
  105.   syscall_accept,
  106.   syscall_bind,
  107.   syscall_connect,
  108.   syscall_gethostbyname,
  109.   syscall_gethostname,
  110.   syscall_listen,
  111.   syscall_recv,
  112.   syscall_send,
  113.   syscall_socket,
  114.   syscall_soclose
  115. };
  116.  
  117. /* Machine-generated table, do not edit: */
  118. enum syserr_names
  119. {
  120.   syserr_invalid_function,
  121.   syserr_file_not_found,
  122.   syserr_path_not_found,
  123.   syserr_too_many_open_files,
  124.   syserr_access_denied,
  125.   syserr_invalid_handle,
  126.   syserr_arena_trashed,
  127.   syserr_not_enough_memory,
  128.   syserr_invalid_block,
  129.   syserr_bad_environment,
  130.   syserr_bad_format,
  131.   syserr_invalid_access,
  132.   syserr_invalid_data,
  133.   syserr_invalid_drive,
  134.   syserr_current_directory,
  135.   syserr_not_same_device,
  136.   syserr_no_more_files,
  137.   syserr_write_protect,
  138.   syserr_bad_unit,
  139.   syserr_not_ready,
  140.   syserr_bad_command,
  141.   syserr_crc,
  142.   syserr_bad_length,
  143.   syserr_seek,
  144.   syserr_not_dos_disk,
  145.   syserr_sector_not_found,
  146.   syserr_out_of_paper,
  147.   syserr_write_fault,
  148.   syserr_read_fault,
  149.   syserr_gen_failure,
  150.   syserr_sharing_violation,
  151.   syserr_lock_violation,
  152.   syserr_wrong_disk,
  153.   syserr_fcb_unavailable,
  154.   syserr_sharing_buffer_exceeded,
  155.   syserr_code_page_mismatched,
  156.   syserr_handle_eof,
  157.   syserr_handle_disk_full,
  158.   syserr_not_supported,
  159.   syserr_rem_not_list,
  160.   syserr_dup_name,
  161.   syserr_bad_netpath,
  162.   syserr_network_busy,
  163.   syserr_dev_not_exist,
  164.   syserr_too_many_cmds,
  165.   syserr_adap_hdw_err,
  166.   syserr_bad_net_resp,
  167.   syserr_unexp_net_err,
  168.   syserr_bad_rem_adap,
  169.   syserr_printq_full,
  170.   syserr_no_spool_space,
  171.   syserr_print_cancelled,
  172.   syserr_netname_deleted,
  173.   syserr_network_access_denied,
  174.   syserr_bad_dev_type,
  175.   syserr_bad_net_name,
  176.   syserr_too_many_names,
  177.   syserr_too_many_sess,
  178.   syserr_sharing_paused,
  179.   syserr_req_not_accep,
  180.   syserr_redir_paused,
  181.   syserr_sbcs_att_write_prot,
  182.   syserr_sbcs_general_failure,
  183.   syserr_xga_out_memory,
  184.   syserr_file_exists,
  185.   syserr_dup_fcb,
  186.   syserr_cannot_make,
  187.   syserr_fail_i24,
  188.   syserr_out_of_structures,
  189.   syserr_already_assigned,
  190.   syserr_invalid_password,
  191.   syserr_invalid_parameter,
  192.   syserr_net_write_fault,
  193.   syserr_no_proc_slots,
  194.   syserr_not_frozen,
  195.   syserr_tstovfl,
  196.   syserr_tstdup,
  197.   syserr_no_items,
  198.   syserr_interrupt,
  199.   syserr_device_in_use,
  200.   syserr_too_many_semaphores,
  201.   syserr_excl_sem_already_owned,
  202.   syserr_sem_is_set,
  203.   syserr_too_many_sem_requests,
  204.   syserr_invalid_at_interrupt_time,
  205.   syserr_sem_owner_died,
  206.   syserr_sem_user_limit,
  207.   syserr_disk_change,
  208.   syserr_drive_locked,
  209.   syserr_broken_pipe,
  210.   syserr_open_failed,
  211.   syserr_buffer_overflow,
  212.   syserr_disk_full,
  213.   syserr_no_more_search_handles,
  214.   syserr_invalid_target_handle,
  215.   syserr_protection_violation,
  216.   syserr_viokbd_request,
  217.   syserr_invalid_category,
  218.   syserr_invalid_verify_switch,
  219.   syserr_bad_driver_level,
  220.   syserr_call_not_implemented,
  221.   syserr_sem_timeout,
  222.   syserr_insufficient_buffer,
  223.   syserr_invalid_name,
  224.   syserr_invalid_level,
  225.   syserr_no_volume_label,
  226.   syserr_mod_not_found,
  227.   syserr_proc_not_found,
  228.   syserr_wait_no_children,
  229.   syserr_child_not_complete,
  230.   syserr_direct_access_handle,
  231.   syserr_negative_seek,
  232.   syserr_seek_on_device,
  233.   syserr_is_join_target,
  234.   syserr_is_joined,
  235.   syserr_is_substed,
  236.   syserr_not_joined,
  237.   syserr_not_substed,
  238.   syserr_join_to_join,
  239.   syserr_subst_to_subst,
  240.   syserr_join_to_subst,
  241.   syserr_subst_to_join,
  242.   syserr_busy_drive,
  243.   syserr_same_drive,
  244.   syserr_dir_not_root,
  245.   syserr_dir_not_empty,
  246.   syserr_is_subst_path,
  247.   syserr_is_join_path,
  248.   syserr_path_busy,
  249.   syserr_is_subst_target,
  250.   syserr_system_trace,
  251.   syserr_invalid_event_count,
  252.   syserr_too_many_muxwaiters,
  253.   syserr_invalid_list_format,
  254.   syserr_label_too_long,
  255.   syserr_too_many_tcbs,
  256.   syserr_signal_refused,
  257.   syserr_discarded,
  258.   syserr_not_locked,
  259.   syserr_bad_threadid_addr,
  260.   syserr_bad_arguments,
  261.   syserr_bad_pathname,
  262.   syserr_signal_pending,
  263.   syserr_uncertain_media,
  264.   syserr_max_thrds_reached,
  265.   syserr_monitors_not_supported,
  266.   syserr_unc_driver_not_installed,
  267.   syserr_lock_failed,
  268.   syserr_swapio_failed,
  269.   syserr_swapin_failed,
  270.   syserr_busy,
  271.   syserr_cancel_violation,
  272.   syserr_atomic_lock_not_supported,
  273.   syserr_read_locks_not_supported,
  274.   syserr_invalid_segment_number,
  275.   syserr_invalid_callgate,
  276.   syserr_invalid_ordinal,
  277.   syserr_already_exists,
  278.   syserr_no_child_process,
  279.   syserr_child_alive_nowait,
  280.   syserr_invalid_flag_number,
  281.   syserr_sem_not_found,
  282.   syserr_invalid_starting_codeseg,
  283.   syserr_invalid_stackseg,
  284.   syserr_invalid_moduletype,
  285.   syserr_invalid_exe_signature,
  286.   syserr_exe_marked_invalid,
  287.   syserr_bad_exe_format,
  288.   syserr_iterated_data_exceeds_64k,
  289.   syserr_invalid_minallocsize,
  290.   syserr_dynlink_from_invalid_ring,
  291.   syserr_iopl_not_enabled,
  292.   syserr_invalid_segdpl,
  293.   syserr_autodataseg_exceeds_64k,
  294.   syserr_ring2seg_must_be_movable,
  295.   syserr_reloc_chain_xeeds_seglim,
  296.   syserr_infloop_in_reloc_chain,
  297.   syserr_envvar_not_found,
  298.   syserr_not_current_ctry,
  299.   syserr_no_signal_sent,
  300.   syserr_filename_exced_range,
  301.   syserr_ring2_stack_in_use,
  302.   syserr_meta_expansion_too_long,
  303.   syserr_invalid_signal_number,
  304.   syserr_thread_1_inactive,
  305.   syserr_info_not_avail,
  306.   syserr_locked,
  307.   syserr_bad_dynalink,
  308.   syserr_too_many_modules,
  309.   syserr_nesting_not_allowed,
  310.   syserr_cannot_shrink,
  311.   syserr_zombie_process,
  312.   syserr_stack_in_high_memory,
  313.   syserr_invalid_exitroutine_ring,
  314.   syserr_getbuf_failed,
  315.   syserr_flushbuf_failed,
  316.   syserr_transfer_too_long,
  317.   syserr_forcenoswap_failed,
  318.   syserr_smg_no_target_window,
  319.   syserr_no_children,
  320.   syserr_invalid_screen_group,
  321.   syserr_bad_pipe,
  322.   syserr_pipe_busy,
  323.   syserr_no_data,
  324.   syserr_pipe_not_connected,
  325.   syserr_more_data,
  326.   syserr_vc_disconnected,
  327.   syserr_circularity_requested,
  328.   syserr_directory_in_cds,
  329.   syserr_invalid_fsd_name,
  330.   syserr_invalid_path,
  331.   syserr_invalid_ea_name,
  332.   syserr_ea_list_inconsistent,
  333.   syserr_ea_list_too_long,
  334.   syserr_no_meta_match,
  335.   syserr_findnotify_timeout,
  336.   syserr_no_more_items,
  337.   syserr_search_struc_reused,
  338.   syserr_char_not_found,
  339.   syserr_too_much_stack,
  340.   syserr_invalid_attr,
  341.   syserr_invalid_starting_ring,
  342.   syserr_invalid_dll_init_ring,
  343.   syserr_cannot_copy,
  344.   syserr_directory,
  345.   syserr_oplocked_file,
  346.   syserr_oplock_thread_exists,
  347.   syserr_volume_changed,
  348.   syserr_findnotify_handle_in_use,
  349.   syserr_findnotify_handle_closed,
  350.   syserr_notify_object_removed,
  351.   syserr_already_shutdown,
  352.   syserr_eas_didnt_fit,
  353.   syserr_ea_file_corrupt,
  354.   syserr_ea_table_full,
  355.   syserr_invalid_ea_handle,
  356.   syserr_no_cluster,
  357.   syserr_create_ea_file,
  358.   syserr_cannot_open_ea_file,
  359.   syserr_eas_not_supported,
  360.   syserr_need_eas_found,
  361.   syserr_duplicate_handle,
  362.   syserr_duplicate_name,
  363.   syserr_empty_muxwait,
  364.   syserr_mutex_owned,
  365.   syserr_not_owner,
  366.   syserr_param_too_small,
  367.   syserr_too_many_handles,
  368.   syserr_too_many_opens,
  369.   syserr_wrong_type,
  370.   syserr_unused_code,
  371.   syserr_thread_not_terminated,
  372.   syserr_init_routine_failed,
  373.   syserr_module_in_use,
  374.   syserr_not_enough_watchpoints,
  375.   syserr_too_many_posts,
  376.   syserr_already_posted,
  377.   syserr_already_reset,
  378.   syserr_sem_busy,
  379.   syserr_invalid_procid,
  380.   syserr_invalid_pdelta,
  381.   syserr_not_descendant,
  382.   syserr_not_session_manager,
  383.   syserr_invalid_pclass,
  384.   syserr_invalid_scope,
  385.   syserr_invalid_threadid,
  386.   syserr_dossub_shrink,
  387.   syserr_dossub_nomem,
  388.   syserr_dossub_overlap,
  389.   syserr_dossub_badsize,
  390.   syserr_dossub_badflag,
  391.   syserr_dossub_badselector,
  392.   syserr_mr_msg_too_long,
  393.   syserr_mr_mid_not_found,
  394.   syserr_mr_un_acc_msgf,
  395.   syserr_mr_inv_msgf_format,
  396.   syserr_mr_inv_ivcount,
  397.   syserr_mr_un_perform,
  398.   syserr_ts_wakeup,
  399.   syserr_ts_semhandle,
  400.   syserr_ts_notimer,
  401.   syserr_ts_handle,
  402.   syserr_ts_datetime,
  403.   syserr_sys_internal,
  404.   syserr_que_current_name,
  405.   syserr_que_proc_not_owned,
  406.   syserr_que_proc_owned,
  407.   syserr_que_duplicate,
  408.   syserr_que_element_not_exist,
  409.   syserr_que_no_memory,
  410.   syserr_que_invalid_name,
  411.   syserr_que_invalid_priority,
  412.   syserr_que_invalid_handle,
  413.   syserr_que_link_not_found,
  414.   syserr_que_memory_error,
  415.   syserr_que_prev_at_end,
  416.   syserr_que_proc_no_access,
  417.   syserr_que_empty,
  418.   syserr_que_name_not_exist,
  419.   syserr_que_not_initialized,
  420.   syserr_que_unable_to_access,
  421.   syserr_que_unable_to_add,
  422.   syserr_que_unable_to_init,
  423.   syserr_vio_invalid_mask,
  424.   syserr_vio_ptr,
  425.   syserr_vio_aptr,
  426.   syserr_vio_rptr,
  427.   syserr_vio_cptr,
  428.   syserr_vio_lptr,
  429.   syserr_vio_mode,
  430.   syserr_vio_width,
  431.   syserr_vio_attr,
  432.   syserr_vio_row,
  433.   syserr_vio_col,
  434.   syserr_vio_toprow,
  435.   syserr_vio_botrow,
  436.   syserr_vio_rightcol,
  437.   syserr_vio_leftcol,
  438.   syserr_scs_call,
  439.   syserr_scs_value,
  440.   syserr_vio_wait_flag,
  441.   syserr_vio_unlock,
  442.   syserr_sgs_not_session_mgr,
  443.   syserr_smg_invalid_session_id,
  444.   syserr_smg_no_sessions,
  445.   syserr_smg_session_not_found,
  446.   syserr_smg_set_title,
  447.   syserr_kbd_parameter,
  448.   syserr_kbd_no_device,
  449.   syserr_kbd_invalid_iowait,
  450.   syserr_kbd_invalid_length,
  451.   syserr_kbd_invalid_echo_mask,
  452.   syserr_kbd_invalid_input_mask,
  453.   syserr_mon_invalid_parms,
  454.   syserr_mon_invalid_devname,
  455.   syserr_mon_invalid_handle,
  456.   syserr_mon_buffer_too_small,
  457.   syserr_mon_buffer_empty,
  458.   syserr_mon_data_too_large,
  459.   syserr_mouse_no_device,
  460.   syserr_mouse_inv_handle,
  461.   syserr_mouse_inv_parms,
  462.   syserr_mouse_cant_reset,
  463.   syserr_mouse_display_parms,
  464.   syserr_mouse_inv_module,
  465.   syserr_mouse_inv_entry_pt,
  466.   syserr_mouse_inv_mask,
  467.   syserr_mouse_no_data,
  468.   syserr_mouse_ptr_drawn,
  469.   syserr_invalid_frequency,
  470.   syserr_nls_no_country_file,
  471.   syserr_nls_open_failed,
  472.   syserr_no_country_or_codepage,
  473.   syserr_nls_table_truncated,
  474.   syserr_nls_bad_type,
  475.   syserr_nls_type_not_found,
  476.   syserr_vio_smg_only,
  477.   syserr_vio_invalid_asciiz,
  478.   syserr_vio_deregister,
  479.   syserr_vio_no_popup,
  480.   syserr_vio_existing_popup,
  481.   syserr_kbd_smg_only,
  482.   syserr_kbd_invalid_asciiz,
  483.   syserr_kbd_invalid_mask,
  484.   syserr_kbd_register,
  485.   syserr_kbd_deregister,
  486.   syserr_mouse_smg_only,
  487.   syserr_mouse_invalid_asciiz,
  488.   syserr_mouse_invalid_mask,
  489.   syserr_mouse_register,
  490.   syserr_mouse_deregister,
  491.   syserr_smg_bad_action,
  492.   syserr_smg_invalid_call,
  493.   syserr_scs_sg_notfound,
  494.   syserr_scs_not_shell,
  495.   syserr_vio_invalid_parms,
  496.   syserr_vio_function_owned,
  497.   syserr_vio_return,
  498.   syserr_scs_invalid_function,
  499.   syserr_scs_not_session_mgr,
  500.   syserr_vio_register,
  501.   syserr_vio_no_mode_thread,
  502.   syserr_vio_no_save_restore_thd,
  503.   syserr_vio_in_bg,
  504.   syserr_vio_illegal_during_popup,
  505.   syserr_smg_not_baseshell,
  506.   syserr_smg_bad_statusreq,
  507.   syserr_que_invalid_wait,
  508.   syserr_vio_lock,
  509.   syserr_mouse_invalid_iowait,
  510.   syserr_vio_invalid_handle,
  511.   syserr_vio_illegal_during_lock,
  512.   syserr_vio_invalid_length,
  513.   syserr_kbd_invalid_handle,
  514.   syserr_kbd_no_more_handle,
  515.   syserr_kbd_cannot_create_kcb,
  516.   syserr_kbd_codepage_load_incompl,
  517.   syserr_kbd_invalid_codepage_id,
  518.   syserr_kbd_no_codepage_support,
  519.   syserr_kbd_focus_required,
  520.   syserr_kbd_focus_already_active,
  521.   syserr_kbd_keyboard_busy,
  522.   syserr_kbd_invalid_codepage,
  523.   syserr_kbd_unable_to_focus,
  524.   syserr_smg_session_non_select,
  525.   syserr_smg_session_not_foregrnd,
  526.   syserr_smg_session_not_parent,
  527.   syserr_smg_invalid_start_mode,
  528.   syserr_smg_invalid_related_opt,
  529.   syserr_smg_invalid_bond_option,
  530.   syserr_smg_invalid_select_opt,
  531.   syserr_smg_start_in_background,
  532.   syserr_smg_invalid_stop_option,
  533.   syserr_smg_bad_reserve,
  534.   syserr_smg_process_not_parent,
  535.   syserr_smg_invalid_data_length,
  536.   syserr_smg_not_bound,
  537.   syserr_smg_retry_sub_alloc,
  538.   syserr_kbd_detached,
  539.   syserr_vio_detached,
  540.   syserr_mou_detached,
  541.   syserr_vio_font,
  542.   syserr_vio_user_font,
  543.   syserr_vio_bad_cp,
  544.   syserr_vio_no_cp,
  545.   syserr_vio_na_cp,
  546.   syserr_invalid_code_page,
  547.   syserr_cplist_too_small,
  548.   syserr_cp_not_moved,
  549.   syserr_mode_switch_init,
  550.   syserr_code_page_not_found,
  551.   syserr_unexpected_slot_returned,
  552.   syserr_smg_invalid_trace_option,
  553.   syserr_vio_internal_resource,
  554.   syserr_vio_shell_init,
  555.   syserr_smg_no_hard_errors,
  556.   syserr_cp_switch_incomplete,
  557.   syserr_vio_transparent_popup,
  558.   syserr_critsec_overflow,
  559.   syserr_critsec_underflow,
  560.   syserr_vio_bad_reserve,
  561.   syserr_invalid_address,
  562.   syserr_zero_selectors_requested,
  563.   syserr_not_enough_selectors_ava,
  564.   syserr_invalid_selector,
  565.   syserr_smg_invalid_program_type,
  566.   syserr_smg_invalid_pgm_control,
  567.   syserr_smg_invalid_inherit_opt,
  568.   syserr_vio_extended_sg,
  569.   syserr_vio_not_pres_mgr_sg,
  570.   syserr_vio_shield_owned,
  571.   syserr_vio_no_more_handles,
  572.   syserr_vio_see_error_log,
  573.   syserr_vio_associated_dc,
  574.   syserr_kbd_no_console,
  575.   syserr_mouse_no_console,
  576.   syserr_mouse_invalid_handle,
  577.   syserr_smg_invalid_debug_parms,
  578.   syserr_kbd_extended_sg,
  579.   syserr_mou_extended_sg,
  580.   syserr_smg_invalid_icon_file,
  581.   syserr_trc_pid_non_existent,
  582.   syserr_trc_count_active,
  583.   syserr_trc_suspended_by_count,
  584.   syserr_trc_count_inactive,
  585.   syserr_trc_count_reached,
  586.   syserr_no_mc_trace,
  587.   syserr_mc_trace,
  588.   syserr_trc_count_zero,
  589.   syserr_smg_too_many_dds,
  590.   syserr_smg_invalid_notification,
  591.   syserr_lf_invalid_function,
  592.   syserr_lf_not_avail,
  593.   syserr_lf_suspended,
  594.   syserr_lf_buf_too_small,
  595.   syserr_lf_buffer_full,
  596.   syserr_lf_invalid_record,
  597.   syserr_lf_invalid_service,
  598.   syserr_lf_general_failure,
  599.   syserr_lf_invalid_id,
  600.   syserr_lf_invalid_handle,
  601.   syserr_lf_no_id_avail,
  602.   syserr_lf_template_area_full,
  603.   syserr_lf_id_in_use,
  604.   syserr_mou_not_initialized,
  605.   syserr_mouinitreal_done,
  606.   syserr_dossub_corrupted,
  607.   syserr_mouse_caller_not_subsys,
  608.   syserr_arithmetic_overflow,
  609.   syserr_tmr_no_device,
  610.   syserr_tmr_invalid_time,
  611.   syserr_pvw_invalid_entity,
  612.   syserr_pvw_invalid_entity_type,
  613.   syserr_pvw_invalid_spec,
  614.   syserr_pvw_invalid_range_type,
  615.   syserr_pvw_invalid_counter_blk,
  616.   syserr_pvw_invalid_text_blk,
  617.   syserr_prf_not_initialized,
  618.   syserr_prf_already_initialized,
  619.   syserr_prf_not_started,
  620.   syserr_prf_already_started,
  621.   syserr_prf_timer_out_of_range,
  622.   syserr_prf_timer_reset,
  623.   syserr_vdd_lock_useage_denied,
  624.   syserr_timeout,
  625.   syserr_vdm_down,
  626.   syserr_vdm_limit,
  627.   syserr_vdd_not_found,
  628.   syserr_invalid_caller,
  629.   syserr_pid_mismatch,
  630.   syserr_invalid_vdd_handle,
  631.   syserr_vlpt_no_spooler,
  632.   syserr_vcom_device_busy,
  633.   syserr_vlpt_device_busy,
  634.   syserr_nesting_too_deep,
  635.   syserr_vdd_missing,
  636.   syserr_bidi_invalid_length,
  637.   syserr_bidi_invalid_increment,
  638.   syserr_bidi_invalid_combination,
  639.   syserr_bidi_invalid_reserved,
  640.   syserr_bidi_invalid_effect,
  641.   syserr_bidi_invalid_csdrec,
  642.   syserr_bidi_invalid_csdstate,
  643.   syserr_bidi_invalid_level,
  644.   syserr_bidi_invalid_type_support,
  645.   syserr_bidi_invalid_orientation,
  646.   syserr_bidi_invalid_num_shape,
  647.   syserr_bidi_invalid_csd,
  648.   syserr_bidi_no_support,
  649.   syserr_bidi_rw_incomplete,
  650.   syserr_imp_invalid_parm,
  651.   syserr_imp_invalid_length,
  652.   syserr_hpfs_disk_error_warn,
  653.   syserr_mon_bad_buffer,
  654.   syserr_module_corrupted,
  655.   syserr_sm_outof_swapfile,
  656.   syserr_lf_timeout,
  657.   syserr_lf_suspend_success,
  658.   syserr_lf_resume_success,
  659.   syserr_lf_redirect_success,
  660.   syserr_lf_redirect_failure,
  661.   syserr_swapper_not_active,
  662.   syserr_invalid_swapid,
  663.   syserr_ioerr_swap_file,
  664.   syserr_swap_table_full,
  665.   syserr_swap_file_full,
  666.   syserr_cant_init_swapper,
  667.   syserr_swapper_already_init,
  668.   syserr_pmm_insufficient_memory,
  669.   syserr_pmm_invalid_flags,
  670.   syserr_pmm_invalid_address,
  671.   syserr_pmm_lock_failed,
  672.   syserr_pmm_unlock_failed,
  673.   syserr_pmm_move_incomplete,
  674.   syserr_ucom_drive_renamed,
  675.   syserr_ucom_filename_truncated,
  676.   syserr_ucom_buffer_length,
  677.   syserr_mon_chain_handle,
  678.   syserr_mon_not_registered,
  679.   syserr_smg_already_top,
  680.   syserr_pmm_arena_modified,
  681.   syserr_smg_printer_open,
  682.   syserr_pmm_set_flags_failed,
  683.   syserr_invalid_dos_dd,
  684.   syserr_blocked,
  685.   syserr_noblock,
  686.   syserr_instance_shared,
  687.   syserr_no_object,
  688.   syserr_partial_attach,
  689.   syserr_incache,
  690.   syserr_swap_io_problems,
  691.   syserr_crosses_object_boundary,
  692.   syserr_longlock,
  693.   syserr_shortlock,
  694.   syserr_uvirtlock,
  695.   syserr_aliaslock,
  696.   syserr_alias,
  697.   syserr_no_more_handles,
  698.   syserr_scan_terminated,
  699.   syserr_terminator_not_found,
  700.   syserr_not_direct_child,
  701.   syserr_delay_free,
  702.   syserr_guardpage,
  703.   syserr_swaperror,
  704.   syserr_ldrerror,
  705.   syserr_nomemory,
  706.   syserr_noaccess,
  707.   syserr_no_dll_term,
  708.   syserr_cpsio_code_page_invalid,
  709.   syserr_cpsio_no_spooler,
  710.   syserr_cpsio_font_id_invalid,
  711.   syserr_cpsio_internal_error,
  712.   syserr_cpsio_invalid_ptr_name,
  713.   syserr_cpsio_not_active,
  714.   syserr_cpsio_pid_full,
  715.   syserr_cpsio_pid_not_found,
  716.   syserr_cpsio_read_ctl_seq,
  717.   syserr_cpsio_read_fnt_def,
  718.   syserr_cpsio_write_error,
  719.   syserr_cpsio_write_full_error,
  720.   syserr_cpsio_write_handle_bad,
  721.   syserr_cpsio_swit_load,
  722.   syserr_cpsio_inv_command,
  723.   syserr_cpsio_no_font_swit,
  724.   syserr_entry_is_callgate,
  725.  
  726.   /* Socket errors: */
  727.   syserr_socket_perm,
  728.   syserr_socket_srch,
  729.   syserr_socket_intr,
  730.   syserr_socket_nxio,
  731.   syserr_socket_badf,
  732.   syserr_socket_acces,
  733.   syserr_socket_fault,
  734.   syserr_socket_inval,
  735.   syserr_socket_mfile,
  736.   syserr_socket_pipe,
  737.   syserr_socket_os2err,
  738.   syserr_socket_wouldblock,
  739.   syserr_socket_inprogress,
  740.   syserr_socket_already,
  741.   syserr_socket_notsock,
  742.   syserr_socket_destaddrreq,
  743.   syserr_socket_msgsize,
  744.   syserr_socket_prototype,
  745.   syserr_socket_noprotoopt,
  746.   syserr_socket_protonosupport,
  747.   syserr_socket_socktnosupport,
  748.   syserr_socket_opnotsupp,
  749.   syserr_socket_pfnosupport,
  750.   syserr_socket_afnosupport,
  751.   syserr_socket_addrinuse,
  752.   syserr_socket_addrnotavail,
  753.   syserr_socket_netdown,
  754.   syserr_socket_netunreach,
  755.   syserr_socket_netreset,
  756.   syserr_socket_connaborted,
  757.   syserr_socket_connreset,
  758.   syserr_socket_nobufs,
  759.   syserr_socket_isconn,
  760.   syserr_socket_notconn,
  761.   syserr_socket_shutdown,
  762.   syserr_socket_toomanyrefs,
  763.   syserr_socket_timedout,
  764.   syserr_socket_connrefused,
  765.   syserr_socket_loop,
  766.   syserr_socket_nametoolong,
  767.   syserr_socket_hostdown,
  768.   syserr_socket_hostunreach,
  769.   syserr_socket_notempty,
  770.  
  771.   syserr_unknown
  772. };
  773.  
  774. #define syserr_not_enough_space syserr_not_enough_memory
  775.  
  776. #else /* not DEFINE_OS2_SYSCALLS */
  777.  
  778. #ifndef SCM_OS2API_H
  779. #define SCM_OS2API_H
  780.  
  781. /* STD_API_CALL cannot be written as a specialization of XTD_API_CALL,
  782.    because that causes the `proc' argument to be expanded, which
  783.    screws up the generation of `syscall_ ## proc'.  */
  784.  
  785. #define STD_API_CALL(proc, args)                    \
  786. {                                    \
  787.   while (1)                                \
  788.     {                                    \
  789.       APIRET rc = (proc args);                        \
  790.       if (rc == NO_ERROR)                        \
  791.     break;                                \
  792.       if (rc != ERROR_INTERRUPT)                    \
  793.     OS2_error_system_call (rc, syscall_ ## proc);            \
  794.     }                                    \
  795. }
  796.  
  797. #define XTD_API_CALL(proc, args, if_error)                \
  798. {                                    \
  799.   while (1)                                \
  800.     {                                    \
  801.       APIRET rc = (proc args);                        \
  802.       if (rc == NO_ERROR)                        \
  803.     break;                                \
  804.       if (rc != ERROR_INTERRUPT)                    \
  805.     {                                \
  806.       if_error;                            \
  807.       OS2_error_system_call (rc, syscall_ ## proc);            \
  808.     }                                \
  809.     }                                    \
  810. }
  811.  
  812. #define dos_alloc_mem        DosAllocMem
  813. #define dos_alloc_shared_mem    DosAllocSharedMem
  814. #define dos_async_timer        DosAsyncTimer
  815. #define dos_close        DosClose
  816. #define dos_close_event_sem    DosCloseEventSem
  817. #define dos_close_mutex_sem    DosCloseMutexSem
  818. #define dos_close_queue        DosCloseQueue
  819. #define dos_copy        DosCopy
  820. #define dos_create_dir        DosCreateDir
  821. #define dos_create_event_sem    DosCreateEventSem
  822. #define dos_create_mutex_sem    DosCreateMutexSem
  823. #define dos_create_pipe        DosCreatePipe
  824. #define dos_create_queue    DosCreateQueue
  825. #define dos_create_thread    DosCreateThread
  826. #define dos_delete        DosDelete
  827. #define dos_delete_dir        DosDeleteDir
  828. #define dos_dup_handle        DosDupHandle
  829. #define dos_exec_pgm        DosExecPgm
  830. #define dos_exit        DosExit
  831. #define dos_find_close        DosFindClose
  832. #define dos_find_first        DosFindFirst
  833. #define dos_find_next        DosFindNext
  834. #define dos_free_mem        DosFreeMem
  835. #define dos_get_info_blocks    DosGetInfoBlocks
  836. #define dos_get_message        DosGetMessage
  837. #define dos_get_named_shared_mem DosGetNamedSharedMem
  838. #define dos_get_shared_mem    DosGetSharedMem
  839. #define dos_give_shared_mem    DosGiveSharedMem
  840. #define dos_kill_process    DosKillProcess
  841. #define dos_kill_thread        DosKillThread
  842. #define dos_move        DosMove
  843. #define dos_open        DosOpen
  844. #define dos_post_event_sem    DosPostEventSem
  845. #define dos_query_current_dir    DosQueryCurrentDir
  846. #define dos_query_current_disk    DosQueryCurrentDisk
  847. #define dos_query_fh_state    DosQueryFHState
  848. #define dos_query_file_info    DosQueryFileInfo
  849. #define dos_query_fs_attach    DosQueryFSAttach
  850. #define dos_query_fs_info    DosQueryFSInfo
  851. #define dos_query_h_type    DosQueryHType
  852. #define dos_query_mem        DosQueryMem
  853. #define dos_query_n_p_h_state    DosQueryNPHState
  854. #define dos_query_path_info    DosQueryPathInfo
  855. #define dos_query_sys_info    DosQuerySysInfo
  856. #define dos_read        DosRead
  857. #define dos_read_queue        DosReadQueue
  858. #define dos_release_mutex_sem    DosReleaseMutexSem
  859. #define dos_request_mutex_sem    DosRequestMutexSem
  860. #define dos_reset_event_sem    DosResetEventSem
  861. #define dos_scan_env        DosScanEnv
  862. #define dos_send_signal_exception DosSendSignalException
  863. #define dos_set_current_dir    DosSetCurrentDir
  864. #define dos_set_default_disk    DosSetDefaultDisk
  865. #define dos_set_fh_state    DosSetFHState
  866. #define dos_set_file_ptr    DosSetFilePtr
  867. #define dos_set_file_size    DosSetFileSize
  868. #define dos_set_max_fh        DosSetMaxFH
  869. #define dos_set_mem        DosSetMem
  870. #define dos_set_path_info    DosSetPathInfo
  871. #define dos_set_rel_max_fh    DosSetRelMaxFH
  872. #define dos_start_timer        DosStartTimer
  873. #define dos_stop_timer        DosStopTimer
  874. #define dos_wait_child        DosWaitChild
  875. #define dos_wait_event_sem    DosWaitEventSem
  876. #define dos_write        DosWrite
  877. #define dos_write_queue        DosWriteQueue
  878. #define kbd_char_in        KbdCharIn
  879. #define vio_wrt_tty        VioWrtTTY
  880.  
  881. #ifdef SCM_OS2TOP_C
  882.  
  883. static char * syscall_names_table [] =
  884. {
  885.   "dos-alloc-mem",
  886.   "dos-alloc-shared-mem",
  887.   "dos-async-timer",
  888.   "dos-close",
  889.   "dos-close-event-sem",
  890.   "dos-close-mutex-sem",
  891.   "dos-close-queue",
  892.   "dos-copy",
  893.   "dos-create-dir",
  894.   "dos-create-event-sem",
  895.   "dos-create-mutex-sem",
  896.   "dos-create-pipe",
  897.   "dos-create-queue",
  898.   "dos-create-thread",
  899.   "dos-delete",
  900.   "dos-delete-dir",
  901.   "dos-dup-handle",
  902.   "dos-exec-pgm",
  903.   "dos-exit",
  904.   "dos-find-close",
  905.   "dos-find-first",
  906.   "dos-find-next",
  907.   "dos-free-mem",
  908.   "dos-get-info-blocks",
  909.   "dos-get-message",
  910.   "dos-get-named-shared-mem",
  911.   "dos-get-shared-mem",
  912.   "dos-give-shared-mem",
  913.   "dos-kill-process",
  914.   "dos-kill-thread",
  915.   "dos-move",
  916.   "dos-open",
  917.   "dos-post-event-sem",
  918.   "dos-query-current-dir",
  919.   "dos-query-current-disk",
  920.   "dos-query-fh-state",
  921.   "dos-query-file-info",
  922.   "dos-query-fs-attach",
  923.   "dos-query-fs-info",
  924.   "dos-query-h-type",
  925.   "dos-query-mem",
  926.   "dos-query-n-p-h-state",
  927.   "dos-query-path-info",
  928.   "dos-query-sys-info",
  929.   "dos-read",
  930.   "dos-read-queue",
  931.   "dos-release-mutex-sem",
  932.   "dos-request-mutex-sem",
  933.   "dos-reset-event-sem",
  934.   "dos-scan-env",
  935.   "dos-send-signal-exception",
  936.   "dos-set-current-dir",
  937.   "dos-set-default-disk",
  938.   "dos-set-fh-state",
  939.   "dos-set-file-ptr",
  940.   "dos-set-file-size",
  941.   "dos-set-max-fh",
  942.   "dos-set-mem",
  943.   "dos-set-path-info",
  944.   "dos-set-rel-max-fh",
  945.   "dos-start-timer",
  946.   "dos-stop-timer",
  947.   "dos-wait-child",
  948.   "dos-wait-event-sem",
  949.   "dos-write",
  950.   "dos-write-queue",
  951.   "beginthread",
  952.   "gmtime",
  953.   "kbd-char-in",
  954.   "localtime",
  955.   "malloc",
  956.   "mktime",
  957.   "realloc",
  958.   "time",
  959.   "vio-wrt-tty",
  960.  
  961.   /* Socket calls: */
  962.   "accept",
  963.   "bind",
  964.   "connect",
  965.   "get-host-by-name",
  966.   "get-host-name",
  967.   "listen",
  968.   "recv",
  969.   "send",
  970.   "socket",
  971.   "soclose"
  972. };
  973.  
  974. #endif /* SCM_OS2TOP_C */
  975.  
  976. #endif /* SCM_OS2API_H */
  977. #endif /* not DEFINE_OS2_SYSCALLS */
  978.