COMPILATION LISTING OF SEGMENT hasp_stream_ Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 07/13/88 1039.4 mst Wed Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1985 * 6* * * 7* *********************************************************** */ 8 9 /* format: style4,indattr,ifthen,^indproc */ 10 11 hasp_stream_: proc; 12 13 /* I/O module to allow stream I/O over HASP channels. */ 14 15 /* Written Feb 1985 by Jim Homan. */ 16 17 /****^ HISTORY COMMENTS: 18* 1) change(87-03-31,Beattie), approve(87-04-06,MCR7656), 19* audit(87-07-30,Parisek), install(87-08-04,MR12.1-1055): 20* Add support to allow HASP operator subchannels to be login service. 21* END HISTORY COMMENTS */ 22 23 /* external entries */ 24 25 dcl continue_to_signal_ entry (fixed bin (35)); 26 dcl get_group_id_ entry () returns (char (32)); 27 dcl get_pdir_ entry () returns (char (168)); 28 dcl get_temp_segment_ entry (char (*), ptr, fixed bin (35)); 29 dcl release_temp_segment_ entry (char (*), ptr, fixed bin (35)); 30 dcl com_err_ entry () options (variable); 31 dcl hcs_$initiate entry (char (*), char (*), char (*), fixed bin (1), fixed bin (2), ptr, fixed bin (35)); 32 dcl hcs_$set_ips_mask entry (bit (*) aligned, bit (*) aligned); 33 dcl unique_chars_ entry (bit (*)) returns (char (15)); 34 dcl iox_$modes entry (ptr, char (*), char (*), fixed bin (35)); 35 dcl iox_$write_record entry (ptr, ptr, fixed bin (21), fixed bin (35)); 36 dcl iox_$read_record entry (ptr, ptr, fixed bin (21), fixed bin (21), fixed bin (35)); 37 dcl iox_$detach_iocb entry (ptr, fixed bin (35)); 38 dcl iox_$close entry (ptr, fixed bin (35)); 39 dcl iox_$look_iocb entry (char (*), ptr, fixed bin (35)); 40 dcl iox_$open entry (ptr, fixed bin, bit (1) aligned, fixed bin (35)); 41 dcl iox_$attach_name entry (char (*), ptr, char (*), ptr, fixed bin (35)); 42 dcl iox_$propagate entry (ptr); 43 dcl iox_$err_not_open entry () options (variable); 44 dcl iox_$err_not_closed entry () options (variable); 45 dcl iox_$control entry (ptr, char (*), ptr, fixed bin (35)); 46 dcl terminate_process_ entry (char (*), ptr); 47 48 /* error codes */ 49 50 dcl sys_info$max_seg_size fixed bin (35) ext static; 51 dcl error_table_$long_record fixed bin (35) ext static; 52 dcl error_table_$unable_to_do_io fixed bin (35) ext static; 53 dcl error_table_$noarg fixed bin (35) ext; /* Expected argument missing. */ 54 dcl error_table_$incompatible_attach fixed bin (35) ext; /* Attach and open are incompatible. */ 55 dcl error_table_$not_attached fixed bin (35) ext; /* I/O switch (or device) is not attached. */ 56 dcl error_table_$not_detached fixed bin (35) ext; /* I/O switch is not detached. */ 57 dcl error_table_$wrong_no_of_args fixed bin (35) ext static; 58 59 /* parameters */ 60 61 dcl buffer_length fixed bin (21) parameter; 62 dcl buffer_ptr ptr parameter; 63 dcl code fixed bin (35) parameter; 64 dcl com_err_switch bit (1) aligned parameter; 65 dcl iocb_ptr ptr parameter; 66 dcl n_read fixed bin (21) parameter; 67 dcl obsolete bit (1) aligned parameter; 68 dcl option_array (*) char (*) var parameter; 69 dcl mode fixed bin parameter; 70 dcl new_modes char (*) parameter; 71 dcl old_modes char (*) parameter; 72 dcl info_ptr ptr parameter; 73 dcl order char (*) parameter; 74 75 /* automatic variables */ 76 77 dcl terminal_io_header_length fixed bin (21); 78 dcl hasp_stream_info_ptr ptr; 79 dcl mask bit (36) aligned; 80 dcl atd_ptr ptr; 81 dcl temp_atd char (256) var; 82 dcl 1 local_input_timeout_info aligned like input_timeout_info; 83 dcl 1 local_output_timeout_info aligned like output_timeout_info; 84 dcl stop_time fixed bin (71); 85 dcl line_start_pos fixed bin (21); 86 dcl line_start_ptr ptr; 87 dcl line_length fixed bin (21); 88 89 90 /* constants */ 91 92 dcl ME char (32) int static options (constant) init ("hasp_stream_"); 93 dcl SP char (1) int static options (constant) init (" "); 94 dcl NL char (1) int static options (constant) init (" 95 "); 96 dcl sio_mode char (24) var int static options (constant) init ("stream_input_output"); 97 dcl so_mode char (24) var int static options (constant) init ("stream_output"); 98 dcl si_mode char (24) var int static options (constant) init ("stream_input"); 99 100 /* based variables */ 101 102 103 dcl 1 atd based (atd_ptr) aligned, 104 2 length fixed bin, 105 2 string char (length (temp_atd) refer (atd.length)); 106 107 dcl 1 open_descrip aligned like atd based; 108 109 dcl 1 hasp_stream_info based (hasp_stream_info_ptr) aligned, 110 2 temp_seg_ptr ptr, 111 2 target_iocb_ptr ptr, 112 2 mode fixed bin, 113 2 target_attach_description char (256) var, 114 2 target_switch_name char (32) unal, 115 2 must_close_target bit (1), 116 2 must_detach_target bit (1); 117 118 /* builtins */ 119 120 dcl (addr, addcharno, bin, clock, collate, copy, currentsize, hbound, index, length, max, min, null, rel, rtrim, 121 string, substr, translate) builtin; 122 123 /* conditions */ 124 125 dcl any_other condition; 126 dcl cleanup condition; 127 1 1 /* BEGIN INCLUDE FILE ..... iocb.incl.pl1 ..... 13 Feb 1975, M. Asherman */ 1 2 /* Modified 11/29/82 by S. Krupp to add new entries and to change 1 3* version number to IOX2. */ 1 4 /* format: style2 */ 1 5 1 6 dcl 1 iocb aligned based, /* I/O control block. */ 1 7 2 version character (4) aligned, /* IOX2 */ 1 8 2 name char (32), /* I/O name of this block. */ 1 9 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 1 10 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 1 11 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 1 12 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 1 13 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 1 14 2 reserved bit (72), /* Reserved for future use. */ 1 15 2 detach_iocb entry (ptr, fixed (35)),/* detach_iocb(p,s) */ 1 16 2 open entry (ptr, fixed, bit (1) aligned, fixed (35)), 1 17 /* open(p,mode,not_used,s) */ 1 18 2 close entry (ptr, fixed (35)),/* close(p,s) */ 1 19 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 20 /* get_line(p,bufptr,buflen,actlen,s) */ 1 21 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 22 /* get_chars(p,bufptr,buflen,actlen,s) */ 1 23 2 put_chars entry (ptr, ptr, fixed (21), fixed (35)), 1 24 /* put_chars(p,bufptr,buflen,s) */ 1 25 2 modes entry (ptr, char (*), char (*), fixed (35)), 1 26 /* modes(p,newmode,oldmode,s) */ 1 27 2 position entry (ptr, fixed, fixed (21), fixed (35)), 1 28 /* position(p,u1,u2,s) */ 1 29 2 control entry (ptr, char (*), ptr, fixed (35)), 1 30 /* control(p,order,infptr,s) */ 1 31 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 32 /* read_record(p,bufptr,buflen,actlen,s) */ 1 33 2 write_record entry (ptr, ptr, fixed (21), fixed (35)), 1 34 /* write_record(p,bufptr,buflen,s) */ 1 35 2 rewrite_record entry (ptr, ptr, fixed (21), fixed (35)), 1 36 /* rewrite_record(p,bufptr,buflen,s) */ 1 37 2 delete_record entry (ptr, fixed (35)),/* delete_record(p,s) */ 1 38 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 39 /* seek_key(p,key,len,s) */ 1 40 2 read_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 41 /* read_key(p,key,len,s) */ 1 42 2 read_length entry (ptr, fixed (21), fixed (35)), 1 43 /* read_length(p,len,s) */ 1 44 2 open_file entry (ptr, fixed bin, char (*), bit (1) aligned, fixed bin (35)), 1 45 /* open_file(p,mode,desc,not_used,s) */ 1 46 2 close_file entry (ptr, char (*), fixed bin (35)), 1 47 /* close_file(p,desc,s) */ 1 48 2 detach entry (ptr, char (*), fixed bin (35)); 1 49 /* detach(p,desc,s) */ 1 50 1 51 declare iox_$iocb_version_sentinel 1 52 character (4) aligned external static; 1 53 1 54 /* END INCLUDE FILE ..... iocb.incl.pl1 ..... */ 128 129 2 1 /* Begin include file ..... iox_modes.incl.pl1 */ 2 2 2 3 /* Written by C. D. Tavares, 03/17/75 */ 2 4 /* Updated 10/31/77 by CDT to include short iox mode strings */ 2 5 2 6 dcl iox_modes (13) char (24) int static options (constant) aligned initial 2 7 ("stream_input", "stream_output", "stream_input_output", 2 8 "sequential_input", "sequential_output", "sequential_input_output", "sequential_update", 2 9 "keyed_sequential_input", "keyed_sequential_output", "keyed_sequential_update", 2 10 "direct_input", "direct_output", "direct_update"); 2 11 2 12 dcl short_iox_modes (13) char (4) int static options (constant) aligned initial 2 13 ("si", "so", "sio", "sqi", "sqo", "sqio", "squ", "ksqi", "ksqo", "ksqu", "di", "do", "du"); 2 14 2 15 dcl (Stream_input initial (1), 2 16 Stream_output initial (2), 2 17 Stream_input_output initial (3), 2 18 Sequential_input initial (4), 2 19 Sequential_output initial (5), 2 20 Sequential_input_output initial (6), 2 21 Sequential_update initial (7), 2 22 Keyed_sequential_input initial (8), 2 23 Keyed_sequential_output initial (9), 2 24 Keyed_sequential_update initial (10), 2 25 Direct_input initial (11), 2 26 Direct_output initial (12), 2 27 Direct_update initial (13)) fixed bin int static options (constant); 2 28 2 29 /* End include file ..... iox_modes.incl.pl1 */ 130 131 3 1 /* BEGIN INCLUDE FILE ... pit.incl.pl1 */ 3 2 3 3 /****^ ******************************************** 3 4* * * 3 5* * Copyright, (C) Honeywell Bull Inc., 1988 * 3 6* * * 3 7* ******************************************** */ 3 8 3 9 /* Requires user_attributes.incl.pl1 */ 3 10 /* Declaration of the Process Inititalization Table (PIT) */ 3 11 3 12 /****^ HISTORY COMMENTS: 3 13* 1) change(86-03-01,Gilcrease), approve(86-03-27,MCR7370), 3 14* audit(86-06-25,Lippard), install(86-06-30,MR12.0-1082): 3 15* First comment for hcom. Modified 750430 by PG to add terminal_access_class 3 16* Modified 6/20/77 by J. Stern to add term_type_name Modified Feb 1980 by M. 3 17* B. Armstrong to implement multiple rate structures. (UNCA) Modified by R. 3 18* McDonald May 1980 to include page charges, replaces cpu in iod (UNCA) 3 19* Modified by Benson I. Margulies November 1981 do declare pit_$, pit_ptr, 3 20* and unaligned character strings. Modified by E. N. Kittlitz January 1982 3 21* for user_attributes.incl.pl1 changes Modified by E. N. Kittlitz October 3 22* 1982 for request_id. Modified by BIM 1984-09-12 for auth range. The max 3 23* copies the pds, but this is the only home of the min. 3 24* 2) change(86-03-01,Gilcrease), approve(86-03-27,MCR7370), 3 25* audit(86-06-25,Lippard), install(86-06-30,MR12.0-1082): 3 26* Add the truncate_absout and restarted bits for the 3 27* -truncate .absout SCP 6297, version 3. 3 28* 3) change(86-12-11,GDixon), approve(87-07-16,MCR7741), 3 29* audit(87-07-16,Brunelle), install(87-08-04,MR12.1-1056): 3 30* Changed structure under pit.abs_attributes to use like structure in 3 31* abs_attributes.incl.pl1. This allows the same attributes to be used 3 32* in abs_message_format.incl.pl1 and user_table_entry.incl.pl1 as well as 3 33* this include file. 3 34* 4) change(88-06-03,Parisek), approve(88-06-10,MCR7920), 3 35* audit(88-06-23,Hunter), install(87-07-05,MR12.2-1053): 3 36* Remove "pitmsg" in END comment string. pitmsg.incl.pl1 is no longer a 3 37* name of pit.incl.pl1. 3 38* 5) change(88-07-11,Parisek), approve(88-07-11,MCR7849), 3 39* audit(88-07-03,Lippard), install(88-07-13,MR12.2-1047): 3 40* Removed the ringpad element and added the min_ring & max_ring elements so 3 41* users may access their lowest and/or highest possible login ring value. 3 42* SCP6367. 3 43* END HISTORY COMMENTS */ 3 44 3 45 3 46 /* format: style4 */ 3 47 declare pit_$ bit (36) aligned external static; 3 48 declare pit_ptr pointer; 3 49 3 50 dcl 1 pit aligned based (pit_ptr), 3 51 2 version fixed bin, /* indicates which version of the pit */ 3 52 2 process_type fixed bin, /* initializer, interactive, or absentee process */ 3 53 2 login_responder char (64) unal, /* path name of login responder */ 3 54 3 55 /* All of these are going to be word aligned whether or not they are declared aligned, 3 56* and unaligning them cleans up code in many places */ 3 57 3 58 2 homedir char (64) unal, /* path name of home directory */ 3 59 2 project char (28) unal, /* name of this process' project affiliation */ 3 60 2 account char (32) unal, /* name of account to which this process is charged */ 3 61 2 n_processes fixed bin, /* number of previous processes for this session */ 3 62 2 login_time fixed bin (71), /* clock time at login */ 3 63 2 proc_creation_time fixed bin (71), /* clock time at creation of this process */ 3 64 2 old_proc_cpu fixed bin (71), /* cpu time used by previous processes in this session */ 3 65 2 user_weight fixed bin, /* weight of this process */ 3 66 2 anonymous fixed bin, /* 1 if anonymous user */ 3 67 2 login_name char (28) unal, /* name of user given at login */ 3 68 2 logout_pid bit (36), /* process id of answering service */ 3 69 2 logout_channel fixed bin (71), /* channel for signalling logouts to answering service */ 3 70 2 group char (8) unal, /* party group */ 3 71 2 min_ring fixed bin, /* min ring */ 3 72 2 max_ring fixed bin, /* max ring */ 3 73 2 at like user_attributes aligned, /* include user_attributes.incl.pl1 */ 3 74 2 whox fixed bin, /* this process's index in whotab (or 0) */ 3 75 2 outer_module char (32) unaligned, 3 76 2 pad (2) fixed bin, 3 77 2 dont_call_init_admin bit (1) aligned, /* Call process_overseer_ directly */ 3 78 2 terminal_access_class bit (72) aligned, /* access class of user's terminal */ 3 79 2 dollar_charge float bin, /* Month-to-date expenditure */ 3 80 2 dollar_limit float bin, /* Limit stop on usage */ 3 81 2 shift_limit (0:7) float bin, /* Stops on each shift's usage */ 3 82 2 logins fixed bin, /* Number of logins this month */ 3 83 2 crashes fixed bin, /* Number of sessions crashed */ 3 84 2 interactive (0:7), /* interactive usage by shift */ 3 85 3 charge float bin, /* Total charge */ 3 86 3 xxx fixed bin, 3 87 3 cpu fixed bin (71), /* CPU usage in microseconds */ 3 88 3 core fixed bin (71), /* Memory usage in page-microseconds */ 3 89 3 connect fixed bin (71), /* Connect time in microseconds */ 3 90 3 io_ops fixed bin (71), /* Terminal I/O operations */ 3 91 2 absentee (4), /* Absentee usage by queue */ 3 92 3 charge float bin, /* Total absentee charge */ 3 93 3 jobs fixed bin, /* Number of jobs */ 3 94 3 cpu fixed bin (71), /* CPU usage in microseconds */ 3 95 3 memory fixed bin (71), /* Memory usage in mu */ 3 96 2 iod (4), /* IO Daemon usage, by queue */ 3 97 3 charge float bin, /* Total charge */ 3 98 3 pieces fixed bin, /* Number of requests */ 3 99 3 pad fixed bin (35), 3 100 3 pages fixed bin (35), /* number of pages output */ 3 101 3 lines fixed bin (71), /* Record count */ 3 102 2 devices (16) float bin, /* Usage of attached devices */ 3 103 2 time_last_reset fixed bin (71), /* time last updated the PDT */ 3 104 2 absolute_limit float bin, /* Limit, not reset monthly */ 3 105 2 absolute_spent float bin, /* Spending against this */ 3 106 2 absolute_cutoff fixed bin (71), /* Spending will be reset on this date */ 3 107 2 absolute_increm fixed bin, /* .. time increment code. 0 = don't reset */ 3 108 2 rs_number fixed bin (9) unsigned unaligned, /* rate structure number (0= default rates) */ 3 109 2 pad1a fixed bin (27) unsigned unaligned, /* remainder of word */ 3 110 2 request_id fixed bin (71), /* absentee request id */ 3 111 2 authorization_range (2) bit (72) aligned, 3 112 2 pad1 (73) fixed bin, /* extra space */ 3 113 2 charge_type fixed bin, /* device charge type of console */ 3 114 2 term_type_name char (32) unal, /* terminal type name */ 3 115 2 line_type fixed bin, /* line type of user's console */ 3 116 2 tty_type fixed bin, /* old terminal type (obsolete, kept for compatibility) */ 3 117 2 service_type fixed bin, /* type of service console is performing */ 3 118 2 tty_answerback char (4) unaligned, /* original answerback of user's console */ 3 119 2 old_tty char (6), /* (obsolete) attachment name of user's console */ 3 120 2 standby fixed bin, /* 1 if standby user */ 3 121 2 login_line char (120) unal, /* line typed at login */ 3 122 2 cant_bump_until fixed bin (71), /* cannot be preempted until this time (0 for abs) */ 3 123 2 input_seg char (168) unal, /* path name of absentee input file */ 3 124 2 output_seg char (168) unal, /* path name of absentee output file */ 3 125 2 max_cpu_time fixed bin, /* max number of seconds allowed to this absentee proc */ 3 126 2 abs_queue fixed bin, /* absentee queue if absentee, else -1 */ 3 127 2 abs_attributes aligned like user_abs_attributes, /* include abs_attributes.incl.pl1 */ 3 128 2 arg_info_ptr fixed bin (18) unsigned, /* Relative pointer to information on absentee args. */ 3 129 2 old_proc_core fixed bin (71), /* Memory usage by previous processes in this session */ 3 130 2 old_proc_io_ops fixed bin (71), /* I/O operations from previous processes in this session */ 3 131 2 tty char (32) unaligned, /* Attachment name of users channel */ 3 132 2 start_arg_info fixed bin; /* Put absentee args information here. */ 3 133 3 134 3 135 /* Structure to contain information on absentee arguments */ 3 136 dcl 1 arg_info aligned based, 3 137 2 arg_count fixed bin, /* Number of arguments for replacement in absentee segment */ 3 138 2 ln_args fixed bin, /* Length of string containing arguments. */ 3 139 2 arg_lengths (25 refer (arg_info.arg_count)) fixed bin, /* Array of argument lengths */ 3 140 2 args char (128 refer (arg_info.ln_args)) unal; 3 141 /* Args used for replacement in absentee control segment. */ 3 142 3 143 declare PIT_version_3 fixed bin int static options (constant) init (3); 3 144 3 145 /* END INCLUDE FILE ... pit.incl.pl1 */ 132 133 4 1 /* BEGIN INCLUDE FILE ... terminal_io_record.incl.pl1 */ 4 2 /* Created: November 1979 by G. Palter */ 4 3 /* Modified: 26 March 1982 by G. Palter to make the structure more compatible with use of the like attribute */ 4 4 4 5 4 6 /* Record format used by I/O modules designed for communcation with remote I/O daemon stations */ 4 7 4 8 dcl 1 terminal_io_record aligned based (terminal_io_record_ptr), 4 9 2 header, 4 10 3 version fixed binary, 4 11 3 device_type fixed binary, /* type of device sending/receiving this record -- 4 12* reader/printer/punch/teleprinter */ 4 13 3 slew_control, /* slew control data: used for printer and teleprinter only */ 4 14 4 slew_type fixed binary (18) unaligned unsigned, /* type of slewing operation before/after this line -- 4 15* by-count/top-of-form/inside-page/outside-page/to-channel */ 4 16 4 slew_count fixed binary (18) unaligned unsigned,/* # of lines if by count; channel # if to channel */ 4 17 3 flags, 4 18 4 binary bit (1) unaligned, /* ON => data in record should be written in binary mode */ 4 19 4 preslew bit (1) unaligned, /* ON => perform above slew before printing data; 4 20* OFF => perform above slew after printing data */ 4 21 4 pad bit (34) unaligned, 4 22 3 element_size fixed binary, /* # of bits in a data element */ 4 23 3 n_elements fixed binary (24), /* # of elements in the record */ 4 24 2 data, /* force word alignment */ 4 25 3 bits (terminal_io_record_n_elements refer (terminal_io_record.n_elements)) 4 26 bit (terminal_io_record_element_size refer (terminal_io_record.element_size)) unaligned; 4 27 4 28 dcl terminal_io_record_ptr pointer; 4 29 4 30 dcl terminal_io_record_element_size fixed binary; /* used for allocating terminal_io_record structures */ 4 31 dcl terminal_io_record_n_elements fixed binary (24); 4 32 4 33 4 34 /* Manifest constants */ 4 35 4 36 dcl terminal_io_record_version_1 fixed binary static options (constant) initial (1); 4 37 4 38 dcl (TELEPRINTER_DEVICE initial (1), 4 39 READER_DEVICE initial (2), 4 40 PRINTER_DEVICE initial (3), 4 41 PUNCH_DEVICE initial (4)) 4 42 fixed binary static options (constant); 4 43 4 44 dcl (SLEW_BY_COUNT initial (1), 4 45 SLEW_TO_TOP_OF_PAGE initial (2), 4 46 SLEW_TO_INSIDE_PAGE initial (3), /* skip to top of next inside page (head sheet) */ 4 47 SLEW_TO_OUTSIDE_PAGE initial (4), /* skip to top of next outside page (tail sheet) */ 4 48 SLEW_TO_CHANNEL initial (5)) /* skip to specified channel stop */ 4 49 fixed binary static options (constant); 4 50 4 51 4 52 /* Data in record as a character string (terminal_io_record.element_size = 9) */ 4 53 4 54 dcl terminal_io_record_data_chars character (terminal_io_record.n_elements) unaligned 4 55 based (addr (terminal_io_record.bits)); 4 56 4 57 dcl terminal_io_record_data_chars_varying_max_len fixed binary (21); /* Set this before using the varying string. */ 4 58 dcl terminal_io_record_data_chars_varying character (terminal_io_record_data_chars_varying_max_len) varying 4 59 based (addr (terminal_io_record.n_elements)); /* varying string consists of length and data */ 4 60 4 61 4 62 /* Data in record as a bit string (terminal_io_record.element_size = 1) */ 4 63 4 64 dcl terminal_io_record_data_bits bit (terminal_io_record.n_elements) unaligned based (addr (terminal_io_record.bits)); 4 65 4 66 /* END INCLUDE FILE ... terminal_io_record.incl.pl1 */ 134 135 5 1 /* BEGIN INCLUDE FILE ... user_attributes.incl.pl1 TAC 10/79 */ 5 2 5 3 5 4 /****^ HISTORY COMMENTS: 5 5* 1) change(86-12-11,Brunelle), approve(87-07-13,MCR7741), 5 6* audit(87-04-19,GDixon), install(87-08-04,MR12.1-1056): 5 7* Add incl for abs_attributes.incl.pl1 to automatically include absentee 5 8* attribute switches. 5 9* 2) change(87-04-19,GDixon), approve(87-07-13,MCR7741), 5 10* audit(87-07-16,Brunelle), install(87-08-04,MR12.1-1056): 5 11* A) Add USER_ATTRIBUTE_NAMES arrays. attribute_names.incl.pl1 can thereby 5 12* be deleted. 5 13* B) Add constants identifying attributes that can be changed by user at 5 14* login, etc. 5 15* END HISTORY COMMENTS */ 5 16 5 17 5 18 /* Modified 82-01-03 E. N. Kittlitz. to declare a complete level-1 structure */ 5 19 5 20 /* format: style4 */ 5 21 dcl 1 user_attributes aligned based, /* the user user_attributes */ 5 22 (2 administrator bit (1), /* 1 system administrator privileges */ 5 23 2 primary_line bit (1), /* 2 user has primary-line privileges */ 5 24 2 nobump bit (1), /* 2 user cannot be bumped */ 5 25 2 guaranteed_login bit (1), /* 4 user has guaranteed login privileges */ 5 26 2 anonymous bit (1), /* 5 used only in SAT. project may have anon.users */ 5 27 2 nopreempt bit (1), /* 6 used only in PDT. user not preemptable by others 5 28* . of same project (distinct from "nobump") */ 5 29 2 nolist bit (1), /* 7 don't list user on "who" */ 5 30 2 dialok bit (1), /* 8 user may have multiple consoles */ 5 31 2 multip bit (1), /* 9 user may have several processes */ 5 32 2 bumping bit (1), /* 10 in SAT. Can users in project bump each other? */ 5 33 2 brief bit (1), /* 11 no login or logout message */ 5 34 2 vinitproc bit (1), /* 12 user may change initial procedure */ 5 35 2 vhomedir bit (1), /* 13 user may change homedir */ 5 36 2 nostartup bit (1), /* 14 user does not want start_up.ec */ 5 37 2 sb_ok bit (1), /* 15 user may be standby */ 5 38 2 pm_ok bit (1), /* 16 user may be primary */ 5 39 2 eo_ok bit (1), /* 17 user may be edit_only */ 5 40 2 daemon bit (1), /* 18 user may login as daemon */ 5 41 2 vdim bit (1), /* 19 * OBSOLETE * user may change outer mdle */ 5 42 2 no_warning bit (1), /* 20 no warning message */ 5 43 2 igroup bit (1), /* 21 in SAT: this project may give its users individual groups 5 44* . in PDT: this user has an individual load control group */ 5 45 2 save_pdir bit (1), /* 22 save pdir after fatal process error */ 5 46 2 disconnect_ok bit (1), /* 23 ok to save user's disconnected processes */ 5 47 2 save_on_disconnect bit (1), /* 24 save them unless -nosave login arg is given */ 5 48 2 pad bit (12)) unaligned; 5 49 5 50 dcl USER_ATTRIBUTE_NAMES (0:24) char (20) int static options (constant) init 5 51 ("none", /* 0 */ 5 52 "administrator", /* 1 */ 5 53 "primary_line", /* 2 */ 5 54 "nobump", /* 3 */ 5 55 "guaranteed_login", /* 4 */ 5 56 "anonymous", /* 5 */ 5 57 "nopreempt", /* 6 */ 5 58 "nolist", /* 7 */ 5 59 "dialok", /* 8 */ 5 60 "multip", /* 9 */ 5 61 "bumping", /* 10 */ 5 62 "brief", /* 11 */ 5 63 "vinitproc", /* 12 */ 5 64 "vhomedir", /* 13 */ 5 65 "nostartup", /* 14 */ 5 66 "no_secondary", /* 15 */ 5 67 "no_prime", /* 16 */ 5 68 "no_eo", /* 17 */ 5 69 "daemon", /* 18 */ 5 70 "", /* 19 vdim OBSOLETE */ 5 71 "no_warning", /* 20 */ 5 72 "igroup", /* 21 */ 5 73 "save_pdir", /* 22 */ 5 74 "disconnect_ok", /* 23 */ 5 75 "save_on_disconnect"); /* 24 */ 5 76 5 77 dcl ALT_USER_ATTRIBUTE_NAMES (0:24) char (20) int static options (constant) init 5 78 ("null", /* 0 */ 5 79 "admin", /* 1 */ 5 80 "", "", /* 2 - 3 */ 5 81 "guar", /* 4 */ 5 82 "anon", /* 5 */ 5 83 "", "", /* 6 - 7 */ 5 84 "dial", /* 8 */ 5 85 "multi_login", /* 9 */ 5 86 "preempting", /* 10 */ 5 87 "", /* 11 */ 5 88 "v_process_overseer", /* 12 */ 5 89 "v_home_dir", /* 13 */ 5 90 "no_start_up", /* 14 */ 5 91 "no_sec", /* 15 */ 5 92 "no_primary", /* 16 */ 5 93 "no_edit_only", /* 17 */ 5 94 "op_login", /* 18 */ 5 95 "", /* 19 */ 5 96 "nowarn", /* 20 */ 5 97 "", "", "", /* 21 - 23 */ 5 98 "save"); /* 24 */ 5 99 5 100 dcl USER_ATTRIBUTES_always_allowed bit (36) aligned int static 5 101 options(constant) init("000000000010000000010000000000000000"b); 5 102 /* SAT/PDT attributes not needed for user to give (brief, no_warning) */ 5 103 5 104 dcl USER_ATTRIBUTES_default_in_pdt bit (36) aligned int static 5 105 options(constant) init("000000000010000000010000000000000000"b); 5 106 /* PDT value for (brief, no_warning) is default */ 5 107 5 108 dcl USER_ATTRIBUTES_settable_by_user bit (36) aligned int static 5 109 options(constant) init("000100000110010000010000000000000000"b); 5 110 /* user MIGHT set (bump, ns, brief, guar, no_warning) */ 5 111 6 1 /* BEGIN INCLUDE FILE ... user_abs_attributes.incl.pl1 */ 6 2 6 3 /* * * * * * * * * * * * * * * * * * * * * * * * * * */ 6 4 /* */ 6 5 /* This include file describes the attributes of an absentee job. It is */ 6 6 /* used by user_table_entry.incl.pl1, abs_message_format.incl.pl1 */ 6 7 /* and PIT.incl.pl1. */ 6 8 /* */ 6 9 /* * * * * * * * * * * * * * * * * * * * * * * * * * */ 6 10 6 11 /****^ HISTORY COMMENTS: 6 12* 1) change(86-12-08,GDixon), approve(87-07-13,MCR7741), 6 13* audit(87-07-16,Brunelle), install(87-08-04,MR12.1-1056): 6 14* Separated abs_attributes from the request structure 6 15* (abs_message_format.incl.pl1) so that the identical structure could be 6 16* used in the ute structure (user_table_entry.incl.pl1). 6 17* 2) change(87-04-19,GDixon), approve(87-07-13,MCR7741), 6 18* audit(87-07-16,Brunelle), install(87-08-04,MR12.1-1056): 6 19* Added ABS_ATTRIBUTE_NAMES array. 6 20* 3) change(87-11-11,Parisek), approve(88-02-11,MCR7849), 6 21* audit(88-03-22,Lippard), install(88-07-13,MR12.2-1047): 6 22* Added the no_start_up flag. SCP6367 6 23* END HISTORY COMMENTS */ 6 24 6 25 dcl 1 user_abs_attributes aligned based, 6 26 2 restartable bit (1) unaligned, /* 1 if request may be started over from the beginning */ 6 27 2 user_deferred_until_time bit (1) unaligned, /* 1 if request was specified as deferred */ 6 28 2 proxy bit (1) unaligned, /* 1 if request submitted for someone else */ 6 29 2 set_bit_cnt bit (1) unaligned, /* 1 if should set bit count after every write call */ 6 30 2 time_in_gmt bit (1) unaligned, /* 1 if deferred_time is in GMT */ 6 31 2 user_deferred_indefinitely bit (1) unaligned, /* 1 if operator is to say when to run it */ 6 32 2 secondary_ok bit (1) unaligned, /* 1 if ok to log in as secondary foreground user */ 6 33 2 truncate_absout bit (1) unaligned, /* 1 if .absout is to be truncated */ 6 34 2 restarted bit (1) unaligned, /* 1 if job is restarted */ 6 35 2 no_start_up bit (1) unaligned, /* 1 if requested -ns */ 6 36 2 attributes_pad bit (26) unaligned; 6 37 6 38 dcl ABS_ATTRIBUTE_NAMES (10) char (28) varying int static options(constant) init( 6 39 "restartable", 6 40 "user_deferred_until_time", 6 41 "proxy", 6 42 "set_bit_cnt", 6 43 "time_in_gmt", 6 44 "user_deferred_indefinitely", 6 45 "secondary_ok", 6 46 "truncate_absout", 6 47 "restarted", 6 48 "no_start_up"); 6 49 6 50 /* END INCLUDE FILE ... user_abs_attributes.incl.pl1 */ 6 51 5 112 5 113 5 114 /* END INCLUDE FILE ... user_attributes.incl.pl1 */ 136 137 7 1 /* BEGIN INCLUDE FILE io_timeout_info.incl.pl1 */ 7 2 /* Initial version 1982.09.08 by Richard Lamson */ 7 3 7 4 declare 1 input_timeout_info based (timeout_info_ptr) aligned, 7 5 2 timeout fixed binary (71), 7 6 2 buffer_pointer pointer, 7 7 2 buffer_length fixed binary (21), 7 8 2 characters_read fixed binary (21); 7 9 7 10 declare 1 output_timeout_info based (timeout_info_ptr) aligned, 7 11 2 timeout fixed binary (71), 7 12 2 buffer_pointer pointer, 7 13 2 buffer_length fixed binary (21), 7 14 2 characters_written fixed binary (21); 7 15 7 16 declare timeout_info_ptr pointer; 7 17 7 18 /* end include file io_timeout_info.incl.pl1 */ 138 139 140 hasp_stream_attach: entry (iocb_ptr, option_array, com_err_switch, code); 141 142 if iocb_ptr -> iocb.attach_descrip_ptr ^= null () then do; 143 code = error_table_$not_detached; 144 if com_err_switch then 145 call com_err_ (code, ME, "^a", iocb_ptr -> iocb.name); 146 return; 147 end; 148 if hbound (option_array, 1) < 1 then do; 149 code = error_table_$noarg; 150 if com_err_switch then 151 call com_err_ (code, ME, 152 "^/Attach description must be: ""hasp_stream_ TargetSwitch"" or ""hasp_stream_ -target TargetATD"""); 153 return; 154 end; 155 156 atd_ptr, hasp_stream_info_ptr = null (); 157 on cleanup 158 call attach_err_cleanup; 159 160 allocate hasp_stream_info; 161 hasp_stream_info.target_iocb_ptr = null (); 162 hasp_stream_info.temp_seg_ptr = null (); 163 hasp_stream_info.target_switch_name = ""; 164 hasp_stream_info.target_attach_description = ""; 165 hasp_stream_info.must_close_target, hasp_stream_info.must_detach_target = "0"b; 166 call get_temp_segment_ (ME, hasp_stream_info.temp_seg_ptr, code); 167 if code ^= 0 then do; 168 if com_err_switch then 169 call com_err_ (code, ME, "Cannot get temp segment."); 170 return; 171 end; 172 173 call process_option_array (code); 174 if code ^= 0 then 175 goto ATTACH_ERR_EXIT; 176 177 if hasp_stream_info.target_attach_description ^= "" then 178 call attach_target; 179 if code ^= 0 then do; 180 if com_err_switch then 181 call com_err_ (code, ME, "Cannot attach target switch with attach description:^/^a", 182 hasp_stream_info.target_attach_description); 183 goto ATTACH_ERR_EXIT; 184 end; 185 186 allocate atd; 187 atd.string = temp_atd; 188 189 on any_other 190 call any_other_handler (); /* Can't tolerate inconsistent IOCBs */ 191 revert cleanup; 192 call hcs_$set_ips_mask ("0"b, mask); /* Mask IPS signals while changing IOCB */ 193 iocb_ptr -> iocb.attach_descrip_ptr = atd_ptr; 194 iocb_ptr -> iocb.attach_data_ptr = hasp_stream_info_ptr; 195 iocb_ptr -> iocb.detach_iocb = hasp_stream_detach_iocb; 196 iocb_ptr -> iocb.open = hasp_stream_open; 197 iocb_ptr -> iocb.modes = hasp_stream_modes; 198 iocb_ptr -> iocb.control = hasp_stream_control; 199 call iox_$propagate (iocb_ptr); 200 call hcs_$set_ips_mask (mask, "0"b); /* Restore IPS signals */ 201 revert any_other; 202 code = 0; 203 return; 204 205 ATTACH_ERR_EXIT: 206 call attach_err_cleanup (); 207 return; 208 209 210 attach_err_cleanup: proc; 211 if atd_ptr ^= null () then 212 free atd; 213 if hasp_stream_info_ptr ^= null () then do; 214 if hasp_stream_info.temp_seg_ptr ^= null () then 215 call release_temp_segment_ (ME, hasp_stream_info.temp_seg_ptr, (0)); 216 free hasp_stream_info; 217 end; 218 end attach_err_cleanup; 219 220 /* procedure to fill in attach_data and temp_atd from arguments passed via option_array */ 221 222 process_option_array: proc (ec); 223 224 dcl ec fixed bin (35); 225 dcl argN fixed bin; 226 227 ec = 0; 228 229 if option_array (1) = "-target" then do; 230 hasp_stream_info.target_attach_description = ""; 231 temp_atd = rtrim (ME) || " " || option_array (1); 232 do argN = 2 to hbound (option_array, 1); 233 hasp_stream_info.target_attach_description = hasp_stream_info.target_attach_description || 234 option_array (argN) || " "; 235 temp_atd = temp_atd || " " || option_array (argN); 236 end; 237 end; 238 239 else do; 240 if hbound (option_array, 1) ^= 1 then do; 241 ec = error_table_$wrong_no_of_args; 242 if com_err_switch then 243 call com_err_ (ec, ME, 244 "^/Attach description must be: ""hasp_stream_ TargetSwitch"", ""hasp_stream_ -login_channel"" or ""hasp_stream_ -target TargetATD"""); 245 return; 246 end; 247 248 if option_array (1) = "-login_channel" then do; 249 /* get pointer to the PIT to get login channel */ 250 call hcs_$initiate (get_pdir_ (), "pit", "pit_", (0), (0), pit_ptr, ec); 251 if pit_ptr ^= null () 252 then ec = 0; 253 if ec ^= 0 then do; 254 if com_err_switch then 255 call com_err_ (ec, ME, "Unable to get pointer to PIT."); 256 return; 257 end; 258 259 hasp_stream_info.target_attach_description 260 = "hasp_workstation_ -device teleprinter -comm hasp -suppress_dial_manager -tty " || rtrim (pit.tty); 261 temp_atd = rtrim (ME) || " -login_channel -target " || hasp_stream_info.target_attach_description; 262 end; 263 264 else do; 265 hasp_stream_info.target_switch_name = option_array (1); 266 temp_atd = rtrim (ME) || " " || option_array (1); 267 end; 268 269 end; 270 271 end process_option_array; 272 273 hasp_stream_open: entry (iocb_ptr, mode, obsolete, code); 274 275 hasp_stream_info_ptr = iocb_ptr -> iocb.actual_iocb_ptr -> iocb.attach_data_ptr; 276 if mode ^= Stream_input & mode ^= Stream_output & mode ^= Stream_input_output then do; 277 code = error_table_$incompatible_attach; 278 return; 279 end; 280 hasp_stream_info.mode = mode; 281 call open_target; 282 if code ^= 0 then do; 283 call close_and_detach_target; 284 return; 285 end; 286 287 on any_other 288 call any_other_handler (); /* Can't tolerate inconsistent IOCBs */ 289 call hcs_$set_ips_mask ("0"b, mask); /* Mask IPS signals while changing IOCB */ 290 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.detach_iocb = iox_$err_not_closed; 291 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.close = hasp_stream_close; 292 293 if hasp_stream_info.mode = Stream_input then do; 294 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.open_descrip_ptr = addr (si_mode); 295 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.get_line = hasp_stream_get_line; 296 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.get_chars = hasp_stream_get_chars; 297 end; 298 else if hasp_stream_info.mode = Stream_output then do; 299 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.open_descrip_ptr = addr (so_mode); 300 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.put_chars = hasp_stream_put_chars; 301 end; 302 else do; 303 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.open_descrip_ptr = addr (sio_mode); 304 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.get_line = hasp_stream_get_line; 305 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.get_chars = hasp_stream_get_chars; 306 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.put_chars = hasp_stream_put_chars; 307 end; 308 call iox_$propagate (iocb_ptr); 309 call hcs_$set_ips_mask (mask, "0"b); /* Restore IPS signals */ 310 revert any_other; 311 312 return; 313 314 attach_target: proc; 315 316 hasp_stream_info.target_switch_name = "hasp_stream_." || unique_chars_ ("0"b); 317 call iox_$attach_name (hasp_stream_info.target_switch_name, hasp_stream_info.target_iocb_ptr, 318 (hasp_stream_info.target_attach_description), null (), code); 319 if code ^= 0 then 320 return; 321 hasp_stream_info.must_detach_target = "1"b; 322 323 end attach_target; 324 325 open_target: proc; 326 dcl target_mode char (24) var; 327 dcl target_mode_number fixed bin; 328 329 /* First get the IOCB for this switch */ 330 331 call iox_$look_iocb (hasp_stream_info.target_switch_name, hasp_stream_info.target_iocb_ptr, code); 332 if code ^= 0 then 333 return; 334 335 /* Make sure the switch is attached */ 336 337 if hasp_stream_info.target_iocb_ptr -> iocb.actual_iocb_ptr -> iocb.attach_descrip_ptr = null then do; 338 code = error_table_$not_attached; 339 return; 340 end; 341 342 /* If the switch is already open, make sure its opening mode is OK */ 343 344 if hasp_stream_info.target_iocb_ptr -> iocb.actual_iocb_ptr -> iocb.open_descrip_ptr ^= null () then do; 345 target_mode = hasp_stream_info.target_iocb_ptr -> iocb.actual_iocb_ptr -> 346 iocb.open_descrip_ptr -> open_descrip.string; 347 if hasp_stream_info.mode = Stream_input_output then do; 348 if target_mode ^= "sequential_input_output" then 349 code = error_table_$incompatible_attach; 350 end; 351 else if hasp_stream_info.mode = Stream_input then do; 352 if target_mode ^= "sequential_input" & target_mode ^= "sequential_input_output" then 353 code = error_table_$incompatible_attach; 354 end; 355 else if hasp_stream_info.mode = Stream_output then do; 356 if target_mode ^= "sequential_output" & target_mode ^= "sequential_input_output" then 357 code = error_table_$incompatible_attach; 358 end; 359 end; 360 361 else do; /* If it wasn't already open, open it for appropriate mode */ 362 if hasp_stream_info.mode = Stream_input then 363 target_mode_number = Sequential_input; 364 else if hasp_stream_info.mode = Stream_output then 365 target_mode_number = Sequential_output; 366 else target_mode_number = Sequential_input_output; 367 call iox_$open (hasp_stream_info.target_iocb_ptr, target_mode_number, obsolete, code); 368 if code = 0 then 369 hasp_stream_info.must_close_target = "1"b; 370 end; 371 372 end open_target; 373 374 hasp_stream_detach_iocb: entry (iocb_ptr, code); 375 376 hasp_stream_info_ptr = iocb_ptr -> iocb.actual_iocb_ptr -> iocb.attach_data_ptr; 377 on any_other 378 call any_other_handler (); /* Can't tolerate inconsistent IOCBs */ 379 call release_temp_segment_ (ME, hasp_stream_info.temp_seg_ptr, (0)); 380 free iocb_ptr -> iocb.attach_descrip_ptr -> atd; 381 free iocb_ptr -> iocb.attach_data_ptr -> hasp_stream_info; 382 call hcs_$set_ips_mask ("0"b, mask); /* Mask IPS signals while changing IOCB */ 383 iocb_ptr -> iocb.attach_descrip_ptr = null (); 384 call iox_$propagate (iocb_ptr); 385 call hcs_$set_ips_mask (mask, "0"b); /* Restore IPS signals */ 386 revert any_other; 387 code = 0; 388 return; 389 390 hasp_stream_close: entry (iocb_ptr, code); 391 392 hasp_stream_info_ptr = iocb_ptr -> iocb.actual_iocb_ptr -> iocb.attach_data_ptr; 393 call close_and_detach_target; 394 on any_other 395 call any_other_handler (); /* Can't tolerate inconsistent IOCBs */ 396 call hcs_$set_ips_mask ("0"b, mask); /* Mask IPS signals while changing IOCB */ 397 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.open_descrip_ptr = null (); 398 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.open = hasp_stream_open; 399 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.detach_iocb = hasp_stream_detach_iocb; 400 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.modes = iox_$err_not_open; 401 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.control = iox_$err_not_open; 402 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.get_chars = iox_$err_not_open; 403 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.put_chars = iox_$err_not_open; 404 iocb_ptr -> iocb.actual_iocb_ptr -> iocb.get_line = iox_$err_not_open; 405 406 call iox_$propagate (iocb_ptr); 407 call hcs_$set_ips_mask (mask, "0"b); /* Restore IPS signals */ 408 revert any_other; 409 code = 0; 410 return; 411 412 hasp_stream_get_chars: entry (iocb_ptr, buffer_ptr, buffer_length, n_read, code); 413 hasp_stream_get_line: entry (iocb_ptr, buffer_ptr, buffer_length, n_read, code); 414 415 hasp_stream_info_ptr = iocb_ptr -> iocb.actual_iocb_ptr -> iocb.attach_data_ptr; 416 terminal_io_record_ptr = hasp_stream_info.temp_seg_ptr; 417 terminal_io_record.n_elements = 0; /* Might not be set if code ^= 0 */ 418 n_read = 0; 419 420 call iox_$read_record (hasp_stream_info.target_iocb_ptr, terminal_io_record_ptr, (4 * sys_info$max_seg_size), (0), 421 code); 422 423 if terminal_io_record.n_elements ^= 0 then 424 call convert_input (buffer_ptr, buffer_length, n_read, code); 425 426 return; 427 428 hasp_stream_put_chars: entry (iocb_ptr, buffer_ptr, buffer_length, code); 429 430 hasp_stream_info_ptr = iocb_ptr -> iocb.actual_iocb_ptr -> iocb.attach_data_ptr; 431 terminal_io_record_ptr = hasp_stream_info.temp_seg_ptr; 432 433 line_start_pos = 0; 434 call get_next_line (buffer_ptr, buffer_length, line_start_ptr, line_start_pos, line_length); 435 do while (line_start_ptr ^= null ()); 436 call convert_output (line_start_ptr, line_length); 437 call iox_$write_record (hasp_stream_info.target_iocb_ptr, terminal_io_record_ptr, 438 (4 * currentsize (terminal_io_record)), code); 439 call get_next_line (buffer_ptr, buffer_length, line_start_ptr, line_start_pos, line_length); 440 end; 441 442 return; 443 444 hasp_stream_control: entry (iocb_ptr, order, info_ptr, code); 445 446 /* Just pass through all orders except the timeout orders that need to be changed a bit. */ 447 448 hasp_stream_info_ptr = iocb_ptr -> iocb.actual_iocb_ptr -> iocb.attach_data_ptr; 449 450 if order = "get_chars_timeout" | order = "get_line_timeout" then do; 451 terminal_io_record_ptr = hasp_stream_info.temp_seg_ptr; 452 terminal_io_record.n_elements = 0; 453 timeout_info_ptr = info_ptr; 454 local_input_timeout_info.timeout = input_timeout_info.timeout; 455 local_input_timeout_info.buffer_pointer = terminal_io_record_ptr; 456 local_input_timeout_info.buffer_length = 4 * sys_info$max_seg_size; 457 input_timeout_info.characters_read = 0; 458 call iox_$control (hasp_stream_info.target_iocb_ptr, 459 "read_record_timeout", addr (local_input_timeout_info), code); 460 if terminal_io_record.n_elements ^= 0 then 461 call convert_input (input_timeout_info.buffer_pointer, input_timeout_info.buffer_length, 462 input_timeout_info.characters_read, code); 463 end; 464 else if order = "put_chars_timeout" then do; 465 terminal_io_record_ptr = hasp_stream_info.temp_seg_ptr; 466 timeout_info_ptr = info_ptr; 467 468 output_timeout_info.characters_written = 0; 469 stop_time = clock () + input_timeout_info.timeout; 470 terminal_io_header_length = bin (rel (addr (terminal_io_record.data))); 471 line_start_pos = 0; 472 call get_next_line (output_timeout_info.buffer_pointer, 473 output_timeout_info.buffer_length, line_start_ptr, line_start_pos, line_length); 474 do while (line_start_ptr ^= null ()); 475 call convert_output (line_start_ptr, line_length); 476 local_output_timeout_info.timeout = max (0, stop_time - clock ()); 477 local_output_timeout_info.buffer_length = 4 * currentsize (terminal_io_record); 478 local_output_timeout_info.buffer_pointer = terminal_io_record_ptr; 479 call iox_$control (hasp_stream_info.target_iocb_ptr, 480 "write_record_timeout", addr (local_output_timeout_info), code); 481 if code ^= 0 then 482 return; 483 output_timeout_info.characters_written = 484 line_start_pos + line_length; /* write_record_timeout writes all or none */ 485 call get_next_line (output_timeout_info.buffer_pointer, 486 output_timeout_info.buffer_length, line_start_ptr, line_start_pos, line_length); 487 end; 488 if output_timeout_info.characters_written > output_timeout_info.buffer_length then 489 output_timeout_info.characters_written = 490 output_timeout_info.buffer_length; /* Can happen if no NL at end */ 491 end; 492 else call iox_$control (hasp_stream_info.target_iocb_ptr, 493 order, info_ptr, code); 494 495 return; 496 497 hasp_stream_modes: entry (iocb_ptr, new_modes, old_modes, code); 498 499 hasp_stream_info_ptr = iocb_ptr -> iocb.actual_iocb_ptr -> iocb.attach_data_ptr; 500 501 call iox_$modes (hasp_stream_info.target_iocb_ptr, new_modes, old_modes, code); 502 503 return; 504 505 /* procedure to close target switch if opened by hasp_stream_, and detach 506* if attached by hasp_stream_ */ 507 508 close_and_detach_target: proc; 509 510 if hasp_stream_info.must_close_target then 511 call iox_$close (hasp_stream_info.target_iocb_ptr, 0); 512 hasp_stream_info.must_close_target = "0"b; 513 if hasp_stream_info.must_detach_target then 514 call iox_$detach_iocb (hasp_stream_info.target_iocb_ptr, 0); 515 hasp_stream_info.must_detach_target = "0"b; 516 517 end close_and_detach_target; 518 519 any_other_handler: proc; 520 521 dcl 1 fatal_error_info aligned, 522 2 version fixed bin, 523 2 status_code fixed bin (35); 524 525 if get_group_id_ () = "Initializer.SysDaemon.z" 526 then do; 527 528 if mask then call hcs_$set_ips_mask (mask, "0"b); 529 mask = ""b; 530 531 call continue_to_signal_ ((0)); /* hope to get an asdump */ 532 end; 533 else do; 534 fatal_error_info.version = 0; 535 fatal_error_info.status_code = error_table_$unable_to_do_io; 536 537 call terminate_process_ ("fatal_error", addr (fatal_error_info)); 538 end; 539 540 end any_other_handler; 541 542 convert_output: proc (output_string_ptr, output_string_length); 543 544 dcl output_string_ptr ptr; 545 dcl output_string_length fixed bin (21); 546 dcl output_string char (output_string_length) based (output_string_ptr); 547 548 dcl NO_CONTROL_CHARS character (512) initial (copy (SP, 32) || substr (collate (), 33) || copy (SP, 384)); 549 550 terminal_io_record.version = terminal_io_record_version_1; 551 terminal_io_record.device_type = TELEPRINTER_DEVICE; 552 terminal_io_record.slew_type = SLEW_BY_COUNT; 553 terminal_io_record.slew_count = 1; 554 string (terminal_io_record.flags) = ""b; 555 terminal_io_record.element_size = 9; 556 terminal_io_record.n_elements = length (output_string); 557 terminal_io_record_data_chars = translate (output_string, NO_CONTROL_CHARS); 558 /* convert control characters and non-ASCII to spaces */ 559 end convert_output; 560 561 convert_input: proc (input_buffer_ptr, input_buffer_length, n_read, ec); 562 563 dcl input_buffer_ptr ptr; 564 dcl input_buffer_length fixed bin (21); 565 dcl n_read fixed bin (21); 566 dcl ec fixed bin (35); 567 dcl 1 input_buffer based (input_buffer_ptr), 568 2 data char (min (n_read - 1, input_buffer_length)), 569 2 new_line char (1); 570 571 ec = 0; 572 n_read = terminal_io_record.n_elements + 1; 573 574 input_buffer.data = terminal_io_record_data_chars; 575 if n_read < input_buffer_length then 576 input_buffer.new_line = NL; 577 else ec = error_table_$long_record; 578 579 end convert_input; 580 581 get_next_line: proc (buf_ptr, buf_len, line_start_ptr, line_start_pos, line_len); 582 583 dcl buf_ptr ptr; 584 dcl buf_len fixed bin (21); 585 dcl line_start_ptr ptr; 586 dcl line_start_pos fixed bin (21); 587 dcl line_len fixed bin (21); 588 dcl next_NL fixed bin (21); 589 dcl buffer char (buf_len) based (buf_ptr); 590 591 if buf_len <= 0 then do; /* Catch zero-length buffer */ 592 line_start_ptr = null (); 593 return; 594 end; 595 596 if line_start_pos = 0 then 597 line_start_pos = 1; 598 else do; 599 line_start_pos = line_start_pos + line_length; /* Move past prev line */ 600 if line_start_pos > buf_len then do; /* Could be at end if prev line didn't end in NL */ 601 line_start_ptr = null (); 602 return; 603 end; 604 if substr (buffer, line_start_pos, 1) = NL then 605 line_start_pos = line_start_pos + 1; /* Bump past NL at end of prev line */ 606 if line_start_pos > buf_len then do; /* Check again for end */ 607 line_start_ptr = null (); 608 return; 609 end; 610 end; 611 612 line_start_ptr = addcharno (buf_ptr, line_start_pos - 1); 613 next_NL = index (substr (buffer, line_start_pos), NL); 614 if next_NL = 0 then /* No NL at buffer end */ 615 line_length = buf_len - line_start_pos + 1; 616 else line_length = next_NL - 1; 617 618 end get_next_line; 619 620 end hasp_stream_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/13/88 0935.7 hasp_stream_.pl1 >special_ldd>install>MR12.2-1047>hasp_stream_.pl1 128 1 05/20/83 1846.4 iocb.incl.pl1 >ldd>include>iocb.incl.pl1 130 2 02/02/78 1229.7 iox_modes.incl.pl1 >ldd>include>iox_modes.incl.pl1 132 3 07/13/88 0930.5 pit.incl.pl1 >special_ldd>install>MR12.2-1047>pit.incl.pl1 134 4 11/12/82 1624.8 terminal_io_record.incl.pl1 >ldd>include>terminal_io_record.incl.pl1 136 5 08/06/87 0913.6 user_attributes.incl.pl1 >ldd>include>user_attributes.incl.pl1 5-112 6 07/13/88 0900.1 user_abs_attributes.incl.pl1 >special_ldd>install>MR12.2-1047>user_abs_attributes.incl.pl1 138 7 10/19/82 2111.7 io_timeout_info.incl.pl1 >ldd>include>io_timeout_info.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. ME 000025 constant char(32) initial packed unaligned dcl 92 set ref 144* 150* 166* 168* 180* 214* 231 242* 254* 261 266 379* NL 004302 constant char(1) initial packed unaligned dcl 94 ref 575 604 613 NO_CONTROL_CHARS 000332 automatic char(512) initial packed unaligned dcl 548 set ref 548* 557 SLEW_BY_COUNT constant fixed bin(17,0) initial dcl 4-44 ref 552 SP constant char(1) initial packed unaligned dcl 93 ref 548 548 Sequential_input constant fixed bin(17,0) initial dcl 2-15 ref 362 Sequential_input_output constant fixed bin(17,0) initial dcl 2-15 ref 366 Sequential_output constant fixed bin(17,0) initial dcl 2-15 ref 364 Stream_input constant fixed bin(17,0) initial dcl 2-15 ref 276 293 351 362 Stream_input_output constant fixed bin(17,0) initial dcl 2-15 ref 276 347 Stream_output constant fixed bin(17,0) initial dcl 2-15 ref 276 298 355 364 TELEPRINTER_DEVICE constant fixed bin(17,0) initial dcl 4-38 ref 551 actual_iocb_ptr 12 based pointer level 2 dcl 1-6 ref 275 290 291 294 295 296 299 300 303 304 305 306 337 344 345 376 392 397 398 399 400 401 402 403 404 415 430 448 499 addcharno builtin function dcl 120 ref 612 addr builtin function dcl 120 ref 294 299 303 458 458 470 479 479 537 537 557 574 any_other 000236 stack reference condition dcl 125 ref 189 201 287 310 377 386 394 408 argN 000270 automatic fixed bin(17,0) dcl 225 set ref 232* 233 235* atd based structure level 1 dcl 103 set ref 186 211 380 atd_ptr 000106 automatic pointer dcl 80 set ref 156* 186* 187 193 211 211 attach_data_ptr 16 based pointer level 2 dcl 1-6 set ref 194* 275 376 381 392 415 430 448 499 attach_descrip_ptr 14 based pointer level 2 dcl 1-6 set ref 142 193* 337 380 383* bin builtin function dcl 120 ref 470 bits 6 based bit array level 3 packed packed unaligned dcl 4-8 set ref 557 574 buf_len parameter fixed bin(21,0) dcl 584 ref 581 591 600 604 606 613 614 buf_ptr parameter pointer dcl 583 ref 581 604 612 613 buffer based char packed unaligned dcl 589 ref 604 613 buffer_length parameter fixed bin(21,0) dcl 61 in procedure "hasp_stream_" set ref 412 413 423* 428 434* 439* buffer_length 4 000212 automatic fixed bin(21,0) level 2 in structure "local_input_timeout_info" dcl 82 in procedure "hasp_stream_" set ref 456* buffer_length 4 based fixed bin(21,0) level 2 in structure "output_timeout_info" dcl 7-10 in procedure "hasp_stream_" set ref 472* 485* 488 488 buffer_length 4 based fixed bin(21,0) level 2 in structure "input_timeout_info" dcl 7-4 in procedure "hasp_stream_" set ref 460* buffer_length 4 000220 automatic fixed bin(21,0) level 2 in structure "local_output_timeout_info" dcl 83 in procedure "hasp_stream_" set ref 477* buffer_pointer 2 based pointer level 2 in structure "output_timeout_info" dcl 7-10 in procedure "hasp_stream_" set ref 472* 485* buffer_pointer 2 based pointer level 2 in structure "input_timeout_info" dcl 7-4 in procedure "hasp_stream_" set ref 460* buffer_pointer 2 000220 automatic pointer level 2 in structure "local_output_timeout_info" dcl 83 in procedure "hasp_stream_" set ref 478* buffer_pointer 2 000212 automatic pointer level 2 in structure "local_input_timeout_info" dcl 82 in procedure "hasp_stream_" set ref 455* buffer_ptr parameter pointer dcl 62 set ref 412 413 423* 428 434* 439* characters_read 5 based fixed bin(21,0) level 2 dcl 7-4 set ref 457* 460* characters_written 5 based fixed bin(21,0) level 2 dcl 7-10 set ref 468* 483* 488 488* cleanup 000244 stack reference condition dcl 126 ref 157 191 clock builtin function dcl 120 ref 469 476 close 36 based entry variable level 2 dcl 1-6 set ref 291* code parameter fixed bin(35,0) dcl 63 set ref 140 143* 144* 149* 150* 166* 167 168* 173* 174 179 180* 202* 273 277* 282 317* 319 331* 332 338* 348* 352* 356* 367* 368 374 387* 390 409* 412 413 420* 423* 428 437* 444 458* 460* 479* 481 492* 497 501* collate builtin function dcl 120 ref 548 com_err_ 000022 constant entry external dcl 30 ref 144 150 168 180 242 254 com_err_switch parameter bit(1) dcl 64 ref 140 144 150 168 180 242 254 continue_to_signal_ 000010 constant entry external dcl 25 ref 531 control 66 based entry variable level 2 dcl 1-6 set ref 198* 401* copy builtin function dcl 120 ref 548 548 currentsize builtin function dcl 120 ref 437 477 data based char level 2 in structure "input_buffer" packed packed unaligned dcl 567 in procedure "convert_input" set ref 574* data 6 based structure level 2 in structure "terminal_io_record" dcl 4-8 in procedure "hasp_stream_" set ref 470 detach_iocb 26 based entry variable level 2 dcl 1-6 set ref 195* 290* 399* device_type 1 based fixed bin(17,0) level 3 dcl 4-8 set ref 551* ec parameter fixed bin(35,0) dcl 224 in procedure "process_option_array" set ref 222 227* 241* 242* 250* 251* 253 254* ec parameter fixed bin(35,0) dcl 566 in procedure "convert_input" set ref 561 571* 577* element_size 4 based fixed bin(17,0) level 3 dcl 4-8 set ref 437 477 555* 557 574 error_table_$incompatible_attach 000074 external static fixed bin(35,0) dcl 54 ref 277 348 352 356 error_table_$long_record 000066 external static fixed bin(35,0) dcl 51 ref 577 error_table_$noarg 000072 external static fixed bin(35,0) dcl 53 ref 149 error_table_$not_attached 000076 external static fixed bin(35,0) dcl 55 ref 338 error_table_$not_detached 000100 external static fixed bin(35,0) dcl 56 ref 143 error_table_$unable_to_do_io 000070 external static fixed bin(35,0) dcl 52 ref 535 error_table_$wrong_no_of_args 000102 external static fixed bin(35,0) dcl 57 ref 241 fatal_error_info 000100 automatic structure level 1 dcl 521 set ref 537 537 flags 3 based structure level 3 dcl 4-8 set ref 554* get_chars 46 based entry variable level 2 dcl 1-6 set ref 296* 305* 402* get_group_id_ 000012 constant entry external dcl 26 ref 525 get_line 42 based entry variable level 2 dcl 1-6 set ref 295* 304* 404* get_pdir_ 000014 constant entry external dcl 27 ref 250 250 get_temp_segment_ 000016 constant entry external dcl 28 ref 166 hasp_stream_info based structure level 1 dcl 109 set ref 160 216 381 hasp_stream_info_ptr 000102 automatic pointer dcl 78 set ref 156* 160* 161 162 163 164 165 165 166 177 180 194 213 214 214 216 230 233 233 259 261 265 275* 280 293 298 316 317 317 317 321 331 331 337 344 345 347 351 355 362 364 367 368 376* 379 392* 415* 416 420 430* 431 437 448* 451 458 465 479 492 499* 501 510 510 512 513 513 515 hbound builtin function dcl 120 ref 148 232 240 hcs_$initiate 000024 constant entry external dcl 31 ref 250 hcs_$set_ips_mask 000026 constant entry external dcl 32 ref 192 200 289 309 382 385 396 407 528 header based structure level 2 dcl 4-8 index builtin function dcl 120 ref 613 info_ptr parameter pointer dcl 72 set ref 444 453 466 492* input_buffer based structure level 1 packed packed unaligned dcl 567 input_buffer_length parameter fixed bin(21,0) dcl 564 ref 561 574 575 575 input_buffer_ptr parameter pointer dcl 563 ref 561 574 575 input_timeout_info based structure level 1 dcl 7-4 iocb based structure level 1 dcl 1-6 iocb_ptr parameter pointer dcl 65 set ref 140 142 144 193 194 195 196 197 198 199* 273 275 290 291 294 295 296 299 300 303 304 305 306 308* 374 376 380 381 383 384* 390 392 397 398 399 400 401 402 403 404 406* 412 413 415 428 430 444 448 497 499 iox_$attach_name 000050 constant entry external dcl 41 ref 317 iox_$close 000042 constant entry external dcl 38 ref 510 iox_$control 000060 constant entry external dcl 45 ref 458 479 492 iox_$detach_iocb 000040 constant entry external dcl 37 ref 513 iox_$err_not_closed 000056 constant entry external dcl 44 ref 290 iox_$err_not_open 000054 constant entry external dcl 43 ref 400 401 402 403 404 iox_$look_iocb 000044 constant entry external dcl 39 ref 331 iox_$modes 000032 constant entry external dcl 34 ref 501 iox_$open 000046 constant entry external dcl 40 ref 367 iox_$propagate 000052 constant entry external dcl 42 ref 199 308 384 406 iox_$read_record 000036 constant entry external dcl 36 ref 420 iox_$write_record 000034 constant entry external dcl 35 ref 437 length based fixed bin(17,0) level 2 in structure "atd" dcl 103 in procedure "hasp_stream_" set ref 186* 187 211 345 380 length builtin function dcl 120 in procedure "hasp_stream_" ref 186 186 556 line_len parameter fixed bin(21,0) dcl 587 ref 581 line_length 000234 automatic fixed bin(21,0) dcl 87 set ref 434* 436* 439* 472* 475* 483 485* 599 614* 616* line_start_pos 000230 automatic fixed bin(21,0) dcl 85 in procedure "hasp_stream_" set ref 433* 434* 439* 471* 472* 483 485* line_start_pos parameter fixed bin(21,0) dcl 586 in procedure "get_next_line" set ref 581 596 596* 599* 599 600 604 604* 604 606 612 613 614 line_start_ptr 000232 automatic pointer dcl 86 in procedure "hasp_stream_" set ref 434* 435 436* 439* 472* 474 475* 485* line_start_ptr parameter pointer dcl 585 in procedure "get_next_line" set ref 581 592* 601* 607* 612* local_input_timeout_info 000212 automatic structure level 1 dcl 82 set ref 458 458 local_output_timeout_info 000220 automatic structure level 1 dcl 83 set ref 479 479 mask 000104 automatic bit(36) dcl 79 set ref 192* 200* 289* 309* 382* 385* 396* 407* 528 528* 529* max builtin function dcl 120 ref 476 min builtin function dcl 120 ref 574 575 mode parameter fixed bin(17,0) dcl 69 in procedure "hasp_stream_" ref 273 276 276 276 280 mode 4 based fixed bin(17,0) level 2 in structure "hasp_stream_info" dcl 109 in procedure "hasp_stream_" set ref 280* 293 298 347 351 355 362 364 modes 56 based entry variable level 2 dcl 1-6 set ref 197* 400* must_close_target 116 based bit(1) level 2 dcl 109 set ref 165* 368* 510 512* must_detach_target 117 based bit(1) level 2 dcl 109 set ref 165* 321* 513 515* n_elements 5 based fixed bin(24,0) level 3 dcl 4-8 set ref 417* 423 437 452* 460 477 556* 557 572 574 n_read parameter fixed bin(21,0) dcl 66 in procedure "hasp_stream_" set ref 412 413 418* 423* n_read parameter fixed bin(21,0) dcl 565 in procedure "convert_input" set ref 561 572* 574 575 575 name 1 based char(32) level 2 dcl 1-6 set ref 144* new_line based char(1) level 2 packed packed unaligned dcl 567 set ref 575* new_modes parameter char packed unaligned dcl 70 set ref 497 501* next_NL 000546 automatic fixed bin(21,0) dcl 588 set ref 613* 614 616 null builtin function dcl 120 ref 142 156 161 162 211 213 214 251 317 317 337 344 383 397 435 474 592 601 607 obsolete parameter bit(1) dcl 67 set ref 273 367* old_modes parameter char packed unaligned dcl 71 set ref 497 501* open 32 based entry variable level 2 dcl 1-6 set ref 196* 398* open_descrip based structure level 1 dcl 107 open_descrip_ptr 20 based pointer level 2 dcl 1-6 set ref 294* 299* 303* 344 345 397* option_array parameter varying char array dcl 68 ref 140 148 229 231 232 233 235 240 248 265 266 order parameter char packed unaligned dcl 73 set ref 444 450 450 464 492* output_string based char packed unaligned dcl 546 ref 556 557 output_string_length parameter fixed bin(21,0) dcl 545 ref 542 556 557 output_string_ptr parameter pointer dcl 544 ref 542 556 557 output_timeout_info based structure level 1 dcl 7-10 pit based structure level 1 dcl 3-50 pit_ptr 000252 automatic pointer dcl 3-48 set ref 250* 251 259 put_chars 52 based entry variable level 2 dcl 1-6 set ref 300* 306* 403* rel builtin function dcl 120 ref 470 release_temp_segment_ 000020 constant entry external dcl 29 ref 214 379 rtrim builtin function dcl 120 ref 231 259 261 266 si_mode 000000 constant varying char(24) initial dcl 98 set ref 294 sio_mode 000016 constant varying char(24) initial dcl 96 set ref 303 slew_control 2 based structure level 3 dcl 4-8 slew_count 2(18) based fixed bin(18,0) level 4 packed packed unsigned unaligned dcl 4-8 set ref 553* slew_type 2 based fixed bin(18,0) level 4 packed packed unsigned unaligned dcl 4-8 set ref 552* so_mode 000007 constant varying char(24) initial dcl 97 set ref 299 status_code 1 000100 automatic fixed bin(35,0) level 2 dcl 521 set ref 535* stop_time 000226 automatic fixed bin(71,0) dcl 84 set ref 469* 476 string builtin function dcl 120 in procedure "hasp_stream_" set ref 554* string 1 based char level 2 in structure "open_descrip" dcl 107 in procedure "hasp_stream_" ref 345 string 1 based char level 2 in structure "atd" dcl 103 in procedure "hasp_stream_" set ref 187* substr builtin function dcl 120 ref 548 604 613 sys_info$max_seg_size 000064 external static fixed bin(35,0) dcl 50 ref 420 456 target_attach_description 5 based varying char(256) level 2 dcl 109 set ref 164* 177 180* 230* 233* 233 259* 261 317 target_iocb_ptr 2 based pointer level 2 dcl 109 set ref 161* 317* 331* 337 344 345 367* 420* 437* 458* 479* 492* 501* 510* 513* target_mode 000306 automatic varying char(24) dcl 326 set ref 345* 348 352 352 356 356 target_mode_number 000315 automatic fixed bin(17,0) dcl 327 set ref 362* 364* 366* 367* target_switch_name 106 based char(32) level 2 packed packed unaligned dcl 109 set ref 163* 265* 316* 317* 331* temp_atd 000110 automatic varying char(256) dcl 81 set ref 186 186 187 231* 235* 235 261* 266* temp_seg_ptr based pointer level 2 dcl 109 set ref 162* 166* 214 214* 379* 416 431 451 465 terminal_io_header_length 000100 automatic fixed bin(21,0) dcl 77 set ref 470* terminal_io_record based structure level 1 dcl 4-8 set ref 437 477 terminal_io_record_data_chars based char packed unaligned dcl 4-54 set ref 557* 574 terminal_io_record_ptr 000254 automatic pointer dcl 4-28 set ref 416* 417 420* 423 431* 437* 437 451* 452 455 460 465* 470 477 478 550 551 552 553 554 555 556 557 557 572 574 574 terminal_io_record_version_1 constant fixed bin(17,0) initial dcl 4-36 ref 550 terminate_process_ 000062 constant entry external dcl 46 ref 537 timeout based fixed bin(71,0) level 2 in structure "input_timeout_info" dcl 7-4 in procedure "hasp_stream_" ref 454 469 timeout 000220 automatic fixed bin(71,0) level 2 in structure "local_output_timeout_info" dcl 83 in procedure "hasp_stream_" set ref 476* timeout 000212 automatic fixed bin(71,0) level 2 in structure "local_input_timeout_info" dcl 82 in procedure "hasp_stream_" set ref 454* timeout_info_ptr 000256 automatic pointer dcl 7-16 set ref 453* 454 457 460 460 460 466* 468 469 472 472 483 485 485 488 488 488 488 translate builtin function dcl 120 ref 557 tty 730 based char(32) level 2 packed packed unaligned dcl 3-50 ref 259 unique_chars_ 000030 constant entry external dcl 33 ref 316 user_abs_attributes based structure level 1 dcl 6-25 user_attributes based structure level 1 dcl 5-21 version based fixed bin(17,0) level 3 in structure "terminal_io_record" dcl 4-8 in procedure "hasp_stream_" set ref 550* version 000100 automatic fixed bin(17,0) level 2 in structure "fatal_error_info" dcl 521 in procedure "any_other_handler" set ref 534* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ABS_ATTRIBUTE_NAMES internal static varying char(28) initial array dcl 6-38 ALT_USER_ATTRIBUTE_NAMES internal static char(20) initial array packed unaligned dcl 5-77 Direct_input internal static fixed bin(17,0) initial dcl 2-15 Direct_output internal static fixed bin(17,0) initial dcl 2-15 Direct_update internal static fixed bin(17,0) initial dcl 2-15 Keyed_sequential_input internal static fixed bin(17,0) initial dcl 2-15 Keyed_sequential_output internal static fixed bin(17,0) initial dcl 2-15 Keyed_sequential_update internal static fixed bin(17,0) initial dcl 2-15 PIT_version_3 internal static fixed bin(17,0) initial dcl 3-143 PRINTER_DEVICE internal static fixed bin(17,0) initial dcl 4-38 PUNCH_DEVICE internal static fixed bin(17,0) initial dcl 4-38 READER_DEVICE internal static fixed bin(17,0) initial dcl 4-38 SLEW_TO_CHANNEL internal static fixed bin(17,0) initial dcl 4-44 SLEW_TO_INSIDE_PAGE internal static fixed bin(17,0) initial dcl 4-44 SLEW_TO_OUTSIDE_PAGE internal static fixed bin(17,0) initial dcl 4-44 SLEW_TO_TOP_OF_PAGE internal static fixed bin(17,0) initial dcl 4-44 Sequential_update internal static fixed bin(17,0) initial dcl 2-15 USER_ATTRIBUTES_always_allowed internal static bit(36) initial dcl 5-100 USER_ATTRIBUTES_default_in_pdt internal static bit(36) initial dcl 5-104 USER_ATTRIBUTES_settable_by_user internal static bit(36) initial dcl 5-108 USER_ATTRIBUTE_NAMES internal static char(20) initial array packed unaligned dcl 5-50 arg_info based structure level 1 dcl 3-136 iox_$iocb_version_sentinel external static char(4) dcl 1-51 iox_modes internal static char(24) initial array dcl 2-6 pit_$ external static bit(36) dcl 3-47 short_iox_modes internal static char(4) initial array dcl 2-12 terminal_io_record_data_bits based bit packed unaligned dcl 4-64 terminal_io_record_data_chars_varying based varying char dcl 4-58 terminal_io_record_data_chars_varying_max_len automatic fixed bin(21,0) dcl 4-57 terminal_io_record_element_size automatic fixed bin(17,0) dcl 4-30 terminal_io_record_n_elements automatic fixed bin(24,0) dcl 4-31 NAMES DECLARED BY EXPLICIT CONTEXT. ATTACH_ERR_EXIT 001100 constant label dcl 205 ref 174 183 any_other_handler 003746 constant entry internal dcl 519 ref 189 287 377 394 attach_err_cleanup 002541 constant entry internal dcl 210 ref 157 205 attach_target 003404 constant entry internal dcl 314 ref 177 close_and_detach_target 003706 constant entry internal dcl 508 ref 283 393 convert_input 004134 constant entry internal dcl 561 ref 423 460 convert_output 004051 constant entry internal dcl 542 ref 436 475 get_next_line 004172 constant entry internal dcl 581 ref 434 439 472 485 hasp_stream_ 000411 constant entry external dcl 11 hasp_stream_attach 000424 constant entry external dcl 140 hasp_stream_close 001515 constant entry external dcl 390 ref 291 hasp_stream_control 002116 constant entry external dcl 444 ref 198 hasp_stream_detach_iocb 001336 constant entry external dcl 374 ref 195 399 hasp_stream_get_chars 001666 constant entry external dcl 412 ref 296 305 hasp_stream_get_line 001701 constant entry external dcl 413 ref 295 304 hasp_stream_modes 002460 constant entry external dcl 497 ref 197 hasp_stream_open 001112 constant entry external dcl 273 ref 196 398 hasp_stream_put_chars 001774 constant entry external dcl 428 ref 300 306 open_target 003513 constant entry internal dcl 325 ref 281 process_option_array 002620 constant entry internal dcl 222 ref 173 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 5044 5150 4304 5054 Length 5612 4304 104 426 540 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME hasp_stream_ 662 external procedure is an external procedure. on unit on line 157 64 on unit on unit on line 189 64 on unit attach_err_cleanup 80 internal procedure is called by several nonquick procedures. process_option_array internal procedure shares stack frame of external procedure hasp_stream_. on unit on line 287 64 on unit attach_target internal procedure shares stack frame of external procedure hasp_stream_. open_target internal procedure shares stack frame of external procedure hasp_stream_. on unit on line 377 64 on unit on unit on line 394 64 on unit close_and_detach_target internal procedure shares stack frame of external procedure hasp_stream_. any_other_handler 92 internal procedure is called by several nonquick procedures. convert_output internal procedure shares stack frame of external procedure hasp_stream_. convert_input internal procedure shares stack frame of external procedure hasp_stream_. get_next_line internal procedure shares stack frame of external procedure hasp_stream_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME any_other_handler 000100 fatal_error_info any_other_handler hasp_stream_ 000100 terminal_io_header_length hasp_stream_ 000102 hasp_stream_info_ptr hasp_stream_ 000104 mask hasp_stream_ 000106 atd_ptr hasp_stream_ 000110 temp_atd hasp_stream_ 000212 local_input_timeout_info hasp_stream_ 000220 local_output_timeout_info hasp_stream_ 000226 stop_time hasp_stream_ 000230 line_start_pos hasp_stream_ 000232 line_start_ptr hasp_stream_ 000234 line_length hasp_stream_ 000252 pit_ptr hasp_stream_ 000254 terminal_io_record_ptr hasp_stream_ 000256 timeout_info_ptr hasp_stream_ 000270 argN process_option_array 000306 target_mode open_target 000315 target_mode_number open_target 000332 NO_CONTROL_CHARS convert_output 000546 next_NL get_next_line THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp cat_realloc_chars call_ext_out_desc call_ext_out call_int_this call_int_other return_mac enable_op shorten_stack ext_entry ext_entry_desc int_entry set_chars_eis translate_2 alloc_storage op_freen_ clock_mac THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ continue_to_signal_ get_group_id_ get_pdir_ get_temp_segment_ hcs_$initiate hcs_$set_ips_mask iox_$attach_name iox_$close iox_$control iox_$detach_iocb iox_$err_not_closed iox_$err_not_open iox_$look_iocb iox_$modes iox_$open iox_$propagate iox_$read_record iox_$write_record release_temp_segment_ terminate_process_ unique_chars_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$incompatible_attach error_table_$long_record error_table_$noarg error_table_$not_attached error_table_$not_detached error_table_$unable_to_do_io error_table_$wrong_no_of_args sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000410 140 000416 142 000442 143 000451 144 000453 146 000504 148 000505 149 000512 150 000514 153 000542 156 000543 157 000546 160 000570 161 000574 162 000576 163 000577 164 000602 165 000603 166 000605 167 000626 168 000630 170 000660 173 000661 174 000667 177 000671 179 000700 180 000702 183 000737 186 000740 187 000751 189 000755 191 000777 192 001000 193 001017 194 001024 195 001030 196 001036 197 001041 198 001044 199 001047 200 001056 201 001075 202 001076 203 001077 205 001100 207 001104 273 001105 275 001122 276 001130 277 001137 278 001142 280 001143 281 001144 282 001145 283 001147 284 001150 287 001151 289 001173 290 001212 291 001223 293 001226 294 001232 295 001234 296 001243 297 001246 298 001247 299 001251 300 001253 301 001262 303 001263 304 001265 305 001274 306 001277 308 001302 309 001311 310 001330 312 001331 374 001332 376 001346 377 001354 379 001376 380 001420 381 001431 382 001436 383 001455 384 001462 385 001471 386 001510 387 001511 388 001512 390 001513 392 001525 393 001533 394 001534 396 001556 397 001575 398 001603 399 001612 400 001615 401 001621 402 001623 403 001625 404 001627 406 001631 407 001637 408 001656 409 001657 410 001660 412 001661 413 001676 415 001711 416 001717 417 001721 418 001722 420 001723 423 001746 426 001766 428 001767 430 002004 431 002012 433 002014 434 002015 435 002033 436 002040 437 002042 439 002070 440 002107 442 002110 444 002111 448 002134 450 002142 451 002154 452 002156 453 002157 454 002162 455 002164 456 002165 457 002171 458 002172 460 002223 463 002243 464 002244 465 002250 466 002252 468 002255 469 002256 470 002261 471 002265 472 002266 474 002305 475 002312 476 002314 477 002326 478 002336 479 002337 481 002371 483 002373 485 002377 487 002415 488 002416 491 002424 492 002425 495 002452 497 002453 499 002503 501 002511 503 002537 210 002540 211 002546 213 002561 214 002566 216 002614 218 002617 222 002620 227 002622 229 002623 230 002642 231 002644 232 002713 233 002725 235 002776 236 003035 237 003040 240 003041 241 003044 242 003047 245 003075 248 003076 250 003103 251 003162 253 003170 254 003173 256 003223 259 003224 261 003260 262 003325 265 003327 266 003334 267 003402 271 003403 314 003404 316 003405 317 003440 319 003503 321 003507 323 003512 325 003513 331 003514 332 003536 337 003541 338 003550 339 003553 344 003554 345 003560 347 003571 348 003574 350 003604 351 003605 352 003607 354 003624 355 003625 356 003627 359 003644 362 003645 364 003653 366 003660 367 003662 368 003700 372 003705 508 003706 510 003707 512 003724 513 003726 515 003742 517 003744 519 003745 525 003753 528 003765 529 004007 531 004011 532 004021 534 004022 535 004023 537 004026 540 004050 542 004051 548 004053 550 004076 551 004101 552 004104 553 004106 554 004110 555 004111 556 004113 557 004116 559 004132 561 004134 571 004136 572 004137 574 004143 575 004155 577 004166 579 004171 581 004172 591 004174 592 004176 593 004200 596 004201 599 004206 600 004210 601 004213 602 004215 604 004216 606 004225 607 004230 608 004232 612 004233 613 004241 614 004260 616 004266 618 004270 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved