COMPILATION LISTING OF SEGMENT prtdim_order Compiled by: Multics PL/I Compiler, Release 31a, of October 12, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 10/28/88 1321.5 mst Fri Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 prtdim_order: proc (sdb_ptr, request, orderp, iostatus); 12 13 /* PRTDIM_ORDER - This is the order call processor for the printer DIM. 14* coded 10/29/74 by Noel I. Morris 15* modified 3/15/77 by Noel I. Morris 16* modified 9/77 by D. Vinograd to add the remote_printer_control_ entry 17* modified 6/78 by J. C. Whitmore to add the get_error_count order. 18* modified 83-10-21 by E. N. Kittlitz for eurc/urmpc partitioning. 19**/ 20 21 22 dcl request char (*), /* order request */ 23 a_iocbp ptr, /* iocb ptr */ 24 iostatus bit (72) aligned; /* IOS status bits */ 25 26 dcl nelemt fixed bin, /* for calling ios_ write */ 27 iocbp ptr, /* as it says */ 28 code fixed bin (35), /* error code */ 29 a_code fixed bin (35), /* error code parameter */ 30 entry fixed bin, /* entry flag */ 31 i fixed bin; /* iteration variable */ 32 33 dcl ios fixed bin static options (constant) init (1); /* entry type */ 34 dcl iox fixed bin static options (constant) init (2); 35 36 dcl NL char (1) static init (" 37 "); 38 39 dcl VT_or_FF char (2) static init (" "); /* "013" concatenated with "014" */ 40 41 dcl error_table_$bad_arg fixed bin (35) ext; 42 dcl error_table_$no_operation fixed bin (35) ext; 43 dcl error_table_$undefined_order_request fixed bin (35) ext; 44 dcl error_table_$inconsistent fixed bin (35) ext; 45 46 dcl ios_$write entry (char (*) aligned, ptr, fixed bin, fixed bin, fixed bin, bit (72) aligned), 47 prtdim_write$runout entry (ptr, bit (72) aligned), 48 prtdim_eurc_write$runout entry (ptr, bit (72) aligned), 49 prtdim_write$prtdim_resetwrite entry (ptr, bit (72) aligned), 50 prtdim_eurc_write$prtdim_resetwrite entry (ptr, bit (72) aligned), 51 prtdim_changemode entry (ptr, char (*), char (*), bit (72) aligned), 52 prtdim_changemode$remote_printer_modes_ entry (ptr, char (*), char (*), fixed bin (35)), 53 prtdim_util$load_vfc entry (ptr, fixed bin (35)), 54 prtdim_eurc_util$load_vfc entry (ptr, fixed bin (35)), 55 init_printer_$reset entry (ptr); 56 57 dcl iox_$control entry (ptr, char (*), ptr, fixed bin (35)); 58 dcl iox_$put_chars entry (ptr, ptr, fixed bin, fixed bin (35)); 59 60 dcl (addr, divide, hbound, length, null, reverse, search, substr, unspec, verify) builtin; 61 62 63 1 1 /* BEGIN INCLUDE FILE ... prt_sdb.incl.pl1 */ 1 2 /* Note: there is a corresponding prt_sdb.incl.alm */ 1 3 1 4 /* Created 10/28/74 by Noel I. Morris */ 1 5 /* Modified 3/15/77 by Noel I. Morris */ 1 6 /* Modified 1/25/78 by J. C. Whitmore to merge prtdim and spooling_dim versions */ 1 7 /* Modified: 27 November 1981 by G. Palter to add reload_vfc_train_after_special flag */ 1 8 /* Modified: 16 August 1983 by E. N. Kittlitz for new printer dim */ 1 9 1 10 dcl sdb_ptr ptr; /* pointer to stream data block */ 1 11 1 12 dcl 1 sdb aligned based (sdb_ptr), /* printer stream data block */ 1 13 2 outer_module_name char (32) aligned, 1 14 2 device_name_list_ptr pointer, 1 15 2 device_name, 1 16 3 next_device_ptr pointer, 1 17 3 name_size fixed bin (17), 1 18 3 name char (32) aligned, 1 19 2 ev_list aligned, /* Event list for ipc_ */ 1 20 3 count fixed bin (17), /* Event count = Always one */ 1 21 3 evchan fixed bin (71), /* Event channel name */ 1 22 2 stream_name char (32), /* stream name of this attachment */ 1 23 2 areap ptr, /* pointer to system free area */ 1 24 2 info like prt_info aligned, /* printer info */ 1 25 2 conv_info like pci aligned, /* conversion info */ 1 26 2 chars_printed fixed bin (35), /* input chars processed since "reset" */ 1 27 2 stop_every fixed bin, /* non-zero to stop after number of pages */ 1 28 2 stop_counter fixed bin, /* page stop counter */ 1 29 2 mode, /* additional modes */ 1 30 (3 single_page bit (1), /* "1"b to stop after each page */ 1 31 3 noprint bit (1), /* "1"b to suppress printing */ 1 32 3 pad bit (34)) unal, 1 33 2 rcp_id bit (36), /* RCP attachment ID */ 1 34 2 wsegp ptr, /* pointer to IOI working segment */ 1 35 2 running bit (1), /* "1"b if channel running */ 1 36 2 bgin fixed bin (18), /* index to oldest print line */ 1 37 2 stop fixed bin (18), /* index to next print line */ 1 38 2 prev fixed bin (18), /* index to previous print line */ 1 39 2 wait_flag bit (1) aligned, /* non-zero if waiting for special */ 1 40 2 marker_count fixed bin, /* counter for marker status insertion */ 1 41 2 paper_low bit (1) aligned, /* "1"b if paper low */ 1 42 2 error_count fixed bin, /* error counter */ 1 43 2 buffer_ptr ptr, /* pointer to output buffer (spooler) */ 1 44 2 spool_info (56) fixed bin, /* place to store spooling_info */ 1 45 2 reload_vfc_train_after_special bit (1) aligned, /* "1"b if VFC/train images should be reloaded after next 1 46* special interrupt */ 1 47 2 max_dcw_size fixed bin (12) uns unal, /* max wordcount of dcw */ 1 48 2 max_dcws fixed bin (6) uns unal, /* max dcws per idcw/buffer */ 1 49 2 n_dcws fixed bin (6) uns unal, /* current limit of dcws/buffer */ 1 50 2 b_begin fixed bin (3) uns unal, /* buffer index */ 1 51 2 b_stop fixed bin (3) uns unal, /* likewise */ 1 52 2 max_buffers fixed bin (3) uns unal, /* number of buffers allocated */ 1 53 2 n_buffers fixed bin (3) uns unal, /* number of buffers in use now */ 1 54 2 data_begin fixed bin (18) uns unal, /* first data word */ 1 55 2 data_end fixed bin (18) uns unal, /* size of working space in words */ 1 56 2 status_ptr ptr unal, /* ioi status area */ 1 57 2 flags aligned, 1 58 3 aborting bit (1) unal, /* next attempt to do i/o gets error and resets */ 1 59 3 eurc bit (1) unal, /* true if we know we are using EURC */ 1 60 3 flags_pad bit (16) unal, 1 61 2 version fixed bin unal, 1 62 2 status_table ptr unal, /* for analyze_device_stat_ */ 1 63 2 null_line_data bit (36) aligned, 1 64 2 null_line_dcw bit (36) aligned, 1 65 2 alarm_time fixed bin (71) unaligned; /* current timer_manager_ limit */ 1 66 dcl prt_bufferp ptr; 1 67 1 68 dcl 1 prt_buffer aligned based (prt_bufferp), 1 69 2 header, 1 70 3 number fixed bin (6) uns unal, 1 71 3 busy bit (1) unal, 1 72 3 pad bit (4) unal, 1 73 3 dcw_count fixed bin (7) uns unal, 1 74 3 data_ends fixed bin (18) uns unal, 1 75 2 idcw bit (36), 1 76 2 ddcw (sdb.max_dcws + 1) bit (36) aligned; 1 77 1 78 dcl wseg (0:sdb.data_end - 1) bit (36) aligned based (sdb.wsegp); /* the IOI buffer segment */ 1 79 dcl 1 prt_buffers (0:sdb.max_buffers - 1) aligned like prt_buffer based (sdb.wsegp); 1 80 1 81 /* NOTE: The Spooling_dim IO Module also uses this include file, 1 82* as it uses the printer stream also. If changes are made to this include file, 1 83* see to it that the changes are also reflected in the Spooling_dim procedures. 1 84* The spooling_dim uses the standard printer_dim order and changemode procedures. 1 85* JCW 1/25/78 */ 1 86 1 87 /* END INCLUDE FILE ... prt_sdb.incl.pl1 */ 64 2 1 2 2 /* Begin include file ...... prt_info.incl.pl1 */ 2 3 /* last modified 6/12/75 by Noel I. Morris */ 2 4 2 5 dcl pip ptr; /* pointer to printer info structure */ 2 6 2 7 dcl 1 prt_info based (pip) aligned, /* printer info structure */ 2 8 2 devname char (4), /* name of device */ 2 9 2 devx fixed bin, /* device index */ 2 10 2 model fixed bin, /* printer model number */ 2 11 2 type fixed bin, /* printer type number */ 2 12 2 train fixed bin, /* print train ID */ 2 13 2 line_length fixed bin, /* max length of printed line */ 2 14 2 print_idcw bit (36), /* IDCW to print 1 line */ 2 15 2 term_idcw bit (36); /* IDCW to stop printer channel */ 2 16 2 17 /* End of include file ...... prt_info.incl.pl1 */ 2 18 65 3 1 3 2 /* BEGIN INCLUDE FILE ... prt_conv_info.incl.pl1 */ 3 3 /* Modified: 12 September 1980 by G. Palter */ 3 4 3 5 3 6 /****^ HISTORY COMMENTS: 3 7* 1) change(87-05-10,Gilcrease), approve(87-07-31,MCR7686), 3 8* audit(88-02-01,Farley), install(88-02-02,MR12.2-1019): 3 9* Add modes.line_nbrs, flags.(eol eof) bits for eor -nb. 3 10* END HISTORY COMMENTS */ 3 11 3 12 3 13 dcl pcip ptr; /* pointer to conversion info structure */ 3 14 3 15 dcl 1 pci based (pcip) aligned, /* printer conversion info structure */ 3 16 2 cv_proc ptr, /* pointer to character conversion procedure */ 3 17 2 lmarg fixed bin, /* left margin indentation */ 3 18 2 rmarg fixed bin, /* right margin limit */ 3 19 2 page_length fixed bin, /* number of lines on page */ 3 20 2 phys_line_length fixed bin, /* physical width of paper */ 3 21 2 phys_page_length fixed bin, /* physical length of paper */ 3 22 2 lpi fixed bin, /* lines per inch */ 3 23 2 sheets_per_page fixed bin, /* sheets of paper per logical page */ 3 24 2 line_count fixed bin, /* count of converted lines */ 3 25 2 page_count fixed bin, /* count of converted pages */ 3 26 2 func fixed bin, /* special conversion function */ 3 27 /* 0 => normal conversion */ 3 28 /* 1 => change NL to FF */ 3 29 /* 2 => change NL to top inside page */ 3 30 /* 3 => change NL to end of page */ 3 31 /* 4 => change NL to top of outside page */ 3 32 (2 modes, /* conversion modes */ 3 33 3 overflow_off bit (1), /* "1"b to suppress end of page overflow */ 3 34 3 single_space bit (1), /* "1"b to change all forms advance chars to NL */ 3 35 3 non_edited bit (1), /* "1"b to print ASCII control chars */ 3 36 3 truncate bit (1), /* "1"b to truncate lines that are too long */ 3 37 3 esc bit (1), /* "1"b to process ESC character */ 3 38 3 ctl_char bit (1), /* "1"b to output control characters */ 3 39 3 line_nbrs bit (1), /* "1"b to output line numbers */ 3 40 3 pci_pad bit (5), 3 41 2 flags, /* flags internal to prt_conv_ */ 3 42 3 ignore_next_ff bit (1), /* ON => prt_conv_ just output a FF; ignore next character if 3 43* it's a FF */ 3 44 3 eol bit (1), /* "1"b = end-of-line encountered */ 3 45 3 eof bit (1), /* "1"b = end-of-segment encountered */ 3 46 3 flags_pad bit (3), 3 47 2 coroutine_modes, 3 48 3 upper_case bit(1), /* "1"b to convert to upper case */ 3 49 3 ht bit(1), /* "1"b to skip tab conversion */ 3 50 3 coroutine_pad bit(13), 3 51 3 slew_table_idx bit(3) ) unal, /* slew table index */ 3 52 2 top_label_line char (136), /* contains an optional top of page label */ 3 53 2 bot_label_line char (136), /* contains an optional bottom of page label */ 3 54 2 top_label_length fixed bin, /* length of top label line */ 3 55 2 bot_label_length fixed bin, /* length of bottom label line */ 3 56 2 form_stops (256) unal, /* logical form stops */ 3 57 3 lbits bit (9), /* leftmost bits */ 3 58 3 rbits bit (9), /* rightmost bits */ 3 59 3 60 /* The following items are for internal use by the print conversion procedure. 3 61* They should be zeroed once and then never referenced again. */ 3 62 3 63 2 level fixed bin, /* overstrike level */ 3 64 2 pos fixed bin, /* print position at end of incomplete line */ 3 65 2 line fixed bin, /* current line number */ 3 66 2 slew_residue fixed bin, /* number of lines remaining to be slewed */ 3 67 2 label_nelem fixed bin, /* characters remaining in label */ 3 68 2 label_wksp ptr, /* pointer to label being processed */ 3 69 2 sav_pos fixed bin, /* position saved during label processing */ 3 70 2 esc_state fixed bin, /* state of ESC processing */ 3 71 2 esc_num fixed bin, /* number following ESC sequence */ 3 72 2 temp bit (36); /* conversion proc temporary */ 3 73 3 74 /* End of include file ...... prt_conv_info.incl.pl1 */ 3 75 66 4 1 /* Begin include file ...... prt_order_info.incl.pl1 */ 4 2 /* Created 3/15/77 by Noel I. Morris */ 4 3 4 4 dcl orderp ptr; /* pointer to order info structure */ 4 5 4 6 dcl 1 counts based (orderp) aligned, /* structure used in "get_count" order */ 4 7 2 line fixed bin, /* line number */ 4 8 2 page_length fixed bin, /* length of page */ 4 9 2 lmarg fixed bin, /* left margin indentation */ 4 10 2 rmarg fixed bin, /* line length */ 4 11 2 line_count fixed bin, /* count of lines printed */ 4 12 2 page_count fixed bin; /* count of pages printed */ 4 13 4 14 dcl 1 position_data based (orderp) aligned, /* structure for "get_position" & "set_position" orders */ 4 15 2 line_number fixed bin (35), /* current line on the page */ 4 16 2 page_number fixed bin (35), /* current page number */ 4 17 2 total_lines fixed bin (35), /* lines printed since reset */ 4 18 2 total_chars fixed bin (35), /* chars processed since reset */ 4 19 2 pad(4) fixed bin; /* for the future */ 4 20 4 21 dcl 1 page_labels based (orderp) aligned, /* structure used in "page_labels" order */ 4 22 2 top_label char (136), /* label for top of page */ 4 23 2 bottom_label char (136); /* label for bottom of page */ 4 24 4 25 dcl channel_stops (256) bit (16) based (orderp) unal; /* structure used in "channel_stops" order */ 4 26 4 27 dcl 1 paper_info based (orderp) aligned, /* structure used in "paper_info" order */ 4 28 2 phys_page_length fixed bin, /* physical page length */ 4 29 2 phys_line_length fixed bin, /* physical line length */ 4 30 2 lines_per_inch fixed bin; /* lines per inch spacing */ 4 31 4 32 dcl ret_error_count fixed bin based (orderp); /* variable used for "get_error_count" order */ 4 33 4 34 /* End of include file ...... prt_order_info.incl.pl1 */ 67 5 1 /* BEGIN INCLUDE FILE ..... iocb.incl.pl1 ..... 13 Feb 1975, M. Asherman */ 5 2 /* Modified 11/29/82 by S. Krupp to add new entries and to change 5 3* version number to IOX2. */ 5 4 /* format: style2 */ 5 5 5 6 dcl 1 iocb aligned based, /* I/O control block. */ 5 7 2 version character (4) aligned, /* IOX2 */ 5 8 2 name char (32), /* I/O name of this block. */ 5 9 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 5 10 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 5 11 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 5 12 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 5 13 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 5 14 2 reserved bit (72), /* Reserved for future use. */ 5 15 2 detach_iocb entry (ptr, fixed (35)),/* detach_iocb(p,s) */ 5 16 2 open entry (ptr, fixed, bit (1) aligned, fixed (35)), 5 17 /* open(p,mode,not_used,s) */ 5 18 2 close entry (ptr, fixed (35)),/* close(p,s) */ 5 19 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 5 20 /* get_line(p,bufptr,buflen,actlen,s) */ 5 21 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 5 22 /* get_chars(p,bufptr,buflen,actlen,s) */ 5 23 2 put_chars entry (ptr, ptr, fixed (21), fixed (35)), 5 24 /* put_chars(p,bufptr,buflen,s) */ 5 25 2 modes entry (ptr, char (*), char (*), fixed (35)), 5 26 /* modes(p,newmode,oldmode,s) */ 5 27 2 position entry (ptr, fixed, fixed (21), fixed (35)), 5 28 /* position(p,u1,u2,s) */ 5 29 2 control entry (ptr, char (*), ptr, fixed (35)), 5 30 /* control(p,order,infptr,s) */ 5 31 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 5 32 /* read_record(p,bufptr,buflen,actlen,s) */ 5 33 2 write_record entry (ptr, ptr, fixed (21), fixed (35)), 5 34 /* write_record(p,bufptr,buflen,s) */ 5 35 2 rewrite_record entry (ptr, ptr, fixed (21), fixed (35)), 5 36 /* rewrite_record(p,bufptr,buflen,s) */ 5 37 2 delete_record entry (ptr, fixed (35)),/* delete_record(p,s) */ 5 38 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 5 39 /* seek_key(p,key,len,s) */ 5 40 2 read_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 5 41 /* read_key(p,key,len,s) */ 5 42 2 read_length entry (ptr, fixed (21), fixed (35)), 5 43 /* read_length(p,len,s) */ 5 44 2 open_file entry (ptr, fixed bin, char (*), bit (1) aligned, fixed bin (35)), 5 45 /* open_file(p,mode,desc,not_used,s) */ 5 46 2 close_file entry (ptr, char (*), fixed bin (35)), 5 47 /* close_file(p,desc,s) */ 5 48 2 detach entry (ptr, char (*), fixed bin (35)); 5 49 /* detach(p,desc,s) */ 5 50 5 51 declare iox_$iocb_version_sentinel 5 52 character (4) aligned external static; 5 53 5 54 /* END INCLUDE FILE ..... iocb.incl.pl1 ..... */ 68 6 1 /* BEGIN INCLUDE FILE ... remote_attach_data.incl.pl1 ... 3/77 */ 6 2 6 3 6 4 6 5 /****^ HISTORY COMMENTS: 6 6* 1) change(88-06-07,Brunelle), approve(88-06-07,MCR7911), 6 7* audit(88-09-29,Wallman), install(88-10-28,MR12.2-1199): 6 8* Model field and static overstrike_data_ptr added for laser printer 6 9* support. 6 10* END HISTORY COMMENTS */ 6 11 6 12 6 13 /* format: style4 */ 6 14 6 15 dcl adp ptr; /* local copy of pointer to attach data */ 6 16 6 17 dcl 1 ad aligned based (adp), 6 18 2 fixed, 6 19 3 runout_spacing fixed bin, 6 20 3 stop_every fixed bin, /* stop every n pages of printing */ 6 21 3 stop_counter fixed bin, 6 22 3 char_mode fixed bin, 6 23 3 record_len fixed bin, /* length of output record in characters */ 6 24 3 line_length fixed bin, /* length of printer line */ 6 25 3 chars_printed fixed bin (35), /* input chars processed since "reset" order */ 6 26 3 device_type fixed bin, /* terminal_io_record device_type code for this attachment 6 27* (See terminal_io_record.incl.pl1) */ 6 28 3 fb_pad fixed bin, 6 29 2 bits, 6 30 3 binary bit (1) unal, 6 31 3 record_io bit (1) unal, /* TRUE - if the iox_ record interface to terminal is used */ 6 32 3 other_bits_padded bit (34) unal, 6 33 3 output_modes, 6 34 4 single_page bit (1) unal, 6 35 4 noprint bit (1) unal, /* if on don't print */ 6 36 4 pad bit (34) unal, 6 37 3 transparent bit (1), /* Set if in transparent mode */ 6 38 3 input_modes bit (36), 6 39 2 ptrs, 6 40 3 terminal_iocbp ptr, /* iocb ptr to terminal dim */ 6 41 3 static_overstrike_data_ptr ptr, /* ptr to overstrike_data */ 6 42 2 chars, 6 43 3 terminal char (32) var, 6 44 3 attach_desc char (256) var, 6 45 3 open_description char (24) var, 6 46 3 model char (32) var, 6 47 2 info like prt_info aligned, 6 48 2 remote_pci like pci aligned; 6 49 6 50 6 51 /* END INCLUDE FILE ... remote_attach_data.incl.pl1 */ 69 70 71 72 entry = ios; 73 iostatus = "0"b; /* Clear status bits. */ 74 substr (iostatus, 41, 1) = "1"b; /* Set transaction terminated bit. */ 75 76 pcip = addr (sdb.conv_info); /* Get pointer to print conversion info. */ 77 goto common; 78 79 remote_printer_control_: entry (a_iocbp, request, orderp, a_code); 80 81 entry = iox; 82 a_code = 0; 83 iocbp = a_iocbp; 84 adp = iocbp -> iocb.attach_data_ptr; 85 pcip = addr (ad.remote_pci); 86 87 common: 88 89 if request = "inside_page" then /* Space to top of inside page. */ 90 call write_nl (2); 91 92 else if request = "outside_page" then /* Space to top of outside page */ 93 call write_nl (4); 94 95 else if request = "end_of_page" then /* Position at end of page, below bottom label */ 96 call write_nl (3); 97 98 else if request = "page_labels" then do; /* set page top and bottom labels */ 99 if orderp = null () then do; /* If null, reset labels. */ 100 pci.top_label_length, 101 pci.bot_label_length = 0; 102 end; 103 104 else if pci.overflow_off then do; /* Cannot have labels with overflow off. */ 105 if entry = ios then 106 substr (iostatus, 1, 36) = unspec (error_table_$inconsistent); 107 else a_code = error_table_$inconsistent; 108 end; 109 110 else do; /* Set the labels. */ 111 pci.top_label_line = page_labels.top_label; 112 call set_label (pci.top_label_line, pci.top_label_length); 113 114 pci.bot_label_line = page_labels.bottom_label; 115 call set_label (pci.bot_label_line, pci.bot_label_length); 116 end; 117 end; 118 119 else if request = "reset" then do; /* Reset modes and counts. */ 120 call init_printer_$reset (pcip); 121 if entry = ios then do; 122 sdb.mode = "0"b; /* Clear special printing modes. */ 123 sdb.stop_every = 0; /* Reset page stop count. */ 124 sdb.chars_printed = 0; /* reset the input char count */ 125 end; 126 else do; 127 ad.output_modes = "0"b; 128 ad.stop_every = 0; 129 ad.chars_printed = 0; 130 end; 131 end; 132 133 else if request = "get_count" then do; /* Get lengths and counts. */ 134 counts.line = pci.line; 135 counts.page_length = pci.page_length; 136 counts.lmarg = pci.lmarg; 137 counts.rmarg = pci.rmarg; 138 counts.line_count = pci.line_count; 139 counts.page_count = pci.page_count * pci.sheets_per_page; 140 end; 141 142 else if request = "get_position" then do; /* give paper and file position data */ 143 position_data.line_number = pci.line; /* which line we are printing */ 144 position_data.page_number = pci.page_count * pci.sheets_per_page; /* which phys page number */ 145 position_data.total_lines = pci.line_count; /* lines printed since "reset" order */ 146 if entry = ios then 147 position_data.total_chars = sdb.chars_printed; /* input chars processed since "reset" order */ 148 else position_data.total_chars = ad.chars_printed; 149 end; 150 151 else if request = "set_position" then do; /* Set new position counters */ 152 pci.line_count = position_data.total_lines; 153 pci.page_count = divide (position_data.page_number, pci.sheets_per_page, 17); 154 if entry = ios then 155 sdb.chars_printed = position_data.total_chars; 156 else ad.chars_printed = position_data.total_chars; 157 end; 158 159 else if request = "channel_stops" then /* Set logical channel stops. */ 160 do i = 1 to hbound (pci.form_stops, 1); 161 pci.form_stops (i).lbits = "0"b || substr (channel_stops (i), 1, 8); 162 pci.form_stops (i).rbits = "1"b || substr (channel_stops (i), 9, 8); 163 end; 164 165 else if request = "paper_info" then do; /* Set new physical paper characteristics. */ 166 if paper_info.lines_per_inch ^= 6 & /* Check for either 6 lpi or 8 lpi. */ 167 paper_info.lines_per_inch ^= 8 then do; 168 bad_arg: if entry = ios then 169 substr (iostatus, 1, 36) = unspec (error_table_$bad_arg); 170 else a_code = error_table_$bad_arg; 171 return; 172 end; 173 if paper_info.phys_page_length < 10 | paper_info.phys_page_length > 127 then go to bad_arg; 174 if paper_info.phys_line_length < 10 | paper_info.phys_line_length > 255 then go to bad_arg; 175 176 pci.phys_page_length = paper_info.phys_page_length; 177 pci.phys_line_length = paper_info.phys_line_length; 178 pci.lpi = paper_info.lines_per_inch; 179 180 if entry = ios then do; 181 call prtdim_changemode (sdb_ptr, "", (""), iostatus); /* make modes conform */ 182 if sdb.flags.eurc then call prtdim_eurc_util$load_vfc (sdb_ptr, code); 183 else call prtdim_util$load_vfc (sdb_ptr, code); 184 if code ^= 0 then 185 substr (iostatus, 1, 36) = unspec (code); 186 end; 187 else do; /* for the iox case */ 188 call prtdim_changemode$remote_printer_modes_ (a_iocbp, "", (""), a_code); /* make modes conform */ 189 a_code = error_table_$no_operation; 190 end; 191 end; 192 193 else if request = "runout" then do; /* Flush remaining output from print buffers. */ 194 if entry = ios then 195 if sdb.flags.eurc then call prtdim_eurc_write$runout (sdb_ptr, iostatus); 196 else call prtdim_write$runout (sdb_ptr, iostatus); 197 else a_code = error_table_$no_operation; 198 end; 199 200 else if request = "get_error_count" then do; 201 if entry = ios then 202 ret_error_count = sdb.error_count; /* only defined for printer dim */ 203 else ret_error_count = 0; /* no errors for iox */ 204 end; 205 206 else if request = "resetwrite" then do; 207 if entry = ios then 208 if sdb.flags.eurc then call prtdim_eurc_write$prtdim_resetwrite (sdb_ptr, iostatus); 209 else call prtdim_write$prtdim_resetwrite (sdb_ptr, iostatus); 210 else a_code = error_table_$no_operation; 211 end; 212 213 else do; 214 if entry = ios then 215 substr (iostatus, 1, 36) = unspec (error_table_$undefined_order_request); 216 else a_code = error_table_$undefined_order_request; 217 end; 218 219 return; 220 221 222 223 write_nl: proc (f); 224 225 dcl f fixed bin; /* function code */ 226 227 pci.func = f; /* Set correct function code. */ 228 if entry = ios then 229 call ios_$write (sdb.stream_name, addr (NL), 0, length (NL), nelemt, iostatus); 230 else call iox_$put_chars (iocbp, addr (NL), 1, a_code); 231 pci.func = 0; /* Make sure function code reset. */ 232 233 return; 234 235 236 end write_nl; 237 238 239 240 241 set_label: proc (line, lth); 242 243 dcl line char (136) aligned, /* label line */ 244 lth fixed bin; /* label length */ 245 246 247 if line = "" then lth = 0; /* If line is all blank, length is zero. */ 248 249 else if search (line, VT_or_FF) ^= 0 then do; /* Do not allow VT or FF. */ 250 lth = 0; /* Set length to zero. */ 251 if entry = ios then 252 substr (iostatus, 1, 36) = unspec (error_table_$bad_arg); 253 else a_code = error_table_$bad_arg; 254 end; 255 256 else do; 257 lth = 136 + 1 - verify (reverse (line), " "); 258 end; 259 260 return; 261 262 263 end set_label; 264 265 266 267 268 end prtdim_order; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/28/88 1256.6 prtdim_order.pl1 >special_ldd>install>MR12.2-1199>prtdim_order.pl1 64 1 11/04/83 1107.6 prt_sdb.incl.pl1 >ldd>include>prt_sdb.incl.pl1 65 2 08/29/75 1310.5 prt_info.incl.pl1 >ldd>include>prt_info.incl.pl1 66 3 02/04/88 2009.3 prt_conv_info.incl.pl1 >ldd>include>prt_conv_info.incl.pl1 67 4 09/28/78 1359.8 prt_order_info.incl.pl1 >ldd>include>prt_order_info.incl.pl1 68 5 05/20/83 1846.4 iocb.incl.pl1 >ldd>include>iocb.incl.pl1 69 6 10/28/88 1226.7 remote_attach_data.incl.pl1 >special_ldd>install>MR12.2-1199>remote_attach_data.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. NL 000010 internal static char(1) initial packed unaligned dcl 36 set ref 228 228 228 228 230 230 VT_or_FF constant char(2) initial packed unaligned dcl 39 ref 249 a_code parameter fixed bin(35,0) dcl 26 set ref 79 82* 107* 170* 188* 189* 197* 210* 216* 230* 253* a_iocbp parameter pointer dcl 22 set ref 79 83 188* ad based structure level 1 dcl 6-17 addr builtin function dcl 60 ref 76 85 228 228 230 230 adp 000112 automatic pointer dcl 6-15 set ref 84* 85 127 128 129 148 156 attach_data_ptr 16 based pointer level 2 dcl 5-6 ref 84 bits 11 based structure level 2 dcl 6-17 bot_label_length 122 based fixed bin(17,0) level 2 dcl 3-15 set ref 100* 115* bot_label_line 57 based char(136) level 2 dcl 3-15 set ref 114* 115* bottom_label 42 based char(136) level 2 dcl 4-21 ref 114 channel_stops based bit(16) array packed unaligned dcl 4-25 ref 161 162 chars_printed 412 based fixed bin(35,0) level 2 in structure "sdb" dcl 1-12 in procedure "prtdim_order" set ref 124* 146 154* chars_printed 6 based fixed bin(35,0) level 3 in structure "ad" dcl 6-17 in procedure "prtdim_order" set ref 129* 148 156* code 000104 automatic fixed bin(35,0) dcl 26 set ref 182* 183* 184 184 conv_info 54 based structure level 2 dcl 1-12 set ref 76 counts based structure level 1 dcl 4-6 divide builtin function dcl 60 ref 153 entry 000105 automatic fixed bin(17,0) dcl 26 set ref 72* 81* 105 121 146 154 168 180 194 201 207 214 228 251 error_count 431 based fixed bin(17,0) level 2 dcl 1-12 ref 201 error_table_$bad_arg 000012 external static fixed bin(35,0) dcl 41 ref 168 170 251 253 error_table_$inconsistent 000020 external static fixed bin(35,0) dcl 44 ref 105 107 error_table_$no_operation 000014 external static fixed bin(35,0) dcl 42 ref 189 197 210 error_table_$undefined_order_request 000016 external static fixed bin(35,0) dcl 43 ref 214 216 eurc 530(01) based bit(1) level 3 packed packed unaligned dcl 1-12 ref 182 194 207 f parameter fixed bin(17,0) dcl 225 ref 223 227 fixed based structure level 2 dcl 6-17 flags 530 based structure level 2 dcl 1-12 form_stops 123 based structure array level 2 packed packed unaligned dcl 3-15 set ref 159 func 13 based fixed bin(17,0) level 2 dcl 3-15 set ref 227* 231* hbound builtin function dcl 60 ref 159 i 000106 automatic fixed bin(17,0) dcl 26 set ref 159* 161 161 162 162* init_printer_$reset 000044 constant entry external dcl 46 ref 120 iocb based structure level 1 dcl 5-6 iocbp 000102 automatic pointer dcl 26 set ref 83* 84 230* ios constant fixed bin(17,0) initial dcl 33 ref 72 105 121 146 154 168 180 194 201 207 214 228 251 ios_$write 000022 constant entry external dcl 46 ref 228 iostatus parameter bit(72) dcl 22 set ref 11 73* 74* 105* 168* 181* 184* 194* 196* 207* 209* 214* 228* 251* iox constant fixed bin(17,0) initial dcl 34 ref 81 iox_$put_chars 000046 constant entry external dcl 58 ref 230 lbits 123 based bit(9) array level 3 packed packed unaligned dcl 3-15 set ref 161* length builtin function dcl 60 ref 228 228 line based fixed bin(17,0) level 2 in structure "counts" dcl 4-6 in procedure "prtdim_order" set ref 134* line 325 based fixed bin(17,0) level 2 in structure "pci" dcl 3-15 in procedure "prtdim_order" ref 134 143 line parameter char(136) dcl 243 in procedure "set_label" ref 241 247 249 257 line_count 4 based fixed bin(17,0) level 2 in structure "counts" dcl 4-6 in procedure "prtdim_order" set ref 138* line_count 11 based fixed bin(17,0) level 2 in structure "pci" dcl 3-15 in procedure "prtdim_order" set ref 138 145 152* line_number based fixed bin(35,0) level 2 dcl 4-14 set ref 143* lines_per_inch 2 based fixed bin(17,0) level 2 dcl 4-27 ref 166 166 178 lmarg 2 based fixed bin(17,0) level 2 in structure "counts" dcl 4-6 in procedure "prtdim_order" set ref 136* lmarg 2 based fixed bin(17,0) level 2 in structure "pci" dcl 3-15 in procedure "prtdim_order" ref 136 lpi 7 based fixed bin(17,0) level 2 dcl 3-15 set ref 178* lth parameter fixed bin(17,0) dcl 243 set ref 241 247* 250* 257* mode 415 based structure level 2 dcl 1-12 set ref 122* modes 14 based structure level 2 packed packed unaligned dcl 3-15 nelemt 000100 automatic fixed bin(17,0) dcl 26 set ref 228* null builtin function dcl 60 ref 99 orderp parameter pointer dcl 4-4 ref 11 79 99 111 114 134 135 136 137 138 139 143 144 145 146 148 152 153 154 156 161 162 166 166 173 173 174 174 176 177 178 201 203 output_modes 12 based structure level 3 dcl 6-17 set ref 127* overflow_off 14 based bit(1) level 3 packed packed unaligned dcl 3-15 ref 104 page_count 12 based fixed bin(17,0) level 2 in structure "pci" dcl 3-15 in procedure "prtdim_order" set ref 139 144 153* page_count 5 based fixed bin(17,0) level 2 in structure "counts" dcl 4-6 in procedure "prtdim_order" set ref 139* page_labels based structure level 1 dcl 4-21 page_length 1 based fixed bin(17,0) level 2 in structure "counts" dcl 4-6 in procedure "prtdim_order" set ref 135* page_length 4 based fixed bin(17,0) level 2 in structure "pci" dcl 3-15 in procedure "prtdim_order" ref 135 page_number 1 based fixed bin(35,0) level 2 dcl 4-14 set ref 144* 153 paper_info based structure level 1 dcl 4-27 pci based structure level 1 dcl 3-15 pcip 000110 automatic pointer dcl 3-13 set ref 76* 85* 100 100 104 111 112 112 114 115 115 120* 134 135 136 137 138 139 139 143 144 144 145 152 153 153 159 161 162 176 177 178 227 231 phys_line_length 1 based fixed bin(17,0) level 2 in structure "paper_info" dcl 4-27 in procedure "prtdim_order" ref 174 174 177 phys_line_length 5 based fixed bin(17,0) level 2 in structure "pci" dcl 3-15 in procedure "prtdim_order" set ref 177* phys_page_length 6 based fixed bin(17,0) level 2 in structure "pci" dcl 3-15 in procedure "prtdim_order" set ref 176* phys_page_length based fixed bin(17,0) level 2 in structure "paper_info" dcl 4-27 in procedure "prtdim_order" ref 173 173 176 position_data based structure level 1 dcl 4-14 prt_buffer based structure level 1 dcl 1-68 prt_info based structure level 1 dcl 2-7 prtdim_changemode 000034 constant entry external dcl 46 ref 181 prtdim_changemode$remote_printer_modes_ 000036 constant entry external dcl 46 ref 188 prtdim_eurc_util$load_vfc 000042 constant entry external dcl 46 ref 182 prtdim_eurc_write$prtdim_resetwrite 000032 constant entry external dcl 46 ref 207 prtdim_eurc_write$runout 000026 constant entry external dcl 46 ref 194 prtdim_util$load_vfc 000040 constant entry external dcl 46 ref 183 prtdim_write$prtdim_resetwrite 000030 constant entry external dcl 46 ref 209 prtdim_write$runout 000024 constant entry external dcl 46 ref 196 rbits 123(09) based bit(9) array level 3 packed packed unaligned dcl 3-15 set ref 162* remote_pci 164 based structure level 2 dcl 6-17 set ref 85 request parameter char packed unaligned dcl 22 ref 11 79 87 92 95 98 119 133 142 151 159 165 193 200 206 ret_error_count based fixed bin(17,0) dcl 4-32 set ref 201* 203* reverse builtin function dcl 60 ref 257 rmarg 3 based fixed bin(17,0) level 2 in structure "counts" dcl 4-6 in procedure "prtdim_order" set ref 137* rmarg 3 based fixed bin(17,0) level 2 in structure "pci" dcl 3-15 in procedure "prtdim_order" ref 137 sdb based structure level 1 dcl 1-12 sdb_ptr parameter pointer dcl 1-10 set ref 11 76 122 123 124 146 154 181* 182 182* 183* 194 194* 196* 201 207 207* 209* 228 search builtin function dcl 60 ref 249 sheets_per_page 10 based fixed bin(17,0) level 2 dcl 3-15 ref 139 144 153 stop_every 413 based fixed bin(17,0) level 2 in structure "sdb" dcl 1-12 in procedure "prtdim_order" set ref 123* stop_every 1 based fixed bin(17,0) level 3 in structure "ad" dcl 6-17 in procedure "prtdim_order" set ref 128* stream_name 32 based char(32) level 2 dcl 1-12 set ref 228* substr builtin function dcl 60 set ref 74* 105* 161 162 168* 184* 214* 251* top_label based char(136) level 2 dcl 4-21 ref 111 top_label_length 121 based fixed bin(17,0) level 2 dcl 3-15 set ref 100* 112* top_label_line 15 based char(136) level 2 dcl 3-15 set ref 111* 112* total_chars 3 based fixed bin(35,0) level 2 dcl 4-14 set ref 146* 148* 154 156 total_lines 2 based fixed bin(35,0) level 2 dcl 4-14 set ref 145* 152 unspec builtin function dcl 60 ref 105 168 184 214 251 verify builtin function dcl 60 ref 257 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. iox_$control 000000 constant entry external dcl 57 iox_$iocb_version_sentinel external static char(4) dcl 5-51 pip automatic pointer dcl 2-5 prt_bufferp automatic pointer dcl 1-66 prt_buffers based structure array level 1 dcl 1-79 wseg based bit(36) array dcl 1-78 NAMES DECLARED BY EXPLICIT CONTEXT. bad_arg 000540 constant label dcl 168 ref 173 174 common 000154 constant label dcl 87 ref 77 prtdim_order 000070 constant entry external dcl 11 remote_printer_control_ 000126 constant entry external dcl 79 set_label 001161 constant entry internal dcl 241 ref 112 115 write_nl 001060 constant entry internal dcl 223 ref 87 92 95 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1672 1742 1446 1702 Length 2264 1446 50 306 224 2 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME prtdim_order 149 external procedure is an external procedure. write_nl internal procedure shares stack frame of external procedure prtdim_order. set_label internal procedure shares stack frame of external procedure prtdim_order. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 NL prtdim_order STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME prtdim_order 000100 nelemt prtdim_order 000102 iocbp prtdim_order 000104 code prtdim_order 000105 entry prtdim_order 000106 i prtdim_order 000110 pcip prtdim_order 000112 adp prtdim_order THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. init_printer_$reset ios_$write iox_$put_chars prtdim_changemode prtdim_changemode$remote_printer_modes_ prtdim_eurc_util$load_vfc prtdim_eurc_write$prtdim_resetwrite prtdim_eurc_write$runout prtdim_util$load_vfc prtdim_write$prtdim_resetwrite prtdim_write$runout THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_arg error_table_$inconsistent error_table_$no_operation error_table_$undefined_order_request LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000063 72 000103 73 000105 74 000112 76 000114 77 000120 79 000121 81 000141 82 000143 83 000145 84 000150 85 000152 87 000154 92 000170 95 000201 98 000212 99 000216 100 000222 102 000225 104 000226 105 000232 107 000241 108 000244 111 000245 112 000252 114 000262 115 000271 117 000301 119 000302 120 000306 121 000315 122 000320 123 000331 124 000332 125 000333 127 000334 128 000343 129 000344 131 000345 133 000346 134 000352 135 000356 136 000361 137 000363 138 000365 139 000367 140 000372 142 000373 143 000377 144 000403 145 000407 146 000411 148 000421 149 000424 151 000425 152 000431 153 000436 154 000441 156 000451 157 000454 159 000455 161 000467 162 000510 163 000522 165 000525 166 000531 168 000540 170 000550 171 000554 173 000555 174 000562 176 000567 177 000572 178 000574 180 000576 181 000601 182 000625 183 000645 184 000656 186 000663 188 000664 189 000710 191 000714 193 000715 194 000721 196 000743 197 000755 198 000760 200 000761 201 000765 203 000776 204 001000 206 001001 207 001005 209 001027 210 001041 211 001044 214 001045 216 001054 219 001057 223 001060 227 001062 228 001065 230 001134 231 001156 233 001160 241 001161 247 001163 249 001172 250 001204 251 001205 253 001215 254 001221 257 001222 260 001237 ----------------------------------------------------------- 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