LISTING FOR >udd>sm>ds>w>ml>printing.ctl COMPILED BY Multics LISP Compiler, Version 2.13c, July 11, 1983 ON 05/04/00 1651.8 mdt Thu IN BEHALF OF Schroth.SysMaint.m ;;; *********************************************************** ;;; * * ;;; * Copyright, (C) Honeywell Information Systems Inc., 1982 * ;;; * * ;;; * Copyright (c) 1978 by Massachusetts Institute of * ;;; * Technology and Honeywell Information Systems, Inc. * ;;; * * ;;; *********************************************************** ;;; ;;; ;;; Printing tty display control ;;; Redone for new redisplay 7/7/78 ;;; Large redo 8/9/78 for tabs, delays, and no screen knowledge. (declare (special X Y screenheight idel-lines-availablep idel-chars-availablep screenlinelen tty-type tty-no-upmotionp overstrike-availablep)) (declare (special DCTLV-vertnl-pad DCTLV-horznl-pad DCTLV-consttab-pad DCTLV-vartab-pad DCTLV-tabs-availablep DCTLV-backspace-pad DCTLV-one-time-bspad)) (declare (defpl1 e_pl1_$get_mcs_tty_info "" (return bit (1))(return float bin)(return fixed bin) (return float bin)(return fixed bin)(return fixed bin)(return fixed bin))) (defun DCTL-init () (setq X -777 Y -777) (setq tty-type 'printing) (setq screenheight 60.) (setq idel-chars-availablep nil idel-lines-availablep nil tty-no-upmotionp t overstrike-availablep t) ((lambda (result) (setq DCTLV-tabs-availablep (not (zerop (car result))) result (cdr result)) (setq DCTLV-horznl-pad (car result) result (cdr result)) (setq DCTLV-vertnl-pad (abs (car result)) result (cdr result)) (setq DCTLV-vartab-pad (car result) result (cdr result)) (setq DCTLV-consttab-pad (car result) result (cdr result)) (setq DCTLV-backspace-pad (car result) screenlinelen (cadr result))) (e_pl1_$get_mcs_tty_info)) (setq screenlinelen (cond ((= screenlinelen 79.) 79.) (t (1- screenlinelen)))) (setq DCTLV-one-time-bspad (cond ((< DCTLV-backspace-pad 0)(prog2 0 (- DCTLV-backspace-pad)(setq DCTLV-backspace-pad 0))) (t 0)))) (defun DCTL-position-cursor (x y) (prog () (and (= x X)(= y Y)(return nil)) (and (< X 0)(DCTL-crlf)) ;unrandomize (and (= y Y) (progn (cond ((< X x) ;going forward (cond ((not DCTLV-tabs-availablep) ;no tabs (do xx X (1+ xx)(= xx x)(Rtyo 40))) (t (DCTL-tab-forward X x)))) ((< (- X x) x) (DCTL-delay DCTLV-one-time-bspad) (do xx X (1- xx)(= xx x)(Rtyo 10) (DCTL-delay DCTLV-backspace-pad))) (t (DCTL-cret) (DCTL-position-cursor x Y))) (setq X x) ;y is right by definition (return nil))) ;; Definitely going to a new line at this point (DCTL-nextline) (setq Y y) (DCTL-position-cursor x y))) (defun DCTL-tab-forward (here there) (prog (targ-stops targ-rem cur-stops) (setq targ-stops (// there 10.) targ-rem (\ there 10.)) (setq cur-stops (// here 10.)) ;; ;; Figure out the relative costs. ;; (cond ((and (not (= targ-stops cur-stops)) ;dont even bother (< (+ targ-rem ;spaces to be output (* (- targ-stops cur-stops) ;number of tabs (+ DCTLV-consttab-pad ;constant padding 1 ;the actual tab (fix (*$ 10e0 DCTLV-vartab-pad))))) (- there here))) ;normal cost ;do it (do tabx cur-stops (1+ tabx)(= tabx targ-stops) (Rtyo 11) ;tab (DCTL-delay (+ DCTLV-consttab-pad (fix (*$ 10e0 DCTLV-vartab-pad))))) (setq here (* targ-stops 10.)))) (do xx here (1+ xx)(= xx there)(Rtyo 40)))) (defun DCTL-assert-scpos (x y) (and x (setq X x)) (and y (setq Y y))) (defun DCTL-clear-rest-of-screen ()(DCTL-nextline)) (defun DCTL-nextline ()(Rtyo 12)(DCTL-delay DCTLV-vertnl-pad)) (defun DCTL-kill-line ()(Rtyo 12)(DCTL-delay DCTLV-vertnl-pad)) (defun DCTL-display-char-string (s) (Rprinc s) (setq X (+ X (stringlength s)))) (defun DCTL-cret () (Rtyo 15)(DCTL-delay (+ 3 (fix (*$ (float X) DCTLV-horznl-pad))))(setq X 0)) (defun DCTL-crlf () (DCTL-cret)(DCTL-nextline)) (defun DCTL-delay (n) (do i 1 (1+ i)(> i n)(Rtyo 177))) Functions Defined Name Offset Offset Name DCTL-assert-scpos 544 0 e_pl1_$get_mcs_tty_info DCTL-clear-rest-of-screen 556 116 DCTL-init DCTL-cret 625 252 DCTL-position-cursor DCTL-crlf 664 414 DCTL-tab-forward DCTL-delay 667 544 DCTL-assert-scpos DCTL-display-char-string 610 556 DCTL-clear-rest-of-screen DCTL-init 116 560 DCTL-nextline DCTL-kill-line 574 574 DCTL-kill-line DCTL-nextline 560 610 DCTL-display-char-string DCTL-position-cursor 252 625 DCTL-cret DCTL-tab-forward 414 664 DCTL-crlf e_pl1_$get_mcs_tty_info 0 667 DCTL-delay Functions Referenced DCTL-cret DCTL-tab-forward e_pl1_$get_mcs_tty_info DCTL-crlf Rprinc fix DCTL-delay Rtyo float DCTL-nextline abs stringlength DCTL-position-cursor ----------------------------------------------------------- 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