add_to_remote_cat_.pl1 08/07/87 1554.7rew 08/07/87 1455.0 32481 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-07-10,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ add_to_remote_cat_: proc (p_mcb_ptr, p_major_capability_number, p_major_capability_name, p_code); /* : PROGRAM FUNCTION Used to update the remote CAT entry, this is an internal MOWSE function call. */ /* : NOTES Returns no errors because all erros are internal to mowse and recovery from such errors is impossible (no reply given to sender). */ /* INPUT PARAMETERS */ dcl p_mcb_ptr ptr; /* MOWSE's mcb */ dcl p_major_capability_number fixed bin parameter; /* Number of the new remot capability */ dcl p_major_capability_name char (*) parameter; /* Name of new remote capability */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35); /* MISC VARIABLES */ dcl code fixed bin (35); dcl major_num fixed bin; /* Packed major capability number */ dcl mowse_info_ptr ptr; /* pointer to mowse info structure */ /* SYSTEM CALL SUPPORT */ dcl ws_error_$invalid_capability_number fixed bin (35) ext static; /* EXTERNAL CALLS */ dcl capability_$pack entry (fixed bin, fixed bin, fixed bin, fixed bin (35)); dcl get_mowse_info_ptr_ entry (ptr, ptr, fixed bin (35)); /* BUILTINS */ /* */ /* INITIALIZATION */ code = 0; major_num = 0; call get_mowse_info_ptr_ (p_mcb_ptr, mowse_info_ptr, p_code); if p_code ^= 0 then return; /* MAIN */ /* : Check the major_capability_nubmer */ if p_major_capability_number < MINIMUM_CAT_ENTRY | p_major_capability_number > MAXIMUM_CAT_ENTRY then do; p_code = ws_error_$invalid_capability_number; return; end; /* : Is it already used, return ws_error_$invalid_capability_number */ if (mowse_info_ptr -> mowse_info.remote_cat (p_major_capability_number) .major_capability ^= 0) then do; p_code = ws_error_$invalid_capability_number; return; end; /* : initialize the remote cat entry */ call capability_$pack (REMOTE_SYSTEM, p_major_capability_number, major_num, code); mowse_info_ptr -> mowse_info.remote_cat (p_major_capability_number) .major_capability = major_num; mowse_info_ptr -> mowse_info.remote_cat (p_major_capability_number) .capability_name = p_major_capability_name; mowse_info_ptr -> mowse_info.remote_cat (p_major_capability_number).flags .reset = "0"b; mowse_info_ptr -> mowse_info.remote_cat (p_major_capability_number).flags .suspended = "0"b; mowse_info_ptr -> mowse_info.remote_cat (p_major_capability_number) .flags.sleep_time = "0"b; p_code = 0; %page; /* INCLUDE FILES */ %include mowse; %include mowse_info; /* : END */ end;  append_inbuff_.pl1 08/07/87 1554.7rew 08/07/87 1455.0 28044 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-08-27,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ append_inbuff_: proc (p_mcb_ptr, p_data, p_data_length, p_code); /* PROGRAM FUNCTION Append p_data to the application program's input buffer and update mcb input buffer fields. */ /* : NOTES */ /* INPUT PARAMETERS */ dcl p_mcb_ptr ptr parameter; /* mcb contains inbuff info */ dcl p_data ptr parameter; /* data to append */ dcl p_data_length fixed bin (17) parameter; /* length of data */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35); /* Error code */ /* SYSTEM CALL SUPPORT */ dcl ws_error_$input_buffer_overflow fixed bin (35) ext static; /* MISC VARIABLES */ dcl input_data char (p_data_length) based (p_data); dcl p ptr; /* pointer to application's buffer */ dcl input_buffer char (p_mcb_ptr -> mcb.inbuff_length) based (p); dcl effective_data_length fixed bin; dcl buffer_space_left fixed bin; /* BUILTINS */ dcl substr builtin; /* */ /* INITIALIZATION */ p_code = 0; effective_data_length = p_data_length; /* MAIN */ /* : determine amount of space left in the input buffer */ buffer_space_left = p_mcb_ptr -> mcb.inbuff_length - p_mcb_ptr -> inbuff_position_index; /* : if amount of space left is less than amount of p_data to append set amount to copy to the amount of buffer space left set p_code to indicate input buffer overflow took place */ if buffer_space_left < p_data_length then do; effective_data_length = buffer_space_left; p_code = ws_error_$input_buffer_overflow; end; /* : - if there is space in buffer to copy p_data then copy p_data into the input buffer update the position index in the mcb for next time */ if buffer_space_left > 0 then do; p = p_mcb_ptr -> mcb.inbuff; substr (input_buffer, p_mcb_ptr -> mcb.inbuff_position_index + 1, effective_data_length) = substr (input_data, 1, effective_data_length); p_mcb_ptr -> mcb.inbuff_position_index = p_mcb_ptr -> mcb.inbuff_position_index + effective_data_length; end; %page; /* INCLUDE FILES */ %include "mowse"; %include "mowse_mcb"; /* : END */ end append_inbuff_;  atm.pl1 08/07/87 1553.9rew 08/07/87 1450.0 108000 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-08-14,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-08-28,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Extracted get_at_ to separate module. 3) change(86-10-07,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Added syn_mowse_i/o to allow easy location of the switch attached to mowse_io_ module. 4) change(86-10-08,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Renamed attachments. 5) change(86-10-09,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Masked around critical switch movements. 6) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. 7) change(87-01-19,Flegel), approve(87-01-19,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Added check for WSTERM terminal type before attaching MOWSE. 8) change(87-02-25,Flegel), approve(87-02-25,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Corrected terminal type setting test, installed the clean_up_init_mowse_info routine, and added the force request to the command. 9) change(87-03-24,Flegel), approve(87-03-24,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Changed call to iox_$open_file in order to pass escape and EOP character information to mowse_io_. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ atm: attach_mowse: proc (); /* : PROGRAM FUNCTION Attach the MOWSE environment to the user's process. */ /* : NOTES The MOWSE environment is to be used only by the user when (s)he has logged into Multics through the MOWSE environment on a Personal Computer. Failure to do so will result in a "hung" terminal. MOWSE will be attached before tty_. If tty_ does not exist, then attachment will fail. Below is a before/after look of the io switch attachments: --| --+--...---- tty_ --| --| --+--...---- syn_ ---- mowse_io_ ---- tty_ --| */ /* MISC VARIABLES */ dcl open_descrip char (32); /* Open description arguments */ dcl err_string char (512) var; dcl iocb_ptr ptr; dcl switch_name char (32); /* Switch name to attach to */ dcl arg_count fixed bin; /* Number of arguments */ dcl arg_list_ptr ptr; /* Pointer to argument list */ dcl mowse_iocb_ptr ptr; /* Pointer to Mowse control block */ dcl syn_iocb_ptr ptr; /* Pointer to Syn Mowse control block */ dcl code fixed bin (35); /* Error code */ dcl old_mask bit (36) aligned; /* IPS mask */ dcl new_mask bit (36) aligned; /* IPS mask */ /* STRUCTURES */ dcl 01 term_info like terminal_info aligned automatic; dcl 01 info like mowse_io_info automatic; /* SYSTEM CALLS */ dcl iox_$open_file entry (ptr, fixed bin, char (*), bit (1) aligned, fixed bin (35)); dcl ioa_$ioa_switch entry () options (variable); dcl hcs_$set_ips_mask entry (bit (36) aligned, bit (36) aligned); dcl hcs_$reset_ips_mask entry (bit (36) aligned, bit (36) aligned); dcl ioa_$rsnnl entry () options (variable); dcl iox_$detach_iocb entry (ptr, fixed bin (35)); dcl iox_$destroy_iocb entry (ptr, fixed bin (35)); dcl iox_$look_iocb entry (char (*), ptr, fixed bin (35)); dcl cu_$arg_count entry (fixed bin, fixed bin (35)); dcl cu_$arg_list_ptr entry (ptr); dcl iox_$control entry (ptr, char (*), ptr, fixed bin (35)); dcl com_err_ entry () options (variable); dcl iox_$move_attach entry (ptr, ptr, fixed bin (35)); dcl iox_$find_iocb entry (char (*), ptr, fixed bin (35)); dcl iox_$attach_ptr entry (ptr, char (*), ptr, fixed bin (35)); /* SYSTEM CALL SUPPORT */ dcl iox_$error_output ptr ext static; dcl ws_error_$unsupported_ws_terminal fixed bin (35) ext static; dcl iox_$user_io ptr ext static; /* User_i/o IOCB */ /* EXTERNAL CALLS */ dcl get_at_ entry (char (*), char (*), ptr, fixed bin (35)); dcl init_mowse_ entry (ptr, ptr, fixed bin (35)); dcl startup_parser_ entry (ptr, fixed bin, ptr, char (*) var, fixed bin (35)); /* EXTERNAL CALL SUPPORT */ /* BUILTINS */ dcl addr builtin; dcl length builtin; dcl null builtin; dcl index builtin; /* CONDITIONS */ /* CONSTANTS */ dcl MY_NAME char (12) int static options (constant) init ("attach_mowse"); /* */ /* INITIALIZATION */ open_struc_ptr = addr (open_descrip); init_mowse_info_ptr = null; new_mask = ""b; /* MAIN */ /* : MOWSE already attached? */ call iox_$look_iocb ("mowse_i/o", iocb_ptr, code); if iocb_ptr ^= null then do; call ioa_$ioa_switch (iox_$error_output, "^a: MOWSE has already been invoked.", MY_NAME); return; end; /* : Parse the arglist */ call cu_$arg_list_ptr (arg_list_ptr); call cu_$arg_count (arg_count, code); if code ^= 0 then do; call com_err_ (code, MY_NAME, "Getting arg count."); return; end; /* : Call arg_list parser routine */ call startup_parser_ (arg_list_ptr, arg_count, init_mowse_info_ptr, err_string, code); if code ^= 0 then do; call com_err_ (code, MY_NAME, err_string); call clean_up_init_mowse_info (init_mowse_info_ptr); return; end; /* : See if we are on an acceptable terminal type */ if ^init_mowse_info.flags.force_sw then do; term_info.version = 1; call iox_$control (iox_$user_io, "terminal_info", addr (term_info), code); if code ^= 0 then do; call com_err_ (code, MY_NAME, "Getting terminal type."); call clean_up_init_mowse_info (init_mowse_info_ptr); return; end; if index (term_info.term_type, "MOWSE") = 0 then do; call com_err_ (ws_error_$unsupported_ws_terminal, MY_NAME, "Use MOWSE."); call clean_up_init_mowse_info (init_mowse_info_ptr); return; end; end; /* : Find the iocb of the switch (if specified) under which to attach, otherwise next to tty_ */ if ^init_mowse_info.flags.io_switch_sw then do; call get_at_ ("tty_", "", iocb_ptr, code); if code ^= 0 then do; call com_err_ (code, MY_NAME, "Finding tty_."); call clean_up_init_mowse_info (init_mowse_info_ptr); return; end; end; else do; switch_name = init_mowse_info.io_switch; call iox_$look_iocb (switch_name, iocb_ptr, code); if code ^= 0 then do; call com_err_ (code, MY_NAME, "Finding ^a", switch_name); call clean_up_init_mowse_info (init_mowse_info_ptr); return; end; end; /* : Create mowse_tty control block */ call iox_$find_iocb ("mowse_tty", mowse_iocb_ptr, code); if code ^= 0 then do; call com_err_ (code, MY_NAME, "Finding mowse_tty."); call clean_up_init_mowse_info (init_mowse_info_ptr); return; end; /* : Create mowse_i/o control block */ call iox_$find_iocb ("mowse_i/o", syn_iocb_ptr, code); if code ^= 0 then do; call iox_$destroy_iocb (mowse_iocb_ptr, (0)); call com_err_ (code, MY_NAME, "Finding mowse_i/o."); call clean_up_init_mowse_info (init_mowse_info_ptr); return; end; /* : Move mowse_i/o onto the iocb above tty_ */ new_mask = ""b; call hcs_$set_ips_mask (new_mask, old_mask); call iox_$move_attach (iocb_ptr, syn_iocb_ptr, code); if code ^= 0 then do; call hcs_$reset_ips_mask (old_mask, new_mask); call ioa_$rsnnl ("Moving ^a attachment to mowse_i/o.", err_string, length (err_string), iocb_ptr -> iocb.name); goto DESTROY_IOCB_SYN; end; /* : Attach the syn_ */ call iox_$attach_ptr (iocb_ptr, "syn_ mowse_i/o", null, code); if code ^= 0 then do; call hcs_$reset_ips_mask (old_mask, new_mask); call ioa_$rsnnl ("Attaching ^a to mowse_i/o.", err_string, length (err_string), iocb_ptr -> iocb.name); goto UNMOVE_ATTACH_SYN; end; call hcs_$reset_ips_mask (old_mask, new_mask); /* : Move mowse_i/o to mowse_io_ */ new_mask = ""b; call hcs_$set_ips_mask (new_mask, old_mask); call iox_$move_attach (syn_iocb_ptr, mowse_iocb_ptr, code); if code ^= 0 then do; call hcs_$reset_ips_mask (old_mask, new_mask); call ioa_$rsnnl ("Moving ^a attachment to mowse_i/o.", err_string, length (err_string), syn_iocb_ptr -> iocb.name) ; goto DESTROY_IOCB; end; /* : Attach mowse_io_ to tty_ */ call iox_$attach_ptr (syn_iocb_ptr, "mowse_io_ mowse_tty", null, code); if code ^= 0 then do; call hcs_$reset_ips_mask (old_mask, new_mask); call ioa_$rsnnl ("Attaching ^a to mowse_tty.", err_string, length (err_string), syn_iocb_ptr -> iocb.name); goto UNMOVE_ATTACH; end; call hcs_$reset_ips_mask (old_mask, new_mask); /* : Open mowse_io_ */ open_struc.flags.network_sw = "0"b; open_struc.flags.escape_sw = "0"b; if init_mowse_info.flags.escape_sw then do; open_struc.flags.escape_sw = "1"b; open_struc.escape.switches = init_mowse_info.escape.chars; end; if init_mowse_info.flags.network_sw then open_struc.flags.network_sw = "1"b; call iox_$open_file (syn_iocb_ptr, Stream_input_output, open_descrip, "0"b, code); if code ^= 0 then do; err_string = "Opening mowse_tty."; goto UNATTACH; end; /* : Initialization of mowse */ info.version = mowse_io_info_version_1; call iox_$control (syn_iocb_ptr, "get_mowse_info", addr (info), code); if code ^= 0 then do; call com_err_ (code, MY_NAME, "Getting mowse mcb."); call clean_up_init_mowse_info (init_mowse_info_ptr); return; end; /* : Set up the mowse_info_ structure */ call init_mowse_ (info.mcb_ptr, init_mowse_info_ptr, code); if code ^= 0 then do; call com_err_ (code, MY_NAME, "Initializing mowse."); call clean_up_init_mowse_info (init_mowse_info_ptr); return; end; return; /* */ /* : Label entries to transfer control to when a failure occurs during the attachment / movement of the iocbs */ UNATTACH: call iox_$detach_iocb (syn_iocb_ptr, (0)); UNMOVE_ATTACH: call iox_$move_attach (mowse_iocb_ptr, syn_iocb_ptr, (0)); DESTROY_IOCB: call iox_$destroy_iocb (mowse_iocb_ptr, (0)); UNMOVE_ATTACH_SYN: call iox_$detach_iocb (iocb_ptr, (0)); call iox_$move_attach (syn_iocb_ptr, iocb_ptr, (0)); DESTROY_IOCB_SYN: call iox_$destroy_iocb (syn_iocb_ptr, (0)); call com_err_ (code, MY_NAME, err_string); call clean_up_init_mowse_info (init_mowse_info_ptr); return; /* */ /* INTERNAL PROCEDURES */ /* : *** Procedure clean_up_init_mowse_ptr: internal procedure for atm *** */ clean_up_init_mowse_info: proc (p_info_ptr); /* : PROCEDURE FUNCTION Free the init_mowse_info structure if the pointer is not null. */ /* INPUT PARAMETERS */ dcl p_info_ptr ptr parameter; /* INITIALIZATION */ if p_info_ptr ^= null then free p_info_ptr -> init_mowse_info; p_info_ptr = null; end clean_up_init_mowse_info; /* */ %page; /* INCLUDE FILES */ %include iox_modes; %include terminal_info; %include mowse_info; %include iocbv; %include mowse_io_control_info; /* : END */ end;  capability_.pl1 08/07/87 1554.7rew 08/07/87 1455.0 35406 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-05-15,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-07-12,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Minor revisions. 3) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ capability_: proc (); /* : PROGRAM FUNCTION Contains two entry points: pack: Converts a MOWSE system id and a capability number into a single fixed bin value (major_capability). unpack: Convert a major_capability back into the system id and the capability number. */ /* : NOTES */ /* INPUT PARAMETERS */ dcl p_system_id fixed bin parameter; /* MOWSE sytem id */ dcl p_major_capability fixed bin parameter; /* Major capability id */ dcl p_major_number fixed bin parameter; /* CAT index of capability */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35); /* MISC VARIABLES */ dcl fixed8 fixed bin (8) based; /* Dummy for convert */ dcl fixed17 fixed bin (17) based; /* Dummey for convert */ dcl major_ptr ptr; /* Pointer to p_major_capability */ dcl major fixed bin (35); /* Temporary major_capability (packed) */ /* SYSTEM CALL SUPPORT */ dcl ws_error_$invalid_system_id fixed bin (35) ext static; dcl ws_error_$invalid_capability_number fixed bin (35) ext static; /* STRUCTURES */ dcl 01 major_overlay unaligned based (major_ptr), 02 pad bit (18), 02 system fixed bin (8), 02 index fixed bin (8); /* BUILTINS */ dcl addr builtin; dcl convert builtin; /* MAIN */ return; /* */ /* : Pack: */ pack: entry (p_system_id, p_major_number, p_major_capability, p_code); p_code = 0; major = 0; major_ptr = addr (major); /* : If major_capability_number is invalid */ if (p_major_number < INTERNAL) | (p_major_number > MAXIMUM_CAT_ENTRY) then do; p_code = ws_error_$invalid_capability_number; return; end; /* : If p_system_id is invalid */ if (p_system_id ^= REMOTE_SYSTEM) & (p_system_id ^= LOCAL_SYSTEM) then do; p_code = ws_error_$invalid_system_id; return; end; /* : pack the system id and major number */ major_overlay.system = convert (fixed8, p_system_id); major_overlay.index = convert (fixed8, p_major_number); p_major_capability = convert (fixed17, major); return; /* */ /* : Unpack: */ unpack: entry (p_system_id, p_major_number, p_major_capability, p_code); p_code = 0; major = p_major_capability; major_ptr = addr (major); /* : Check that the unpacked fields are correct */ if (major_overlay.system ^= LOCAL_SYSTEM & major_overlay.system ^= REMOTE_SYSTEM) | (major_overlay.index < INTERNAL | major_overlay.index > MAXIMUM_CAT_ENTRY) then p_code = ws_error_$invalid_capability_number; else do; p_major_number = major_overlay.index; p_system_id = major_overlay.system; end; return; %page; /* INCLUDE FILES */ %include "mowse"; %include "mowse_info"; /* : END */ end capability_;  delete_from_remote_cat_.pl1 08/07/87 1554.1rew 08/07/87 1450.4 38124 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-08-28,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-10-22,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Removed name of capability as an input parameter since it is not sent with a delete_from_remote_cat_message. 3) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. 4) change(86-12-10,Flegel), approve(86-12-10,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Replaced signalling of mowse_fatal_error with a call to fatal_mowse_trap_. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ delete_from_remote_cat_: proc (p_mcb_ptr, p_major_capability_number, p_code); /* : PROCEDURE FUNCTION Handles DELETE_FROM_REMOTE_CAT messages sent to MOWSE from a remote system. Since this is an internal function and no replys to such messages are given any errors detected are fatal to MOWSE. */ /* : NOTES */ /* INPUT PARAMETERS */ dcl p_mcb_ptr ptr; dcl p_major_capability_number fixed bin parameter; /* major capability number (system|cap_num) */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35); /* return code */ /* MISC VARIABLES */ dcl mowse_info_ptr ptr; /* Pointer to mowse info structure */ dcl cap_numb fixed bin; /* major capability index (usable as index into CAT tables ) */ dcl sysid fixed bin; /* MOWSE system id */ /* STRUCTURES */ /* SYSTEM CALLS */ dcl capability_$unpack entry (fixed bin, fixed bin, fixed bin, fixed bin (35)); /* SYSTEM CALL SUPPORT */ dcl ws_error_$invalid_capability_number fixed bin (35) ext static; /* EXTERNAL CALLS */ dcl get_mowse_info_ptr_ entry (ptr, ptr, fixed bin (35)); dcl fatal_mowse_trap_ entry (fixed bin (35)); /* CONDITIONS */ /* BUILTINS */ /* CONSTANTS */ dcl FALSE bit (1) int static options (constant) init ("0"b); /* */ /* INITIALIZATION */ call get_mowse_info_ptr_ (p_mcb_ptr, mowse_info_ptr, p_code); if p_code ^= 0 then return; /* MAIN */ /* : Check the major_capability_number */ if p_major_capability_number < MINIMUM_CAT_ENTRY | p_major_capability_number > MAXIMUM_CAT_ENTRY then do; call fatal_mowse_trap_ (ws_error_$invalid_capability_number); return; end; /* : Find the remote cat table entry associated with input parameters If it is not found then return ws_error_$invalid_capability_number */ call capability_$unpack (sysid, cap_numb, (mowse_info_ptr -> mowse_info.remote_cat (p_major_capability_number) .major_capability), p_code); if p_code ^= 0 | cap_numb ^= p_major_capability_number then do; call fatal_mowse_trap_ (ws_error_$invalid_capability_number); return; end; /* : re - initialize the remote cat entry */ mowse_info_ptr -> mowse_info.remote_cat (p_major_capability_number) .major_capability = 0; mowse_info_ptr -> mowse_info.remote_cat (p_major_capability_number) .capability_name = ""; mowse_info_ptr -> mowse_info.remote_cat (p_major_capability_number).flags .reset = "0"b; mowse_info_ptr -> mowse_info.remote_cat (p_major_capability_number).flags .suspended = "0"b; mowse_info_ptr -> mowse_info.remote_cat (p_major_capability_number) .sleep_time = FALSE; p_code = 0; return; %page; /* INCLUDE FILES */ %include mowse; %include mowse_info; /* : END */ end;  dtm.pl1 08/07/87 1554.6rew 08/07/87 1455.0 64539 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-08-14,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-08-28,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Looks for the switch attached to mowse_io_ rather than always to user_i/o. 3) change(86-10-07,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Removes the syn_ attached above mowse_io_. Change to find support new names for io switches, added call to flush both subchannels being transmitted. 4) change(86-10-09,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Masked around critical switch movements. 5) change(86-10-10,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Look for user_terminal_ as we cannot detach with the video system invoked. 6) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. 7) change(86-12-03,Flegel), approve(86-12-03,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Removed flushing of background subchannel. 8) change(86-12-11,Flegel), approve(86-12-11,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Removed external static "interactive_initiated_disconnect" and replaced with a call iox_$close_file to mowse_i/o to tell mowse_io_ what kind of disconnect to perform with the PC. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ dtm: detach_mowse: proc (); /* : PROGRAM FUNCTION Detach the MOWSE environment. */ /* : NOTES */ /* MISC VARIABLES */ dcl new_mask bit (36) aligned; /* IPS mask */ dcl old_mask bit (36) aligned; /* IPS mask */ dcl syn_iocb_ptr ptr; /* The iocb attached to the syn_ for mowse_i/o */ dcl iocb_ptr ptr; /* The iocb attached before mowse_io_ */ dcl mowse_iocb_ptr ptr; dcl code fixed bin (35); /* STRUCTURES */ dcl 01 fsc like mowse_io_flush_subchannel_info automatic; /* EXTERNAL STATIC */ /* SYSTEM CALLS */ dcl hcs_$set_ips_mask entry (bit (36) aligned, bit (36) aligned); dcl hcs_$reset_ips_mask entry (bit (36) aligned, bit (36) aligned); dcl iox_$control entry (ptr, char (*), ptr, fixed bin (35)); dcl terminate_process_ entry (char (*), ptr); dcl iox_$destroy_iocb entry (ptr, fixed bin (35)); dcl iox_$look_iocb entry (char (*), ptr, fixed bin (35)); dcl com_err_ entry () options (variable); dcl iox_$move_attach entry (ptr, ptr, fixed bin (35)); dcl iox_$detach_iocb entry (ptr, fixed bin (35)); dcl iox_$close entry (ptr, fixed bin (35)); dcl iox_$close_file entry (ptr, char (*), fixed bin (35)); /* SYSTEM CALL SUPPORT */ dcl ws_error_$ws_video_invoked fixed bin (35) ext static; dcl error_table_$unable_to_do_io fixed bin (35) ext static; /* EXTERNAL CALLS */ dcl get_at_ entry (char (*), char (*), ptr, fixed bin (35)); /* EXTERNAL CALL SUPPORT */ /* BUILTINS */ dcl addr builtin; /* CONDITIONS */ /* CONSTANTS */ dcl dtm_name char (12) int static options (constant) init ("detach_mowse"); /* */ /* INITIALIZATION */ /* MAIN */ /* : If mowse_i/o not found, return */ call iox_$look_iocb ("mowse_tty", mowse_iocb_ptr, code); if code ^= 0 then do; call com_err_ (code, dtm_name, "While looking for mowse_tty."); return; end; /* : Find the mowse_i/o switch */ call iox_$look_iocb ("mowse_i/o", syn_iocb_ptr, code); if code ^= 0 then do; call com_err_ (code, dtm_name, "While looking for mowse_i/o."); return; end; /* : Look for the user_terminal_ IOCB so that if it exists, the detachment will fail */ call iox_$look_iocb ("user_terminal_", iocb_ptr, code); if code = 0 then do; call com_err_ (ws_error_$ws_video_invoked, dtm_name, "MOWSE not detached."); return; end; /* : Flush both FG and BG subchannels */ fsc.version = mowse_io_info_version_1; fsc.subchannel = FG; call iox_$control (syn_iocb_ptr, "flush_subchannel", addr (fsc), (0)); /* : Find the switch attached to mowse_io_ */ call get_at_ ("syn_", "mowse_i/o", iocb_ptr, code); if code ^= 0 then do; call com_err_ (code, dtm_name, "Finding iocb attached to mowse_io_."); return; end; /* : Close MOWSE */ call iox_$close_file (iocb_ptr, "confirmed_disconnect", code); if code ^= 0 then do; call com_err_ (code, dtm_name, "While closing ^a.", iocb_ptr -> iocb.name); return; end; /* : Detach MOWSE */ new_mask = ""b; call hcs_$set_ips_mask (new_mask, old_mask); call iox_$detach_iocb (iocb_ptr, code); if code ^= 0 then do; call hcs_$reset_ips_mask (old_mask, new_mask); call fatal_return (); end; /* : Attach the iocb above mowse_i/o to tty_ */ call iox_$move_attach (mowse_iocb_ptr, iocb_ptr, code); if code ^= 0 then do; call hcs_$reset_ips_mask (old_mask, new_mask); call fatal_return (); end; call hcs_$reset_ips_mask (old_mask, new_mask); /* : Destroy the iocb to mowse_tty (it is in limbo as the switches have been moved around from foo_i/o to tty_) */ call iox_$destroy_iocb (mowse_iocb_ptr, code); if code ^= 0 then do; call com_err_ (code, dtm_name, "Destroying ^a.", mowse_iocb_ptr -> iocb.name); return; end; /* : Close the mowse_i/o (It better be there or all of MOWSE would not have been working properly) */ call iox_$close (syn_iocb_ptr, (0)); call iox_$detach_iocb (syn_iocb_ptr, (0)); call iox_$destroy_iocb (syn_iocb_ptr, (0)); /* */ /* INTERNAL PROCEDURES */ /* : *** fatal_return: Internal procedure for detach_mowse *** */ fatal_return: proc (); /* : PROCEDURE FUNCTION Invoke a call to terminate_process because something really bad has happened. */ /* STRUCTURES */ dcl 01 fatal_error_info aligned, 02 version fixed bin, /* Must be 0 */ 02 status_code fixed bin (35); /* Error code to terminate_process_ */ fatal_error_info.version = 0; fatal_error_info.status_code = error_table_$unable_to_do_io; call terminate_process_ ("fatal_error", addr (fatal_error_info)); end fatal_return; %page; /* INCLUDE FILES */ %include iocbv; %include mowse_messages; %include mowse_io_control_info; %include mowse; /* : END */ end;  execom_.pl1 08/07/87 1554.6rew 08/07/87 1454.9 36396 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-08-28,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. 3) change(86-12-10,Flegel), approve(86-12-10,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Replaced signalling of mowse_fatal_error with a call to fatal_mowse_trap_. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ execom_: proc (p_mcb_ptr, p_com_len, p_command, p_cmd_id, p_system, p_major_cap, p_ecode); /* : PROGRAM FUNCTION Handles EXECUTE_COMMAND messages sent to internal mowse from some system. */ /* : NOTES */ /* INPUT PARAMETERS */ dcl p_mcb_ptr ptr parameter; /* mowse mcb pointer */ dcl p_com_len fixed bin parameter; /* length of command */ dcl p_command char (*) parameter; /* command to be executed */ dcl p_cmd_id fixed bin parameter; /* unique command id */ dcl p_system fixed bin parameter; /* MOWSE system */ dcl p_major_cap fixed bin parameter; /* major capability number (index into CAT tables) */ /* OUTPUT PARAMETERS */ dcl p_ecode fixed bin (35); /* return code */ /* MISC VARIABLES */ dcl return_status fixed bin; /* status to be returned in reply message */ dcl dest_maj fixed bin; /* destination major capability */ /* STRUCTURES */ dcl 01 data, 02 cmd_id fixed bin (17) unal, 02 status char unal; /* SYSTEM CALLS */ dcl send_msg_ entry (ptr, fixed bin, fixed bin, ptr, fixed bin, fixed bin, fixed bin (35)); dcl capability_$pack entry (fixed bin, fixed bin, fixed bin, fixed bin (35)); dcl cu_$cp entry (ptr, fixed bin (21), fixed bin (35)); /* EXTERNAL CALLS */ dcl fatal_mowse_trap_ entry (fixed bin (35)); /* EXTERNAL CALL SUPPORT */ /* BUILTINS */ dcl addr builtin; dcl byte builtin; dcl length builtin; /* CONDITIONS */ dcl cleanup condition; /* */ /* INITIALIZATION */ p_ecode = 0; on cleanup begin; data.cmd_id = p_cmd_id; data.status = byte (STATUS_FAILED); call send_msg_ (p_mcb_ptr, dest_maj, EXECUTE_COMMAND_REPLY, addr (data), 3, BG, p_ecode); if p_ecode ^= 0 then do; call fatal_mowse_trap_ (p_ecode); goto ERROR_RETURN; end; end; /* MAIN */ /* : Evaluate destination major first in case we blow up */ call capability_$pack (p_system, p_major_cap, dest_maj, p_ecode); if p_ecode ^= 0 then do; call fatal_mowse_trap_ (p_ecode); return; end; /* : Execute command */ call cu_$cp (addr (p_command), length (p_command), p_ecode); /* : if execution fails then - send a EXECUTE_COMMAND_REPLY message with the status = STAUS_FAILED - else send one with STATUS_SUCCESS.*/ if p_ecode ^= 0 then return_status = STATUS_FAILED; else return_status = STATUS_SUCCESS; data.cmd_id = p_cmd_id; data.status = byte (return_status); call send_msg_ (p_mcb_ptr, dest_maj, EXECUTE_COMMAND_REPLY, addr (data), 3, BG, p_ecode); if (p_ecode ^= 0) then do; call fatal_mowse_trap_ (p_ecode); return; end; return; ERROR_RETURN: return; %page; /* INCLUDE FILES */ %include mowse; %include mowse_messages; /* : END */ end;  external_mowse_.pl1 08/07/87 1554.6rew 08/07/87 1454.9 217647 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-08-27,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-10-22,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Modified code to handle the special mowse message responsible for resetting, suspending, resuming and terminating a capability. 3) change(86-10-22,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Modified code to handle messages with invalid destinations. 4) change(86-11-14,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Changed method of implementation of messages for suspended applications. 5) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. 6) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Clear the application output buffers when a FAIL_CAPABILITY message is received. 7) change(86-12-10,Flegel), approve(86-12-10,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Replaced signalling of mowse_fatal_error with a call to fatal_mowse_trap_. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ external_mowse_: proc (p_mowse_mcb_ptr, p_major, p_minor, p_mess_ptr, p_mess_len, p_ecode); /* : PROGRAM FUNCTION Places messages in the buffers associated with the capability to which a message is 'addressed'. Should a message be longer than the pre-defined packet size the routine handles the reassembling of the complete message from the several partial messages transmitted. The routine also handles the disassembly of long messages destined for some remote capability. A functionally identical routine exists on remote system within the mowse environment. */ /* : NOTES */ /* INPUT PARAMETERS */ dcl p_mowse_mcb_ptr ptr parameter; /* mcb for mowse_io_ */ dcl p_major fixed bin parameter; /* Major cap number */ dcl p_minor fixed bin parameter; /* Minor cap number */ dcl p_mess_ptr ptr parameter; /* Message pointer */ dcl p_mess_len fixed bin parameter; /* Message length */ dcl p_ecode fixed bin (35) parameter; /* Error code */ /* SYSTEM CALL SUPPORT */ dcl ws_error_$input_buffer_overflow fixed bin (35) ext static; /* EXTERNAL CALLS */ dcl prepare_trace_ entry (ptr, fixed bin, ptr, fixed bin); dcl mowse_error_handler_ entry (ptr, fixed bin, fixed bin); dcl send_mowse_message_ entry (ptr, fixed bin, fixed bin, fixed bin, fixed bin, fixed bin, fixed bin, ptr, fixed bin, fixed bin, fixed bin (35)); dcl get_mowse_info_ptr_ entry (ptr, ptr, fixed bin (35)); dcl send_outbuff_data_ entry (ptr, fixed bin, fixed bin, fixed bin, fixed bin (35)); dcl send_msg_ entry (ptr, fixed bin, fixed bin, ptr, fixed bin, fixed bin, fixed bin (35)); dcl capability_$pack entry (fixed bin, fixed bin, fixed bin, fixed bin (35)); dcl message_manager_ entry (ptr, fixed bin, fixed bin, ptr, fixed bin, fixed bin (35)); dcl release_outbuffer_ entry (ptr); dcl fatal_mowse_trap_ entry (fixed bin (35)); /* EXTERNAL CALL SUPPORT */ dcl ws_error_$recursive_background_error fixed bin (35) ext static; /* MISC VARIABLES */ dcl mowse_info_ptr ptr; /* Pointer to mowse info structure */ dcl destination fixed bin; /* Destination of failure message */ dcl mcb_ptr ptr; dcl msg_type fixed bin; /* BUILTINS */ dcl null builtin; dcl rank builtin; /* STRUCTURES */ /* CONDITIONS */ dcl any_other condition; /* CONSTANTS */ dcl TRUE bit (1) int static options (constant) init ("1"b); dcl FALSE bit (1) int static options (constant) init ("0"b); /* */ /* INITIALIZATION */ p_ecode = 0; call get_mowse_info_ptr_ (p_mowse_mcb_ptr, mowse_info_ptr, p_ecode); if p_ecode ^= 0 then return; /* Establish handler */ mowse_info_ptr -> mowse_info.mowse_flags.error_handled = FALSE; on any_other begin; call mowse_error_handler_ (p_mowse_mcb_ptr, p_major, p_minor); goto CAPABILITY_ERROR_RETURN; end; /* MAIN */ /* : If message_ptr is null, return */ if p_mess_ptr = null then return; msg_type = rank (p_mess_ptr -> event_message.header.msg_type); /* : Call trace message to print message received */ if mowse_info_ptr -> mowse_info.mowse_flags.trace = TRUE then call prepare_trace_ (p_mess_ptr, p_mess_len, mowse_info_ptr -> mowse_info.mowse_flags.trace_file_iocb, p_minor); /* : If invalid application, send a fail to source */ if (p_major < MINIMUM_CAT_ENTRY) | (p_major > MAXIMUM_CAT_ENTRY) then do; call send_fail (p_mess_ptr, p_minor, p_mowse_mcb_ptr, p_ecode); if p_ecode ^= 0 then return; end; /* : If destination MCB does not exist, send fail to source */ mcb_ptr = mowse_info_ptr -> mowse_info.local_cat (p_major).mcb_ptr; if mcb_ptr = null then do; call send_fail (p_mess_ptr, p_minor, p_mowse_mcb_ptr, p_ecode); if p_ecode ^= 0 then return; end; /* : MORE message */ if msg_type = MORE then do; call external_more (mowse_info_ptr, mcb_ptr, p_mess_ptr, p_mess_len, p_ecode); return; end; /* : CONTINUE message */ if msg_type = CONTINUE then do; call external_continue (mcb_ptr, p_mowse_mcb_ptr, p_mess_ptr, p_mess_len, p_major, p_minor, p_ecode); return; end; /* : TERMINATE_APPLICATION message */ if p_minor = TERMINATE_APPLICATION then do; call external_terminate (mowse_info_ptr, mcb_ptr, p_mess_ptr, p_mess_len, p_ecode); return; end; /* : RESET_APPLICATION message */ if p_minor = RESET_APPLICATION then do; call external_reset (mcb_ptr, p_major, mowse_info_ptr, p_mess_ptr, p_mess_len, p_ecode); return; end; /* : FAIL_CAPABILITY or SYSTEM_ERROR message */ if p_minor = FAIL_CAPABILITY | p_minor = SYSTEM_ERROR then do; call external_fail (mcb_ptr, p_major, mowse_info_ptr, p_mess_ptr, p_mess_len, p_ecode); return; end; /* : SUSPEND_APPLICATION message */ if p_minor = SUSPEND_APPLICATION then do; call external_suspend (mcb_ptr, mowse_info_ptr, p_mess_ptr, p_mess_len, p_major, p_ecode); return; end; /* : RESUME_APPLICATION message */ if p_minor = RESUME_APPLICATION then do; call external_resume (mcb_ptr, mowse_info_ptr, p_mess_ptr, p_mess_len, p_ecode); return; end; /* : DEFAULT message (any other) */ call message_processor (mowse_info_ptr, mcb_ptr, p_mess_ptr, p_mess_len, p_minor, p_ecode); p_ecode = 0; return; /* : Termination of application performed in the event of an "any_other". This is the control point of a non-local goto in the event of any condition signalled by the capability. The capability is unwound from the stack (via the goto) and is removed from MOWSE because of its error. */ CAPABILITY_ERROR_RETURN: p_ecode = 0; call capability_$pack ( rank (p_mess_ptr -> last_message.header.source_system), rank (p_mess_ptr -> last_message.header.source_major), destination, p_ecode); if p_ecode = 0 & rank (p_mess_ptr -> last_message.header.source_major) ^= INTERNAL then call send_msg_ (p_mowse_mcb_ptr, destination, FAIL_CAPABILITY, null, 0, BG, p_ecode); p_ecode = 0; call get_mowse_info_ptr_ (p_mowse_mcb_ptr, mowse_info_ptr, p_ecode); if (p_ecode ^= 0) then return; if (mowse_info_ptr = null) then return; if mowse_info_ptr -> mowse_info.mowse_flags.error_handled then do; mowse_info_ptr -> mowse_info.mowse_flags.error_handled = FALSE; revert any_other; call fatal_mowse_trap_ (ws_error_$recursive_background_error); return; end; /* */ /* INTERNAL PROCEDURES */ /* : *** Procedure: message_processor - Internal proc for external_mowse_ *** */ message_processor: proc (p_mowse_info_ptr, p_mcb_ptr, p_message_ptr, p_message_len, p_minor, p_code); /* : PROCEDURE FUNCTION Take the current message and processes it accordingly. */ /* INPUT PARAMETERS */ dcl p_mowse_info_ptr ptr parameter; /* MOWSE info */ dcl p_minor fixed bin parameter; /* Minor of message */ dcl p_message_len fixed bin; /* Length of message */ dcl p_mcb_ptr ptr parameter; /* Applciation's MCB */ dcl p_message_ptr ptr parameter; /* Message */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35) parameter; /* MISC VARIABLES */ dcl major fixed bin; /* Destination major */ dcl minor fixed bin; /* Minor to be passed */ dcl source_major fixed bin; /* Packed major capability of source */ dcl code fixed bin (35); /* Internal error code */ dcl source_major_num fixed bin; /* Sourc emajor of message */ dcl source_system fixed bin; /* Source system of message */ /* INITIALIZATION */ p_code = 0; source_system = rank (p_message_ptr -> last_message.header.source_system); source_major_num = rank (p_message_ptr -> last_message.header.source_major); call message_manager_ (p_mcb_ptr, LAST, source_major_num, p_message_ptr, p_message_len, code); /* : set the data_length field and the input buffer position so that the next block of data gets placed at the beginning of the buffer */ p_mcb_ptr -> mcb.inbuff_data_length = p_mcb_ptr -> mcb.inbuff_position_index; p_mcb_ptr -> mcb.inbuff_position_index = 0; call capability_$pack (source_system, source_major_num, source_major, p_code); if p_code ^= 0 then return; /* : If suspended and the message is not resume or terminate, send a fail to the source */ major = rank (p_message_ptr -> last_message.header.major); if p_mowse_info_ptr -> mowse_info.local_cat (major).flags.suspended & p_minor ^= TERMINATE_APPLICATION & p_minor ^= RESUME_APPLICATION & p_minor ^= SUSPEND_APPLICATION then do; if source_major_num = INTERNAL then return; call send_msg_ (p_mcb_ptr, source_major, FAIL_CAPABILITY, null, 0, BG, p_ecode); return; end; /* : If there is an overflow, call the application with the overflow minor Else pass the message on */ minor = p_minor; if code = ws_error_$input_buffer_overflow then minor = OVERFLOWED_BUFFER; /* : All parameters MUST be passed by value as we cannot allow the application to modify them */ call p_mcb_ptr -> mcb.entry_var ((minor), (source_major), (p_mcb_ptr -> mcb.inbuff), (p_mcb_ptr -> mcb.inbuff_data_length), (p_mcb_ptr), (p_mcb_ptr -> data_block_ptr)); end message_processor; /* */ /* : *** Procedure: external_resume - Internal proc for external_mowse_ *** */ external_resume: proc (p_mcb_ptr, p_mowse_info_ptr, p_message_ptr, p_message_len, p_code); /* : PROCEDURE FUNCTION If the suspend flag is set then reset it and call the application, otherwise ignore the message. */ /* INPUT PARAMETERS */ dcl p_message_len fixed bin parameter; /* Length of message */ dcl p_mcb_ptr ptr parameter; /* MCB of application */ dcl p_message_ptr ptr parameter; /* Message */ dcl p_mowse_info_ptr ptr parameter; /* MOWSE info */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35) parameter; /* MISC VARIABLES */ /* INITIALIZATION */ p_code = 0; /* : If the suspend flag is not set then ignore */ if ^p_mowse_info_ptr -> mowse_info.local_cat (p_major).flags.suspended then do; p_mcb_ptr -> inbuff_position_index = 0; p_mcb_ptr -> inbuff_data_length = 0; return; end; /* : Set the flag and pass the message to the application */ p_mowse_info_ptr -> mowse_info.local_cat (p_major).flags.suspended = FALSE; p_mcb_ptr -> mcb.inbuff_position_index = 0; p_mcb_ptr -> mcb.inbuff_data_length = 0; call message_processor (p_mowse_info_ptr, p_mcb_ptr, p_message_ptr, p_message_len, RESUME_APPLICATION, p_code); end external_resume; /* */ /* : *** Procedure: external_suspend - Internal proc for external_mowse_ *** */ external_suspend: proc (p_mcb_ptr, p_mowse_info_ptr, p_message_ptr, p_message_len, p_major, p_code); /* : PROCEDURE FUNCTION If suspended flag is NOT set then set the suspended flag and pass the message to the application */ /* INPUT PARAMETERS */ dcl p_message_len fixed bin parameter; /* Length of message */ dcl p_mcb_ptr ptr parameter; /* MCB of application */ dcl p_message_ptr ptr parameter; /* Message */ dcl p_major fixed bin parameter; /* Major capability of this application */ dcl p_mowse_info_ptr ptr parameter; /* MOWSE info */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35) parameter; /* MISC VARIABLES */ /* INITIALIZATION */ p_code = 0; /* : If already suspended, then return */ if p_mowse_info_ptr -> mowse_info.local_cat (p_major).flags.suspended then do; p_mcb_ptr -> inbuff_position_index = 0; p_mcb_ptr -> inbuff_data_length = 0; return; end; /* : Else set the flag and pass the message to the application */ p_mowse_info_ptr -> mowse_info.local_cat (p_major).flags.suspended = TRUE; p_mcb_ptr -> mcb.inbuff_data_length = 0; p_mcb_ptr -> mcb.inbuff_position_index = 0; call message_processor (p_mowse_info_ptr, p_mcb_ptr, p_message_ptr, p_message_len, SUSPEND_APPLICATION, p_code); end external_suspend; /* */ /* : *** Procedure: external_fail - Internal proc for external_mowse_ *** */ external_fail: proc (p_mcb_ptr, p_major, p_mowse_info_ptr, p_message_ptr, p_message_len, p_code); /* : PROCEDURE FUNCTION Clear out the application's output buffer cause it was trying to send stuff which caused a screwup. */ /* INPUT PARAMETERS */ dcl p_major fixed bin parameter; /* Major of message */ dcl p_message_len fixed bin parameter; /* Length of message */ dcl p_message_ptr ptr parameter; /* Message */ dcl p_mcb_ptr ptr parameter; /* Application's MCB */ dcl p_mowse_info_ptr ptr parameter; /* MOWSE info */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35); /* MISC VARIABLES */ /* INITIALIZATION */ p_code = 0; /* : Empty out all stored messages in output buffer */ call release_outbuffer_ (p_mcb_ptr); /* : Call the application */ call message_processor (p_mowse_info_ptr, p_mcb_ptr, p_message_ptr, p_message_len, FAIL_CAPABILITY, p_code); if p_code ^= 0 then return; end external_fail; /* */ /* : *** Procedure: external_reset - Internal proc for external_mowse_ *** */ external_reset: proc (p_mcb_ptr, p_major, p_mowse_info_ptr, p_message_ptr, p_message_len, p_code); /* : PROCEDURE FUNCTION Set the reset flag and pass the message to the application only if the flag was not already set. */ /* INPUT PARAMETERS */ dcl p_major fixed bin parameter; /* Major of message */ dcl p_message_len fixed bin parameter; /* Length of message */ dcl p_message_ptr ptr parameter; /* Message */ dcl p_mcb_ptr ptr parameter; /* Application's MCB */ dcl p_mowse_info_ptr ptr parameter; /* MOWSE info */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35); /* MISC VARIABLES */ dcl source_major fixed bin; /* Packed source major capability */ dcl source_system fixed bin; /* Source system of message */ /* INITIALIZATION */ p_code = 0; /* : If the flag is already set, ignore the message */ if p_mowse_info_ptr -> mowse_info.local_cat (p_major).flags.reset then return; /* : Set the flag and pass the message to the application */ p_mowse_info_ptr -> mowse_info.local_cat (p_major).flags.reset = TRUE; /* : Empty out all stored messages */ p_mcb_ptr -> mcb.inbuff_position_index = 0; p_mcb_ptr -> mcb.inbuff_data_length = 0; call release_outbuffer_ (p_mcb_ptr); /* : Call the application */ call message_processor (p_mowse_info_ptr, p_mcb_ptr, p_message_ptr, p_message_len, RESET_APPLICATION, p_code); if p_code ^= 0 then return; /* : Send the reset reply to the source system's MOWSE capability only if the source is on a remote system */ p_mowse_info_ptr -> mowse_info.local_cat (p_major).flags.reset = FALSE; source_system = rank (p_message_ptr -> last_message.header.source_system); if source_system = LOCAL_SYSTEM then return; call capability_$pack (source_system, INTERNAL, source_major, p_code); if p_code ^= 0 then return; call send_msg_ (p_mcb_ptr, source_major, RESET_REPLY, null, 0, BG, p_code); end external_reset; /* */ /* : *** Procedure: external_terminate - Internal proc for external_mowse_ *** */ external_terminate: proc (p_mowse_info_ptr, p_mcb_ptr, p_message_ptr, p_message_len, p_code); /* : PROCEDURE FUNCTION Handle the functions necessary for passing on a terminate message. */ /* INPUT PARAMETERS */ dcl p_mowse_info_ptr ptr parameter; /* MOWSE info */ dcl p_message_len fixed bin parameter; /* Length of message */ dcl p_message_ptr ptr parameter; /* Message */ dcl p_mcb_ptr ptr parameter; /* Application's MCB */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35) parameter; /* MISC VARIABLES */ /* INITIALIZATION */ p_code = 0; /* : Clear the suspend flag */ mowse_info_ptr -> mowse_info.local_cat (p_major).flags.suspended = FALSE; /* : Pass on the message */ mcb_ptr -> mcb.inbuff_position_index = 0; mcb_ptr -> mcb.inbuff_data_length = 0; call message_processor (p_mowse_info_ptr, p_mcb_ptr, p_message_ptr, p_message_len, TERMINATE_APPLICATION, p_code); end external_terminate; /* */ /* : *** Procedure: external_continue - Internal proc for external_mowse_ *** */ external_continue: proc (p_mcb_ptr, p_mowse_mcb_ptr, p_message_ptr, p_message_len, p_major, p_minor, p_code); /* : PROCEDURE FUNCTION Place the message in a buffer associated with the source of the message. If for some reason the applications mcb is not valid then return a FAIL_CAPABILITY to the source of the message to indicate the the capability failed. */ /* INPUT PARAMETERS */ dcl p_mcb_ptr ptr parameter; /* MCB of capability */ dcl p_minor fixed bin parameter; /* Minor of message */ dcl p_major fixed bin parameter; /* Major of destination */ dcl p_mowse_mcb_ptr ptr parameter; /* Mowse's MCB */ dcl p_message_len fixed bin parameter; /* Length of message */ dcl p_message_ptr ptr parameter; /* Message */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35) parameter; /* MISC VARIABLES */ dcl dest_system fixed bin; /* Destination system id of message */ dcl source_major_num fixed bin; /* Source major number of message */ dcl source_system fixed bin; /* Source system of message */ /* INITIALIZATION */ p_code = 0; source_system = rank (p_message_ptr -> more_remaining_message.header.source_system); source_major_num = rank (p_message_ptr -> more_remaining_message.header.source_major); dest_system = rank (p_message_ptr -> more_remaining_message.header.system); /* : If the source major is invalid, then ignore the message */ if (source_major_num < MINIMUM_CAT_ENTRY) | (source_major_num > MAXIMUM_CAT_ENTRY) then return; /* : Manipulate the message into the queues of the application */ call message_manager_ (p_mcb_ptr, CONTINUE, source_major_num, p_message_ptr, p_message_len, p_code); /* : Get the next portion from the source */ call send_mowse_message_ (p_mowse_mcb_ptr, source_system, source_major_num, dest_system, p_major, p_minor, MORE, null, 0, BG, p_code); end external_continue; /* */ /* : *** Procedure: external_more - Internal proc for external_mowse_ *** */ external_more: proc (p_mowse_info_ptr, p_mcb_ptr, p_message_ptr, p_message_len, p_code); /* : PROCEDURE FUNCTION Send another packet from the outbuffer to the capability requesting more data. */ /* INPUT PARAMETERS */ dcl p_mowse_info_ptr ptr parameter; /* MOWSE info */ dcl p_message_len fixed bin parameter; /* Length of message */ dcl p_mcb_ptr ptr parameter; /* MCB of destination capability */ dcl p_message_ptr ptr parameter; /* Message */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35); /* MISC VARIABLES */ dcl source_minor fixed bin; /* Source minor of message */ dcl source_major_num fixed bin; /* Source major of message */ dcl source_system fixed bin; /* Source system of message */ /* INITIALIZATION */ p_code = 0; source_system = rank (p_message_ptr -> request_more_message.header.source_system); source_major_num = rank (p_message_ptr -> request_more_message.header.source_major); source_minor = rank (p_message_ptr -> request_more_message.header.source_minor); /* : If source major or minor is invalid, ignore message */ if (source_major_num < MINIMUM_CAT_ENTRY) | (source_major_num > MAXIMUM_CAT_ENTRY) | (source_minor < MINIMUM_SYSTEM_MINOR) | (source_minor > MAXIMUM_USER_MINOR) then return; call send_outbuff_data_ (p_mcb_ptr, source_system, source_major_num, source_minor, p_code); if p_code = 0 then return; /* : If something went wrong with the next portion, send a FAIL capability to this application */ p_mcb_ptr -> mcb.inbuff_position_index = 0; p_mcb_ptr -> mcb.inbuff_data_length = 0; call message_processor (p_mowse_info_ptr, p_mcb_ptr, p_message_ptr, p_message_len, FAIL_CAPABILITY, p_code); end external_more; /* */ /* : *** Procedure: send_fail - Internal proc for external_mowse_ *** */ send_fail: proc (p_message_ptr, p_minor, p_mowse_mcb_ptr, p_code); /* : PROCEDURE FUNCTION Determine if it is valid to send a FAIL_CAPABILITY message to the source of the message, if so then send it. */ /* INPUT PARAMETERS */ dcl p_minor fixed bin parameter; /* Minor capability number */ dcl p_mowse_mcb_ptr ptr parameter; /* MOWSE's MCB */ dcl p_message_ptr ptr parameter; /* Invalid message destination */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35) parameter; /* MISC VARIABLES */ dcl destination fixed bin; /* Destination capability of fail */ /* INITIALIZATION */ p_code = 0; if p_minor = EXECUTE_COMMAND_REPLY | p_minor = FAIL_CAPABILITY | p_minor = RESET_REPLY | p_minor = QUERY_REPLY | p_minor = RESPONSE_CONNECT | p_minor = RESPONSE_DISCONNECT then do; p_code = 0; return; end; call capability_$pack ( rank (p_message_ptr -> last_message.header.source_system), rank (p_message_ptr -> last_message.header.source_major), destination, p_code); if p_ecode ^= 0 then do; p_code = 0; return; end; call send_msg_ (p_mowse_mcb_ptr, destination, FAIL_CAPABILITY, null, 0, BG, p_code); end send_fail; /* */ %page; /* INCLUDE FILES */ %include "mowse"; %include "mowse_info"; %include "mowse_mcb"; %include "mowse_messages"; /* : END external_mowse_ */ end external_mowse_;  fatal_mowse_trap_.pl1 08/07/87 1554.6rew 08/07/87 1454.9 21825 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-12-10,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ fatal_mowse_trap_: proc (p_code); /* : PROGRAM FUNCTION Perform the necessary functions when a bizzarre condition error has occurred within MOWSE itself. Such conditions are invalid message formats, etc. */ /* : NOTES This version prints out a message asking the user to perform certain functions and then submitting the results to the maintaining personell. */ /* INPUT PARAMETERS */ dcl p_code fixed bin (35); /* Code at time of error */ /* OUTPUT PARAMETERS */ /* MISC VARIABLES */ dcl short_info char (8) aligned; dcl long_info char (100) aligned; /* SYSTEM CALLS */ dcl com_err_$convert_status_code_ entry (fixed bin (35), char (8) aligned, char (100) aligned); dcl ioa_$ioa_switch entry () options (variable); dcl cu_$cl entry (1 aligned, 2 bit (1) unal, 2 bit (35) unal); /* SYSTEM CALL SUPPORT */ dcl iox_$error_output ptr ext static; /* CONDITIONS */ /* STRUCTURES */ dcl 01 flags aligned, 02 reset_sw bit (1) unal, 02 mbz bit (35) unal; /* */ /* INITIALIZATION */ flags.reset_sw = "0"b; /* MAIN */ call com_err_$convert_status_code_ (p_code, short_info, long_info); call ioa_$ioa_switch (iox_$error_output, "MOWSE: ^a^/^a^/^a^/^5t^a^/", long_info, "An abnormal condition has occurred within MOWSE. Please execute the", "following command and submit the results to maintenance:", """fo mowse_error.info; trace_stack -long; ro"""); call cu_$cl (flags); %page; /* INCLUDE FILES */ /* : END */ end fatal_mowse_trap_;  find_free_cat_entry_.pl1 08/07/87 1554.5rew 08/07/87 1454.9 20412 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-07-01,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ find_free_cat_entry_: proc (p_mowse_info_ptr, p_cat_entry_index, p_code); /* : PROGRAM FUNCTION Finds the first free cat index in the local CAT table. */ /* : NOTES */ /* INPUT PARAMETERS */ dcl p_mowse_info_ptr ptr; /* Pointer to mowse info structure */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35); /* Error code */ dcl p_cat_entry_index fixed bin; /* index into cat table which is free */ /* MISC VARIABLES */ dcl i fixed bin; /* counter */ /* STRUCTURES */ /* SYSTEM CALLS */ /* SYSTEM CALL SUPPORT */ dcl ws_error_$cant_create_instance fixed bin (35) ext static; /* EXTERNAL CALLS */ /* EXTERNAL CALL SUPPORT */ /* BUILTINS */ dcl null builtin; /* CONDITIONS */ /* CONSTANTS */ /* */ /* INITIALIZATION */ /* MAIN */ /* : Find the first free one sequentially starting from MINIMUM_CAT_ENTRY to MAXIMUM_CAT_ENTRY */ do i = MINIMUM_CAT_ENTRY to MAXIMUM_CAT_ENTRY; if (p_mowse_info_ptr -> mowse_info.local_cat (i).mcb_ptr = null ()) then do; p_cat_entry_index = i; p_code = 0; return; end; end; /* : Return error p_code if no free entry is found */ p_code = ws_error_$cant_create_instance; %page; /* INCLUDE FILES */ %include mowse_info; /* : END */ end;  find_mowse_io_.pl1 08/07/87 1554.5rew 08/07/87 1454.9 18189 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-08-14,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-08-18,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Redesign to look at N iocbs rather than traverse a chain as mowse_io_ could be attached to something not associated with user_i/o. 3) change(86-10-08,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Looks for the switch name "mowse_i/o" rather than every switch to find what is attached to what. 4) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ find_mowse_io_: proc (p_iocb_ptr, p_code); /* : PROGRAM FUNCTION Find the iocb_ptr of the switch which is attached to mowse_io_. */ /* : NOTES */ /* INPUT PARAMETERS */ dcl p_iocb_ptr ptr; /* Pointer to iocb which is above tty_ */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35); /* SYSTEM CALLS */ dcl iox_$look_iocb entry (char (*), ptr, fixed bin (35)); /* */ /* INITIALIZATION */ p_code = 0; /* MAIN */ call iox_$look_iocb ("mowse_i/o", p_iocb_ptr, p_code); %page; /* INCLUDE FILES */ /* : END */ end;  get_at_.pl1 08/07/87 1554.5rew 08/07/87 1454.9 35289 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-09-01,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-10-07,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Allowed to provide a match to a second parameter in the attach description for searching. 3) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ get_at_: proc (p_io_name, p_attached_to, p_iocb_ptr, p_code); /* : PROGRAM FUNCTION Find the iocb attached to before p_io_name. */ /* : NOTES If none can be found, p_code is set to error_table_$no_iocb and iocb_ptr is null. */ /* INPUT PARAMETERS */ dcl p_io_name char (*); /* IO module name to look for */ dcl p_attached_to char (*); /* Second name in description to look for */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35); dcl p_iocb_ptr ptr; /* Pointer to iocb which is above p_io_name */ /* MISC VARIABLES */ dcl right fixed bin; /* Right index into attach descript */ dcl left fixed bin; /* Left index into attach descript */ dcl atd_ptr ptr; /* Temp pointer to attach description */ dcl atd char (256) var based (atd_ptr); /* Attach description */ dcl switch_name char (256) var; dcl found bit (1); dcl code fixed bin (35); dcl iocb_ptr ptr; /* IOCB pointer */ /* SYSTEM CALLS */ dcl iox_$look_iocb entry (char (*), ptr, fixed bin (35)); /* SYSTEM CALL SUPPORT */ dcl error_table_$no_iocb fixed bin (35) ext static; dcl iox_$user_io ptr ext static; /* BUILTINS */ dcl null builtin; dcl index builtin; dcl length builtin; dcl ltrim builtin; dcl rtrim builtin; dcl substr builtin; /* */ /* INITIALIZATION */ p_code = 0; /* MAIN */ /* : Traverse the attach descriptions to find tty_ */ iocb_ptr = iox_$user_io; atd_ptr = iocb_ptr -> iocb.attach_descrip_ptr; found = "0"b; do while (^found); /* : - If found who is attached to p_io_name and p_attached_to if not null */ found = (ltrim (rtrim (substr (atd, 1, index (atd, " ") - 1))) = p_io_name); if found & p_attached_to ^= "" then found = (ltrim (rtrim (substr (atd, index (atd, " ") + 1, length (p_attached_to)))) = p_attached_to); /* : - Else get the next iocb -- Calculate the name of the next iocb */ if ^found then do; left = index (atd_ptr -> atd, " "); switch_name = ltrim (substr (atd_ptr -> atd, left)); right = index (switch_name, " "); if right ^= 0 then switch_name = rtrim (substr (switch_name, 1, right)); /* : -- Find next iocb, if none then error */ call iox_$look_iocb ( substr (switch_name, 1, length (switch_name)), iocb_ptr, code); if code ^= 0 | atd_ptr = null then do; p_code = error_table_$no_iocb; p_iocb_ptr = null; return; end; atd_ptr = iocb_ptr -> iocb.attach_descrip_ptr; end; end; /* : Found switch name */ p_iocb_ptr = iocb_ptr; %page; /* INCLUDE FILES */ %include iocbv; /* : END */ end get_at_;  get_mowse_info_ptr_.pl1 08/07/87 1554.5rew 08/07/87 1454.9 22995 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-07-24,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ get_mowse_info_ptr_: proc (p_mcb_ptr, p_mowse_info_ptr, p_code); /* : PROGRAM FUNCTION Gets the mowse info pointer from the mowse_i/o switch. */ /* : NOTES */ /* INPUT PARAMETERS */ dcl p_mcb_ptr ptr; /* Pointer to mcb of application issuing call */ /* OUTPUT PARAMETERS */ dcl p_mowse_info_ptr ptr; /* Pointer to mowse info structure */ dcl p_code fixed bin (35); /* Error code */ /* MISC VARIABLES */ /* STRUCTURES */ dcl 01 info like mowse_io_info; /* STRUCTURES */ /* SYSTEM CALLS */ dcl iox_$control entry (ptr, char (*), ptr, fixed bin (35)); /* SYSTEM CALL SUPPORT */ /* EXTERNAL CALLS */ /* EXTERNAL CALL SUPPORT */ dcl error_table_$unimplemented_version fixed bin (35) ext static; dcl ws_error_$invalid_mcb fixed bin (35) ext static; /* BUILTINS */ dcl addr builtin; dcl null builtin; /* CONDITIONS */ /* CONSTANTS */ /* */ /* INITIALIZATION */ /* MAIN */ if p_mcb_ptr = null () then do; p_code = ws_error_$invalid_mcb; return; end; p_mowse_info_ptr = null (); info.version = mowse_io_info_version_1; call iox_$control (p_mcb_ptr -> mcb.iocb_ptr, "get_mowse_info", addr (info), p_code); p_mowse_info_ptr = info.info_ptr; if p_code ^= 0 then return; if p_mowse_info_ptr -> mowse_info.version ^= MOWSE_VERSION_ then do; p_code = error_table_$unimplemented_version; return; end; %page; /* INCLUDE FILES */ %include mowse; %include mowse_mcb; %include mowse_info; %include mowse_io_control_info; /* : END */ end;  init_mowse_.pl1 08/07/87 1554.5rew 08/07/87 1454.9 60552 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-08-13,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-09-19,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Allowed up to 32 (number of cat entry) capabilities to be autoloaded. 3) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. 4) change(86-12-10,Flegel), approve(86-12-10,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Replaced signalling of mowse_fatal_error with a call to fatal_mowse_trap_. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ init_mowse_: proc (p_mowse_mcb_ptr, p_init_mowse_info_ptr, p_code); /* : PROGRAM FUNCTION Sets up tables required by MOWSE to allow the library functions supported to be performed. Sets flags used by mowse to determine information to display to users based on command line arguements given to atm (attach_mowse). */ /* : NOTES */ /* INPUT PARAMETERS */ dcl p_init_mowse_info_ptr ptr; /* Pointer to initialization info structure */ dcl p_mowse_mcb_ptr ptr parameter; /* Pointer to mowse mcb */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35) parameter; /* MISC VARIABLES */ dcl mowse_info_ptr ptr; /* Pointer to mowse_info_ structure */ dcl i fixed bin; /* Counter */ /* STRUCTURES */ dcl 01 io_info_store like mowse_io_store_info automatic; dcl 01 io_info_debug like mowse_io_debug_info automatic; dcl 01 io_info_trace like mowse_io_debug_info automatic; /* SYSTEM CALLS */ dcl iox_$control entry (ptr, char (*), ptr, fixed bin (35)); dcl ioa_$ioa_switch entry () options (variable); dcl get_temp_segment_ entry (char (*), ptr, fixed bin (35)); /* SYSTEM CALL SUPPORT */ dcl ws_error_$invalid_mcb fixed bin (35) ext static; /* EXTERNAL CALLS */ dcl execom_ entry (ptr, fixed bin, char (*), fixed bin, fixed bin, fixed bin, fixed bin (35)); /* EXTERNAL CALL SUPPORT */ /* BUILTINS */ dcl null builtin; dcl addr builtin; dcl length builtin; /* CONDITIONS */ /* CONSTANTS */ /* */ /* INITIALIZATION */ init_mowse_info_ptr = p_init_mowse_info_ptr; mowse_info_ptr = null; /* MAIN */ /* : Check mcb pointer */ if p_mowse_mcb_ptr = null then do; p_code = ws_error_$invalid_mcb; return; end; /* : Get temp_seg (MOWSE_) in which tables will be allocated. */ call get_temp_segment_ (temp_seg_name, mowse_info_ptr, p_code); if p_code ^= 0 then return; io_info_store.version = mowse_io_info_version_1; io_info_store.info_ptr = mowse_info_ptr; call iox_$control (p_mowse_mcb_ptr -> mcb.iocb_ptr, "store_mowse_info", addr (io_info_store), p_code); if p_code ^= 0 then return; /* : Initialize pointer to initialization info */ p_mowse_mcb_ptr -> mcb.mowse_info_ptr = mowse_info_ptr; mowse_info_ptr -> mowse_info.init_mowse_info_ptr = init_mowse_info_ptr; /* : Set version of mowse_info structure */ mowse_info_ptr -> mowse_info.version = MOWSE_VERSION_; /* : Initialize the CAT tables */ mowse_info_ptr -> mowse_info.local_cat (*).mcb_ptr = null; mowse_info_ptr -> mowse_info.local_cat (*).sleep_time = 1; mowse_info_ptr -> mowse_info.local_cat (*).flags.reset = "0"b; mowse_info_ptr -> mowse_info.local_cat (*).flags.suspended = "0"b; mowse_info_ptr -> mowse_info.local_cat (*).flags.status = "0"b; mowse_info_ptr -> mowse_info.remote_cat (*).major_capability = 0; mowse_info_ptr -> mowse_info.remote_cat (*).capability_name = ((32)" "); mowse_info_ptr -> mowse_info.remote_cat (*).flags.reset = "0"b; mowse_info_ptr -> mowse_info.remote_cat (*).flags.suspended = "0"b; mowse_info_ptr -> mowse_info.remote_cat (*).sleep_time = "0"b; /* : Initialize the message_manager_info substructure */ mowse_info_ptr -> mowse_info.message_manager_info.head_list_ptr = null; mowse_info_ptr -> mowse_info.message_manager_info.tail_list_ptr = null; mowse_info_ptr -> mowse_info.message_manager_info.pending_messages = 0; mowse_info_ptr -> mowse_info.mowse_flags.debug = "0"b; mowse_info_ptr -> mowse_info.mowse_flags.debug_file_iocb = null; mowse_info_ptr -> mowse_info.mowse_flags.trace = "0"b; mowse_info_ptr -> mowse_info.mowse_flags.trace_file_iocb = null; /* : Examine arguements given to mowse and perform the required tasks */ if init_mowse_info_ptr = null then return; if init_mowse_info.version ^= MOWSE_VERSION_ then return; if init_mowse_info.flags.debug_sw then do; io_info_debug.version = mowse_io_info_version_1; io_info_debug.segment_name = init_mowse_info.debug; call iox_$control (p_mowse_mcb_ptr -> mcb.iocb_ptr, "debug_on", addr (io_info_debug), p_code); if p_code ^= 0 then return; end; if init_mowse_info.flags.trace_sw then do; io_info_trace.version = mowse_io_info_version_1; io_info_trace.segment_name = init_mowse_info.trace; call iox_$control (p_mowse_mcb_ptr -> mcb.iocb_ptr, "trace_on", addr (io_info_trace), p_code); if p_code ^= 0 then return; call ioa_$ioa_switch (mowse_info_ptr -> mowse_info.mowse_flags.trace_file_iocb, "MOWSE MESSAGE TRACE^/format:" || "^/TRC : from :" || "^/: to :" || "^/: = " || "^/TRC Msg_type: : ^/" ); end; /* : Execute all of the startup capabilities specified */ i = 1; do while (init_mowse_info.startup (i) ^= "" & init_mowse_info.flags.start_up_sw); call execom_ (p_mowse_mcb_ptr, (length (init_mowse_info.startup (i))), (init_mowse_info.startup (i)), (0), (LOCAL_SYSTEM), (INTERNAL), p_code); if p_code ^= 0 then return; i = i + 1; end; %page; /* INCLUDE FILES */ %include mowse_io_control_info; %include mowse_mcb; %include mowse_info; %include mowse; /* : END */ end;  internal_connect_request_.pl1 08/07/87 1554.4rew 08/07/87 1454.9 53496 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-11-20,Flegel), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. 3) change(86-12-10,Flegel), approve(86-12-10,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Replaced signalling of mowse_fatal_error with a call to fatal_mowse_trap_. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ internal_connect_request_: proc (p_mcb_ptr, p_message_ptr, p_message_len, p_code); /* PROGRAM FUNCTION If the destination capability already exists, then simply pass on the message to it. Otherwise, create it and then pass on the message to it. If the creation fails, then return FAIL to the source of the request in the connect_response message. */ /* NOTES */ /* INPUT PARAMETERS */ dcl p_mcb_ptr ptr parameter; /* MOWSE's MCB */ dcl p_message_ptr ptr parameter; /* Message */ dcl p_message_len fixed bin parameter; /* Length of message */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35) parameter; /* MISC VARIABLES */ dcl cap_num fixed bin; /* Capability_number */ dcl sysid fixed bin; /* System id */ dcl return_status char (1); /* SUCCESS/REJECT of connect */ dcl destination fixed bin; /* Destination of reply */ dcl major_num fixed bin; /* Number of the destination capability */ dcl capname_len fixed bin; /* Length of capability name */ dcl capname char (CAPABILITY_NAME_LENGTH); /* Name of capability to connect to */ dcl connect_request_string char (MAXIMUM_PACKET_SIZE); /* Message data */ dcl blkpos fixed bin; /* End of capability name */ /* STRUCTURES */ /* SYSTEM CALLS */ dcl cu_$cp entry (ptr, fixed bin (21), fixed bin (35)); /* SYSTEM CALL SUPPORT */ /* EXTERNAL CALLS */ dcl capability_$unpack entry (fixed bin, fixed bin, fixed bin, fixed bin (35)); dcl send_mowse_message_ entry (ptr, fixed bin, fixed bin, fixed bin, fixed bin, fixed bin, fixed bin, ptr, fixed bin, fixed bin, fixed bin (35)); dcl send_msg_ entry (ptr, fixed bin, fixed bin, ptr, fixed bin, fixed bin, fixed bin (35)); dcl ws_$put_background_message entry () options (variable); dcl capability_$pack entry (fixed bin, fixed bin, fixed bin, fixed bin (35)); dcl ws_$find_capability_number entry (char (*), fixed bin, fixed bin, fixed bin (35)); dcl fatal_mowse_trap_ entry (fixed bin (35)); /* EXTERNAL CALL SUPPORT */ /* BUILTINS */ dcl null builtin; dcl byte builtin; dcl index builtin; dcl min builtin; dcl substr builtin; dcl addr builtin; dcl rank builtin; /* CONDITIONS */ /* CONSTANTS */ /* */ /* INITIALIZATION */ /* MAIN */ /* : Extract the name of the capability */ message_len = p_message_len; connect_request_string = p_message_ptr -> last_message.data.data_buf; blkpos = index (connect_request_string, " "); if blkpos ^= 0 then capname_len = min (blkpos - 1, CAPABILITY_NAME_LENGTH); else capname_len = min (p_message_len - 5, CAPABILITY_NAME_LENGTH); capname = substr (connect_request_string, 1, capname_len); /* : Try to find the capability to which connection is requested - If it is not found the try to create it */ call ws_$find_capability_number (substr (capname, 1, capname_len), LOCAL_SYSTEM, major_num, p_code); if p_code ^= 0 then do; call cu_$cp (addr (connect_request_string), p_message_len - 5, p_code); if p_code = 0 then call ws_$find_capability_number ( substr (capname, 1, capname_len), LOCAL_SYSTEM, major_num, p_code); end; /* : - If it cannot be created then send message to the capability requesting the connect that it has failed */ if p_code ^= 0 then do; call capability_$pack ( rank (p_message_ptr -> last_message.header.source_system), rank (p_message_ptr -> last_message.header.source_major), destination, p_code); if p_code ^= 0 then do; call ws_$put_background_message (p_mcb_ptr, p_code, "MULTICS MOWSE", "Request connect from invalid source"); p_code = 0; return; end; return_status = byte (REJECT); call send_msg_ (p_mcb_ptr, destination, RESPONSE_CONNECT, addr (return_status), 1, BG, p_code); if p_code ^= 0 then do; call fatal_mowse_trap_ (p_code); return; end; return; end; /* : - Otherwise send a request connect to the capability */ call capability_$unpack (sysid, cap_num, major_num, p_code); if p_code ^= 0 then do; call fatal_mowse_trap_ (p_code); return; end; call send_mowse_message_ (p_mcb_ptr, rank (p_message_ptr -> last_message.header.source_system), rank (p_message_ptr -> last_message.header.source_major), sysid, cap_num, REQUEST_CONNECT, LAST, null, 0, BG, p_code); if p_code ^= 0 then do; call fatal_mowse_trap_ (p_code); return; end; return; %page; /* INCLUDE FILES */ %include mowse_info; %include mowse_messages; %include mowse; end;  internal_mowse_.pl1 08/07/87 1554.4rew 08/07/87 1454.8 82656 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-07-01,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-10-22,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Change code handling delete_from_remote_cat_ request so that no capability_name is expected in the alter_cat_message. Include code for the handling of connect request messages. Handled messages received with an invalid minor specified. 3) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ internal_mowse_: proc (p_mcb_ptr, p_mess_len, p_minor, p_mess_ptr, p_ecode); /* : PROGRAM FUNCTION Determine the destination of the internal narc message depending on the minor capability number and direct control appropriately. */ /* : NOTES */ /* INPUT PARAMETERS */ dcl p_mcb_ptr ptr parameter; /* mcb pointer of mowse_io_ */ dcl p_mess_len fixed bin parameter; /* Length of message */ dcl p_minor fixed bin parameter; /* Minor capability */ dcl p_mess_ptr ptr parameter; /* Pointer to message */ dcl p_ecode fixed bin (35) parameter; /* Error code */ /* EXTERNAL CALLS */ dcl internal_connect_request_ entry (ptr, ptr, fixed bin, fixed bin (35)); dcl prepare_trace_ entry (ptr, fixed bin, ptr, fixed bin); dcl capability_$pack entry (fixed bin, fixed bin, fixed bin, fixed bin (35)); dcl send_msg_ entry (ptr, fixed bin, fixed bin, ptr, fixed bin, fixed bin, fixed bin (35)); dcl add_to_remote_cat_ entry (ptr, fixed bin, char (*), fixed bin (35)); dcl delete_from_remote_cat_ entry (ptr, fixed bin, fixed bin (35)); dcl get_mowse_info_ptr_ entry (ptr, ptr, fixed bin (35)); dcl ws_$put_background_message entry () options (variable); dcl execom_ entry (ptr, fixed bin, char (*), fixed bin, fixed bin, fixed bin, fixed bin (35)); /* MISC VARIABLES */ dcl cap_num fixed bin; dcl destination fixed bin; /* source of message */ dcl major_name char (32); /* Capability name */ dcl old_modes char (256); /* returned from iox_$modes call */ dcl mowse_info_ptr ptr; /* Pointer to mowse info structure */ dcl command_id fixed bin; dcl major_num fixed bin; /* CONDITIONS */ /* BUILTINS */ dcl null builtin; dcl substr builtin; dcl rank builtin; /* CONSTANTS */ dcl TRUE bit (1) int static options (constant) init ("1"b); dcl FALSE bit (1) int static options (constant) init ("0"b); /* SYSTEM CALLS */ dcl iox_$modes entry (ptr, char (*), char (*), fixed bin (35)); /* EXTERNAL CALL SUPPORT */ /* */ /* INITIALIZATION */ p_ecode = 0; message_ptr = p_mess_ptr; message_len = p_mess_len; mowse_info_ptr = null; call get_mowse_info_ptr_ (p_mcb_ptr, mowse_info_ptr, p_ecode); if p_ecode ^= 0 then return; /* : MAIN */ /* : Call trace message to print message received */ if mowse_info_ptr -> mowse_info.mowse_flags.trace = TRUE then call prepare_trace_ (message_ptr, message_len, mowse_info_ptr -> mowse_info.mowse_flags.trace_file_iocb, 0); /* : - case SET_SLEEP_FLAG -- set the sleep flag of the source capability */ if (p_minor = SET_SLEEP_FLAG) then do; cap_num = rank (message_ptr -> last_message.header.source_major); if cap_num < MINIMUM_CAT_ENTRY | cap_num > MAXIMUM_CAT_ENTRY then return; mowse_info_ptr -> mowse_info.remote_cat (cap_num).sleep_time = "1"b; return; end; /* : - case RESET_SLEEP_FLAG -- clear the sleep flag of the source capability */ if (p_minor = RESET_SLEEP_FLAG) then do; cap_num = rank (message_ptr -> last_message.header.source_major); if cap_num < MINIMUM_CAT_ENTRY | cap_num > MAXIMUM_CAT_ENTRY then return; mowse_info_ptr -> mowse_info.remote_cat (cap_num).sleep_time = "0"b; return; end; /* : - case RESET_REPLY -- clear the reset flag on the source application (RESET_REPLYs only come from the remote system */ if p_minor = RESET_REPLY then do; cap_num = rank (message_ptr -> last_message.header.source_major); if cap_num < MINIMUM_CAT_ENTRY | cap_num > MAXIMUM_CAT_ENTRY then return; mowse_info_ptr -> mowse_info.remote_cat (cap_num).flags.reset = FALSE; return; end; /* : - case SET_SUSPEND -- set the suspend flag on the destination application (only come from the remote system) */ if p_minor = SET_SUSPEND then do; cap_num = rank (message_ptr -> last_message.header.source_major); if cap_num < MINIMUM_CAT_ENTRY | cap_num > MAXIMUM_CAT_ENTRY then return; mowse_info_ptr -> mowse_info.remote_cat (cap_num).flags.suspended = TRUE; return; end; /* : - case RESET_SUSPEND -- clear the suspend flag on the specified application (these only come from the remote system */ if p_minor = RESET_SUSPEND then do; cap_num = rank (message_ptr -> last_message.header.source_major); if cap_num < MINIMUM_CAT_ENTRY | cap_num > MAXIMUM_CAT_ENTRY then return; mowse_info_ptr -> mowse_info.remote_cat (cap_num).flags.suspended = FALSE; return; end; /* : - case EXECUTE_COMMAND: -- call procedure execom_ which will handle the execution of the command originating from some other system. */ if (p_minor = EXECUTE_COMMAND) then do; command_id = message_ptr -> execom_message.data.cmd_id; call execom_ (p_mcb_ptr, message_len - 7, message_ptr -> execom_message.data.command, command_id, rank (message_ptr -> execom_message.header.source_system), rank (message_ptr -> execom_message.header.source_major), p_ecode); p_ecode = 0; return; end; /* : - case EXECUTE_COMMAND_REPLY: (Execution of an application by mowse on startup failed) -- put a background message indicating the status of the execution (only if it failed) to the user. */ if (p_minor = EXECUTE_COMMAND_REPLY) then do; if (message_ptr -> execom_reply_msg.data.cmd_id = 0) & (rank (message_ptr -> execom_reply_msg.data.status) = STATUS_FAILED) then do; call ws_$put_background_message (p_mcb_ptr, 0, "MOWSE", "Start up failed"); end; p_ecode = 0; return; end; /* : - case ADD_TO_REMOTE_CAT: -- call procedure add_to_remote_cat_ with the capability_number and the name of the capability to be added to the remote CAT table. */ if (p_minor = ADD_TO_REMOTE_CAT) then do; if substr (message_ptr -> alter_cat_message.data.major_name, 1, 6) = "WSTERM" then call iox_$modes (p_mcb_ptr -> mcb.iocb_ptr, "", old_modes, p_ecode); major_num = rank (message_ptr -> alter_cat_message.data.major); major_name = substr (message_ptr -> alter_cat_message.data.major_name, 1, p_mess_len - 6); call add_to_remote_cat_ (p_mcb_ptr, major_num, major_name, p_ecode); return; end; /* : - case DELETE_FROM_REMOTE_CAT: -- call procedure delete_from_remote_cat_ with the capability_number and the name of the capability to be deleted from the remote CAT table. */ if (p_minor = DELETE_FROM_REMOTE_CAT) then do; cap_num = rank (message_ptr -> alter_cat_message.data.major); call delete_from_remote_cat_ (p_mcb_ptr, cap_num, p_ecode); return; end; /* : - case REQUEST_CONNECT */ if p_minor = REQUEST_CONNECT then do; call internal_connect_request_ (p_mcb_ptr, p_mess_ptr, p_mess_len, p_ecode); return; end; /* : - case FAIL_CAPABILITY ignore it */ if p_minor = FAIL_CAPABILITY then return; /* : Send execute_capability_failed message to source of illegal message */ call capability_$pack ( rank (message_ptr -> input_message.header.source_system), rank (message_ptr -> input_message.header.source_major), destination, p_ecode); /* : if source of message is illegal then ignore message else send execute_capability_reply message to source */ if p_ecode ^= 0 then do; p_ecode = 0; return; end; call send_msg_ (p_mcb_ptr, destination, FAIL_CAPABILITY, null, 0, BG, p_ecode); return; %page; /* INCLUDE FILES */ %include mowse_mcb; %include mowse; %include mowse_messages; %include mowse_info; /* : END internal_mowse_ */ end internal_mowse_;  message_manager_.pl1 08/07/87 1554.4rew 08/07/87 1454.8 104373 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-08-27,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ message_manager_: proc (p_mcb_ptr, p_msg_type, p_source_major, p_msg_ptr, p_msg_len, p_code); /* : PROGRAM FUNCTION This module manages incoming partial messages holding them until the entire message is recieved and then passing the entire message to the destination application. */ /* : NOTES */ /* INPUT PARAMETERS */ dcl p_mcb_ptr ptr; /* pointer to destination's mcb */ dcl p_msg_type fixed bin parameter; /* last, more or continue */ dcl p_source_major fixed bin parameter; dcl p_msg_ptr ptr parameter; /* Pointer to message */ dcl p_msg_len fixed bin parameter; /* Length of message */ /* OUTPUT PARAMETERS */ dcl p_code fixed bin (35); /* Error code */ /* MISC VARIABLES */ dcl mowse_info_ptr ptr; /* Pointer to mowse info structure */ dcl 01 xtn like message_node based (xtn_ptr); /* node space to be deallocated */ dcl xtn_ptr ptr; /* pointer to node space to be freed */ dcl 01 xtpm like partial_message based (xtpm_ptr); dcl xtpm_ptr ptr; /* pointer to space to be freed */ dcl tpm_ptr ptr; /* temp partial message pointer */ dcl temp_msg char (p_msg_len) based (p_msg_ptr); /* temp message overlay */ dcl tn_ptr ptr; /* temp pointer */ dcl found bit (1); /* loop control */ dcl done bit (1); /* loop control */ dcl new_msg ptr; /* pointer to space allocated for the new partial message */ /* STRUCTURES */ /* SYSTEM CALLS */ dcl get_system_free_area_ entry () returns (ptr); /* SYSTEM CALL SUPPORT */ dcl system_free_area_ptr ptr; /* pointer to system free area */ dcl system_free_area area based (system_free_area_ptr); /* system free area */ /* EXTERNAL CALLS */ dcl get_mowse_info_ptr_ entry (ptr, ptr, fixed bin (35)); dcl append_inbuff_ entry (ptr, ptr, fixed bin, fixed bin (35)); /* EXTERNAL CALL SUPPORT */ /* BUILTINS */ dcl addr builtin; dcl null builtin; dcl substr builtin; /* CONDITIONS */ /* CONSTANTS */ dcl TRUE bit (1) int static options (constant) init ("1"b); dcl FALSE bit (1) int static options (constant) init ("0"b); /* */ /* INITIALIZATION */ system_free_area_ptr = get_system_free_area_ (); message_ptr = p_msg_ptr; message_len = p_msg_len; call get_mowse_info_ptr_ (p_mcb_ptr, mowse_info_ptr, p_code); if p_code ^= 0 then return; /* MAIN */ /* : If the message type is CONTINUE */ if p_msg_type = CONTINUE then do; /* : - If pointer to the head of the list is null then create a message node and attach to it the message */ if (mowse_info_ptr -> mowse_info.message_manager_info.head_list_ptr = null) then do; allocate message_node in (system_free_area); mowse_info_ptr -> mowse_info.message_manager_info .head_list_ptr = msg_node_ptr; mowse_info_ptr -> mowse_info.message_manager_info .tail_list_ptr = msg_node_ptr; mowse_info_ptr -> mowse_info.message_manager_info .pending_messages = mowse_info_ptr -> mowse_info.message_manager_info .pending_messages + 1; msg_node_ptr -> message_node.major = p_source_major; allocate partial_message in (system_free_area); msg_node_ptr -> message_node.partial_msg_list_ptr = part_msg_ptr; msg_node_ptr -> message_node.last_part_msg = part_msg_ptr; msg_node_ptr -> message_node.next_node = null; msg_node_ptr -> message_node.prev_node = null; part_msg_length = p_msg_len; allocate part_msg in (system_free_area) set (new_msg); part_msg_ptr -> partial_message.msg_ptr = new_msg; substr (new_msg -> part_msg, 1, p_msg_len) = substr (p_msg_ptr -> temp_msg, 1, p_msg_len); part_msg_ptr -> partial_message.msg_len = part_msg_length; part_msg_ptr -> partial_message.next_msg = null; end; /* : - Else search through the list of nodes for one which has the same source major as the message just received */ else do; done = FALSE; found = FALSE; tn_ptr = mowse_info_ptr -> mowse_info.message_manager_info. head_list_ptr; do while (tn_ptr ^= null & ^done & ^found); if tn_ptr -> message_node.major > p_source_major then done = TRUE; else if tn_ptr -> message_node.major = p_source_major then do; done = TRUE; found = TRUE; end; else tn_ptr = tn_ptr -> message_node.next_node; end; /* : - If it is found then add the message to the list attached to this node */ if found = TRUE then do; allocate partial_message in (system_free_area); part_msg_length = p_msg_len; allocate part_msg in (system_free_area) set (new_msg); part_msg_ptr -> partial_message.msg_ptr = new_msg; substr (new_msg -> part_msg, 1, p_msg_len) = substr (p_msg_ptr -> temp_msg, 1, p_msg_len); part_msg_ptr -> partial_message.msg_len = part_msg_length; part_msg_ptr -> partial_message.next_msg = null; if tn_ptr -> message_node.last_part_msg = null then do; tn_ptr -> message_node.partial_msg_list_ptr = part_msg_ptr; tn_ptr -> message_node.last_part_msg = part_msg_ptr; end; else do; tn_ptr -> message_node.last_part_msg -> partial_message.next_msg = part_msg_ptr; tn_ptr -> message_node.last_part_msg = part_msg_ptr; end; end; /* : Else make a new message node and start a partial message list on the node */ else do; allocate message_node in (system_free_area); mowse_info_ptr -> mowse_info. message_manager_info.pending_messages = mowse_info_ptr -> mowse_info. message_manager_info.pending_messages + 1; msg_node_ptr -> message_node.major = p_source_major; allocate partial_message in (system_free_area); msg_node_ptr -> message_node.partial_msg_list_ptr = part_msg_ptr; part_msg_length = p_msg_len; allocate part_msg in (system_free_area) set (new_msg); part_msg_ptr -> partial_message.msg_ptr = new_msg; substr (new_msg -> part_msg, 1, p_msg_len) = substr (p_msg_ptr -> temp_msg, 1, p_msg_len); part_msg_ptr -> partial_message.msg_len = part_msg_length; part_msg_ptr -> partial_message.next_msg = null; if mowse_info_ptr -> mowse_info.message_manager_info.head_list_ptr = tn_ptr then do; /* add to head */ msg_node_ptr -> message_node.next_node = tn_ptr; msg_node_ptr -> message_node.prev_node = null; tn_ptr -> message_node.prev_node = msg_node_ptr; mowse_info_ptr -> mowse_info. message_manager_info.head_list_ptr = msg_node_ptr; end; else if tn_ptr = null then do; /* append to end */ msg_node_ptr -> message_node.next_node = null; msg_node_ptr -> message_node.prev_node = mowse_info_ptr -> mowse_info. message_manager_info.tail_list_ptr; mowse_info_ptr -> mowse_info. message_manager_info.tail_list_ptr -> message_node.next_node = msg_node_ptr; mowse_info_ptr -> mowse_info. message_manager_info.tail_list_ptr = msg_node_ptr; end; else if tn_ptr ^= null then do; /* insert */ tn_ptr -> message_node.prev_node -> message_node.next_node = msg_node_ptr; msg_node_ptr -> message_node.next_node = tn_ptr; msg_node_ptr -> message_node.prev_node = tn_ptr -> message_node.prev_node; tn_ptr -> message_node.prev_node = msg_node_ptr; end; end; end; end; /* : Else if the message type is LAST - Search through the list of nodes for one with the same source major. */ else if p_msg_type = LAST then do; done = FALSE; found = FALSE; tn_ptr = mowse_info_ptr -> mowse_info.message_manager_info. head_list_ptr; do while (tn_ptr ^= null & ^done & ^found); if tn_ptr -> message_node.major > p_source_major then done = TRUE; else if tn_ptr -> message_node.major = p_source_major then do; done = TRUE; found = TRUE; end; else tn_ptr = tn_ptr -> message_node.next_node; end; /* : - If a node is not found the place the last message is the input buffer of the application */ if found = FALSE then do; call append_inbuff_ (p_mcb_ptr, addr (message_ptr -> last_message.data.data_buf), message_len - 5, p_code); end; /* : - Else place all messages in the list attached to the node into the buffer of the application and then place the last message into the buffer */ else do; tpm_ptr = tn_ptr -> message_node.partial_msg_list_ptr; do while (tpm_ptr ^= null); message_ptr = tpm_ptr -> partial_message.msg_ptr; message_len = tpm_ptr -> partial_message.msg_len; call append_inbuff_ (p_mcb_ptr, addr (message_ptr -> more_remaining_message.data.data_buf), message_len - 6, p_code); xtpm_ptr = tpm_ptr; tpm_ptr = tpm_ptr -> partial_message.next_msg; free xtpm; xtpm_ptr = null; end; xtn_ptr = tn_ptr; if mowse_info_ptr -> mowse_info. message_manager_info.head_list_ptr = tn_ptr then do; /* delete from head of list */ mowse_info_ptr -> mowse_info. message_manager_info.head_list_ptr = tn_ptr -> message_node.next_node; if tn_ptr -> message_node.next_node ^= null then tn_ptr -> message_node.next_node -> message_node.prev_node = null; end; else if mowse_info_ptr -> mowse_info. message_manager_info.tail_list_ptr = tn_ptr then do; /* delete from tail of list */ mowse_info_ptr -> mowse_info. message_manager_info.tail_list_ptr = tn_ptr -> message_node.prev_node; if tn_ptr -> message_node.next_node ^= null then tn_ptr -> message_node.prev_node -> message_node.next_node = null; end; else do; /* delete from middle of list */ tn_ptr -> message_node.prev_node -> message_node.next_node = tn_ptr -> message_node.next_node; tn_ptr -> message_node.next_node -> message_node.prev_node = tn_ptr -> message_node.prev_node; end; free xtn; xtn_ptr = null; /* : Send the last part of message to application buffer */ message_ptr = p_msg_ptr; message_len = p_msg_len; call append_inbuff_ (p_mcb_ptr, addr (message_ptr -> last_message.data.data_buf), message_len - 5, p_code); end; end; %page; /* INCLUDE FILES */ %include mowse; %include mowse_mcb; %include mowse_info; %include mowse_messages; /* : END */ end;  message_parser_.pl1 08/07/87 1554.4rew 08/07/87 1454.8 30168 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-08-27,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ message_parser_: proc (p_mowse_mcb_ptr, p_msg_len, p_msg_ptr, p_ecode); /* : PROGRAM FUNCTION Determine the destination of the message depending on the major capability number and direct control appropriately. */ /* : NOTES */ /* INPUT PARAMETERS */ dcl p_mowse_mcb_ptr ptr parameter; /* mcb of mowse_io_ */ dcl p_msg_len fixed bin (17) parameter; /* Length of message */ dcl p_msg_ptr ptr parameter; /* Pointer to message */ /* OUTPUT PARAMETERS */ dcl p_ecode fixed bin (35) parameter; /* Error code */ /* EXTERNAL CALLS */ dcl external_mowse_ entry (ptr, fixed bin, fixed bin, ptr, fixed bin, fixed bin (35)); dcl internal_mowse_ entry (ptr, fixed bin, fixed bin, ptr, fixed bin (35)); /* MISC VARIABLES */ dcl msg_type fixed bin; /* See send_mowse_message.pl1 */ dcl system fixed bin (17); dcl major fixed bin (17); dcl minor fixed bin (17); /* CONDITIONS */ /* BUILTINS */ dcl rank builtin; /* */ /* INITIALIZATION */ p_ecode = 0; message_ptr = p_msg_ptr; message_len = p_msg_len; msg_type = rank (message_ptr -> event_message.header.msg_type); if msg_type = CONTINUE then do; system = rank (message_ptr -> more_remaining_message.header.system); major = rank (message_ptr -> more_remaining_message.header.major); minor = rank (message_ptr -> more_remaining_message.header.minor); end; else if msg_type = MORE then do; system = rank (message_ptr -> request_more_message.header.system); major = rank (message_ptr -> request_more_message.header.major); minor = -1; end; else do; system = rank (message_ptr -> last_message.header.system); major = rank (message_ptr -> last_message.header.major); minor = rank (message_ptr -> last_message.header.minor); end; /* : if major = INTERNAL then handle internal message */ if (major = INTERNAL) then call internal_mowse_ (p_mowse_mcb_ptr, message_len, minor, message_ptr, p_ecode); /* : else handle message destined for some capability */ else do; call external_mowse_ (p_mowse_mcb_ptr, major, minor, message_ptr, message_len, p_ecode); return; end; %page; /* INCLUDE FILES */ %include mowse; %include mowse_messages; %include mowse_info; /* : END message_parser_ */ end message_parser_;  mowse_error_handler_.pl1 08/07/87 1554.3rew 08/07/87 1454.8 75357 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1986 * * * *********************************************************** */ /****^ HISTORY COMMENTS: 1) change(86-09-24,Smith), approve(87-07-15,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(86-11-27,Flegel), approve(86-11-27,MCR7580), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Approved. END HISTORY COMMENTS */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ mowse_error_handler_: proc (p_mcb_ptr, p_cat_index, p_minor); /* : PROGRAM FUNCTION Clean up the CAT tables when an application experiences a fatal error. */ /* : NOTES */ /* INPUT PARAMETERS */ dcl p_mcb_ptr ptr; /* Pointer to caller mcb */ dcl p_cat_index fixed bin parameter; /* capabilitiy number of application */ dcl p_minor fixed bin parameter; /* minor to be executed */ /* OUTPUT PARAMETERS */ /* MISC VARIABLES */ dcl msg_len fixed bin; /* message length */ dcl msg_ptr ptr; /* condition message (not set since area is null) */ dcl cap_id fixed bin; /* capabilities index into CAT */ dcl cap_id_byte char; /* byte containing cap_id (char) */ dcl stack_ptr ptr; /* Pointer to condition stack frame */ dcl code fixed bin (35); /* Error code */ dcl mowse_info_ptr ptr; /* Pointer to mowse info structure */ dcl 01 temp_mcb like mcb based (temp_mcb_ptr); /* temporary mcb overlay */ dcl temp_mcb_ptr ptr; /* Pointer to temp mcb */ dcl temp_ptr ptr; /* Pointer to temporary buffers */ dcl temp_inbuff char (mowse_info_ptr -> mowse_info.local_cat (p_cat_index).mcb_ptr -> mcb.inbuff_data_length) based (temp_ptr); /* temp buffer overlay */ dcl condition_message char (1200) based (msg_ptr); /* conditon message buffer */ dcl destination fixed bin; /* destination message */ dcl cap_name char (32) varying; /* capabilities name */ dcl system_free_area area based (system_free_area_ptr); /* area allocated in system space */ dcl system_free_area_ptr ptr; /* Pointer to system free area */ /* STRUCTURES */ /* SYSTEM CALLS */ dcl ioa_$ioa_switch entry () options (variable); dcl condition_interpreter_ entry (ptr, ptr, fixed bin, fixed bin, ptr, char (*), ptr, ptr); dcl ioa_ entry () options (variable); dcl find_condition_frame_ entry (ptr) returns (ptr); dcl find_condition_info_ entry (ptr, ptr, fixed bin (35)); dcl get_system_free_area_ entry () returns (ptr); /* SYSTEM CALL SUPPORT */ /* EXTERNAL CALLS */ dcl get_mowse_info_ptr_ entry (ptr, ptr, fixed bin (35)); dcl capability_$pack entry (fixed bin, fixed bin, fixed bin, fixed bin (35)); dcl send_msg_ entry (ptr, fixed bin, fixed bin, ptr, fixed bin, fixed bin, fixed bin (35)); dcl release_outbuffer_ entry (ptr); /* EXTERNAL CALL SUPPORT */ /* BUILTINS */ dcl stackframeptr builtin; dcl null builtin; dcl addr builtin; dcl byte builtin; dcl substr builtin; /* CONDITIONS */ dcl cleanup condition; /* CONSTANTS */ /* */ /* INITIALIZATION */ msg_ptr = null; stack_ptr = null; system_free_area_ptr = get_system_free_area_ (); condition_info_ptr = null; msg_len = -1; cap_id_byte = byte (p_cat_index); cap_id = p_cat_index; on cleanup begin; if condition_info_ptr ^= null then do; free condition_info_ptr -> condition_info; condition_info_ptr = null; end; if msg_ptr ^= null then do; free msg_ptr -> condition_message; msg_ptr = null; end; end; allocate condition_info in (system_free_area) set (condition_info_ptr); call get_mowse_info_ptr_ (p_mcb_ptr, mowse_info_ptr, code); if mowse_info_ptr -> mowse_info.mowse_flags.error_handled ^= "0"b then return; mowse_info_ptr -> mowse_info.mowse_flags.error_handled = "1"b; /* : If MOWSE didn't catch that the major was invalid then indicatea fatal capability error */ if p_cat_index < INTERNAL | p_cat_index > MAXIMUM_CAT_ENTRY then do; call ioa_ ("^/MULTICS MOWSE:FATAL CAPABILITY ERROR [1]"); mowse_info_ptr -> mowse_info.mowse_flags.error_handled = "0"b; return; end; /* : If the p_cat_index is INTERNAL then initiate cleanup */ if p_cat_index = INTERNAL then do; call ioa_ ("^/MULTICS MOWSE:FATAL CAPABILITY ERROR [2]"); mowse_info_ptr -> mowse_info.mowse_flags.error_handled = "0"b; return; end; if mowse_info_ptr -> mowse_info.local_cat (p_cat_index).mcb_ptr = null then do; call ioa_ ("^/MULTICS MOWSE:FATAL CAPABILITY ERROR [3]"); mowse_info_ptr -> mowse_info.mowse_flags.error_handled = "0"b; return; end; /* : else Free space allocated for application is system space */ temp_ptr = mowse_info_ptr -> mowse_info.local_cat (p_cat_index).mcb_ptr -> mcb.inbuff; if temp_ptr ^= null then do; free temp_inbuff; temp_ptr = null; mowse_info_ptr -> mowse_info.local_cat (p_cat_index).mcb_ptr -> mcb.inbuff = null; end; call release_outbuffer_ (mowse_info_ptr -> mowse_info.local_cat (p_cat_index).mcb_ptr); /* : Send a message to the remote system to update the CAT */ cap_name = mowse_info_ptr -> mowse_info.local_cat (p_cat_index).mcb_ptr -> mcb.capability_name; call capability_$pack (REMOTE_SYSTEM, INTERNAL, destination, code); call send_msg_ ((mowse_info_ptr -> mowse_info.local_cat (p_cat_index).mcb_ptr), destination, DELETE_FROM_REMOTE_CAT, addr (cap_id_byte), 1, BG, code); /* : Send a background message to notify the user */ stack_ptr = find_condition_frame_ (stackframeptr); call find_condition_info_ (stack_ptr, condition_info_ptr, code); if code ^= 0 | condition_info_ptr = null then do; call ioa_ ("^/MULTICS MOWSE:FATAL CAPABILITY ERROR [4]"); mowse_info_ptr -> mowse_info.mowse_flags.error_handled = "0"b; return; end; call condition_interpreter_ (system_free_area_ptr, msg_ptr, msg_len, 1, condition_info_ptr -> condition_info.mc_ptr, (condition_info_ptr -> condition_info.condition_name), condition_info_ptr -> condition_info.wc_ptr, condition_info_ptr -> condition_info.info_ptr); if msg_ptr ^= null then do; call ioa_ ("^a", substr (msg_ptr -> condition_message, 1, msg_len)); if (mowse_info_ptr -> mowse_info.mowse_flags.trace = "1"b) then call ioa_$ioa_switch (mowse_info_ptr -> mowse_info.mowse_flags.trace_file_iocb, "^a", substr (msg_ptr -> condition_message, 1, msg_len)); end; call ioa_ ( "MULTICS MOWSE: Terminating capability ^a [^d:^d:^d]", cap_name, LOCAL_SYSTEM, p_cat_index, p_minor); if (mowse_info_ptr -> mowse_info.mowse_flags.trace = "1"b) then call ioa_$ioa_switch (mowse_info_ptr -> mowse_info.mowse_flags.trace_file_iocb, "MULTICS MOWSE: Terminating capability ^a [cap_num = ^d] on minor ^d", cap_name, p_cat_index, p_minor); /* Free the memory associated with the mcb */ if p_cat_index > INTERNAL & p_cat_index <= MAXIMUM_CAT_ENTRY then do; temp_mcb_ptr = mowse_info_ptr -> mowse_info.local_cat (p_cat_index).mcb_ptr; if temp_mcb_ptr ^= null then do; free temp_mcb; temp_mcb_ptr = null; mowse_info_ptr -> mowse_info.local_cat (p_cat_index).mcb_ptr = null; end; end; free condition_info_ptr -> condition_info; condition_info_ptr = null; if msg_ptr ^= null then do; free msg_ptr -> condition_message; condition_info_ptr = null; end; mowse_info_ptr -> mowse_info.mowse_flags.error_handled = "0"b; %page; /* INCLUDE FILES */ %include condition_info; %include mowse; %include mowse_info; %include mowse_mcb; %include mowse_messages; /* : END */ end;  mowse_io_.pl1 01/24/89 0854.8rew 01/24/89 0847.0 656082 /****^ *********************************************************** * * * Copyright, (C) Honeywell Bull Inc., 1987 * * * * Copyright, (C) Honeywell Information Systems Inc., 1987 * * * *********************************************************** */ /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */ mowse_io_: proc (); /* PROGRAM FUNCTION This is the main driver for "mowse_io_" module which includes I/O protocols between a user's process on Multics and a Personal Computer (PC) through which the user has logged into using the PC version of MOWSE. The following I/O system calls are provided for this module: attach mowse_io_$mowse_io_attach close mowse_io_$mowse_io_close close_file mowse_io_$mowse_io_close_file control mowse_io_$mowse_io_control detach_iocb mowse_io_$mowse_io_detach_iocb get_chars mowse_io_$mowse_io_get_chars get_line mowse_io_$mowse_io_get_line modes mowse_io_$mowse_io_modes open mowse_io_$mowse_io_open open_file mowse_io_$mowse_io_open_file put_chars mowse_io_$mowse_io_put_chars */ /* NOTES */ /****^ HISTORY COMMENTS: 1) change(87-04-16,Flegel), approve(87-06-23,MCR7649), audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075): Created. 2) change(87-08-18,LJAdams), approve(87-08-18,PBF7649), audit(87-08-18,Wallman), install(87-08-18,MR12.1-1091): Changed references to editing_chars_version to editing_chars_version_3. 3) change(88-10-06,Flegel), approve(88-11-16,MCR8023), audit(88-12-12,Lee), install(89-01-24,MR12.3-1012): phx21215 - Changed (read write)_status control to use a mowse created event channel as the channel information returned. This channel will have events transmitted on it when foregrond data is processed. - Added control order "get_event_channel". END HISTORY COMMENTS */ /* INPUT PARAMETERS */ dcl p_newmodes char (*) parameter; /* Modes string */ dcl p_descrip char (*) parameter; /* Open description */ dcl p_unused bit (1) parameter; dcl p_mode fixed bin parameter; /* Open mode */ dcl p_buf_len fixed bin (21) parameter; /* Buffer length */ dcl p_buf_ptr ptr parameter; /* buffer pointer */ dcl p_order char (*) parameter; /* Control order */ dcl p_info_ptr ptr parameter; /* Control info pointer */ dcl p_options (*) char (*) var parameter;/* Option array */ dcl p_loud bit (1) aligned parameter; /* Turn on error printing here */ dcl p_iocb_ptr ptr parameter; /* IOCB structure pointer */ /* OUTPUT PARAMETERS */ dcl p_oldmodes char (*) parameter; /* Old modes string */ dcl p_chars_read fixed bin (21) parameter; dcl p_code fixed bin (35) parameter; /* Error code */ /* MISC VARIABLES */ dcl new_modes char (512); /* Mode string */ dcl confirmed_disconnect bit (1); /* If disconnect will require confirmation */ dcl printer_msg char (5); /* POx00 message to WSTERM */ dcl order char (32) var; /* Control order */ dcl pl fixed bin; /* Page length */ dcl ll fixed bin; /* Line length */ dcl erkl_esc char (3); /* Erase, Kill, Escape chars */ dcl i fixed bin; dcl iocb_ptr ptr; /* IOCB */ dcl system_free_area area based (system_free_area_ptr); dcl system_free_area_ptr ptr; dcl ind fixed bin; /* Index counter */ dcl target_iocb_ptr ptr; dcl mask bit (36) aligned; /* IPS mask */ dcl mio_data_ptr ptr; /* mowse_io_ data */ /* STRUCTURES */ dcl fixedbin21 fixed bin (21) based; dcl fixedbin71al fixed bin (71) aligned based; dcl 01 ipc_arg like ipc_create_arg_structure aligned automatic; dcl 01 trans like cv_trans_struc aligned automatic; dcl ll_overlay fixed bin (9) based; /* Info for line_length order */ dcl buf (p_buf_len) char (1) based (p_buf_ptr); dcl 01 mio_data like mowse_io_data based (mio_data_ptr); dcl 01 fatal_error_info aligned, 02 version fixed bin, /* Must be 0 */ 02 status_code fixed bin (35); /* Error code */ /* SYSTEM CALLS */ dcl ipc_$create_event_channel entry (ptr, fixed bin (71), fixed bin (35)); dcl clock_ entry () returns (fixed bin (71)); dcl ttt_info_$initial_string entry (char (*), char (*) var, fixed bin (35)); dcl ttt_info_$modes entry (char (*), char (*), fixed bin (35)); dcl ipc_$delete_ev_chn entry (fixed bin (71), fixed bin (35)); dcl sct_manager_$get entry (fixed bin, ptr, fixed bin (35)); dcl sct_manager_$set entry (fixed bin, ptr, fixed bin (35)); dcl mode_string_$get_mode entry (char (*), char (*), ptr, fixed bin (35)); dcl mode_string_$parse entry (char (*), ptr, ptr, fixed bin (35)); dcl ipc_$create_ev_chn entry (fixed bin (71), fixed bin (35)); dcl get_process_id_ entry () returns (bit (36)); dcl iox_$modes entry (ptr, char (*), char (*), fixed bin (35)); dcl iox_$put_chars entry (ptr, ptr, fixed bin (21), fixed bin (35)); dcl iox_$get_line entry (ptr, ptr, fixed bin (21), fixed bin (21), fixed bin (35)); dcl iox_$control entry (ptr, char (*), ptr, fixed bin (35)); dcl iox_$get_chars entry (ptr, ptr, fixed bin (21), fixed bin (21), fixed bin (35)); dcl terminate_process_ entry (char (*), ptr); dcl iox_$propagate entry (ptr); dcl hcs_$reset_ips_mask entry (bit (36) aligned, bit (36) aligned); dcl com_err_ entry () options (variable); dcl hcs_$set_ips_mask entry (bit (36) aligned, bit (36) aligned); dcl get_system_free_area_ entry () returns (ptr); dcl iox_$look_iocb entry (char (*), ptr, fixed bin (35)); /* SYSTEM CALL SUPPORT */ dcl error_table_$no_initial_string fixed bin (35) ext static; dcl error_table_$unsupported_operation fixed bin (35) ext static; dcl error_table_$unimplemented_version fixed bin (35) ext static; dcl error_table_$null_info_ptr fixed bin (35) ext static; dcl error_table_$long_record fixed bin (35) ext static; dcl iox_$err_no_operation entry () options (variable); dcl error_table_$bad_mode fixed bin (35) ext static; dcl iox_$err_not_open entry () options (variable); dcl error_table_$unable_to_do_io fixed bin (35) ext static; dcl error_table_$invalid_device fixed bin (35) ext static; dcl error_table_$wrong_no_of_args fixed bin (35) ext static; dcl error_table_$not_detached fixed bin (35) ext static; /* EXTERNAL CALLS */ dcl ws_timer_$reset_connect entry (); dcl ws_debug_$line entry () options (variable); dcl ws_packet_transmitter_$terminate entry (ptr); dcl ws_packet_transmitter_$local_data entry (ptr, fixed bin, ptr, fixed bin (21), fixed bin); dcl ws_packet_dispatcher_$terminate entry (); dcl ws_packet_dispatcher_$initialize entry (ptr, fixed bin (35) ); dcl ws_timer_$queue_sleeper entry (fixed bin (71)); dcl ws_$find_capability_number entry (char (*), fixed bin, fixed bin, fixed bin (35)); dcl capability_$pack entry (fixed bin, fixed bin, fixed bin, fixed bin (35)); dcl terminate_mowse_ entry (ptr, fixed bin (35)); dcl bound_process_env_$err_no_operation entry options (variable); dcl ws_timer_$terminate entry (); dcl ws_timer_$reset_disconnect entry (); dcl ws_timer_$initialize entry (ptr); dcl ws_channel_$wait_block entry (ptr, ptr, char (*), ptr); dcl ws_tools_$reset_data entry (ptr); dcl ws_packet_transmitter_$supervisory entry (ptr, char (1)); dcl ws_channel_$wait_wakeup entry (ptr, ptr); dcl ws_packet_transmitter_$reset entry (ptr); dcl ws_packet_transmitter_$initialize entry (ptr, ptr, fixed bin (35)); dcl ws_debug_$trace_open