At 2025-02-10T14:56:28+0100, Tadziu Hoffmann wrote:
> 
> > AT&T troff stores font size in points. This means it
> > converts the argument to .ps from whatever unit it's in
> > (default is points) to basic units and then divides that
> > by the size of 1 point.
> 
> Did AT&T troff actually allow the argument to .ps to be
> in anything other than points?

Well, I fired up good old SIMH and Seventh Edition Unix to see.

Here's the transcript, in all its fat-fingering,
forgetting-that-line-editing-was-different-in-those-days glory:

---snip---
New Boot, known devices are hp ht rk rl rp tm vt
: rl(0,0)rl2unix
mem = 177856
# Restricted rights: Use, duplication, or disclosure
is subject to restrictions stated in your contract with
Western Electric Company, Inc.
Thu Sep 22 23:17:27 EDT 1988

login: dmr
$ nroff
.ps 1000
.tm \n(.s
10
$ troff -t
.ps 1000
.tm \n(.s
@o`36
.ps 36
.tn \n($
$ p
p: not found
$ troff -t
.ps 4$
$ p
$
$ troff -t
.ps 36
.tm \n(.s
@o`36
`````````````````````````````````````````````````````````````````~@IAAAAAAAA$
$
Simulation stopped, PC: 002306 (MOV (SP)+,177776)
sim> cont

$ troff -t
.ps 1i
.tm \n(.s
@o`6
`````````````````````````````````````````````````````````````````~@IAAAAAAAA$
$ troff -t >/dev/null
/dev/null: cannot create
$
Simulation stopped, PC: 002306 (MOV (SP)+,177776)
---end snip---

What we see here are several known facts, and a couple ones new to me:

1.  Don't mess with the type size in nroff (mode).  It can't change.
2.  The C/A/T output device was limited to type sizes in the range 6-36,
    so getting out of range is easy.
3.  Ossanna troff clamps requested type sizes to the valid range.
4.  That racket you see in troff output is the C/A/T command stream.
    This is what you had to work with before Kernighan's device-
    independence efforts.

New facts (to me):

1.  Ossanna troff ignores scaling units in the `ps` request.  `.ps 1i`
    should be equivalent to `.ps 72`, and be clamped to 36, but instead
    it's intepreted as `.ps 1` and clamped to 6.  Just as Tadziu's
    citation of CSTR #54 suggests.
2.  Ossanna troff flushes stdout before writing to stderr; that's why
    the arcane @o` noise appears at the start of the terminal messages:
    it's actually (I surmise) configuring the type size on the C/A/T.
3.  Seventh Edition had no /dev/null.  Are we sure this is even Unix?
    ;-)

> The Manual says:
> 
>   The default scaling is m for the horizontally-oriented
>   requests and functions ll, in, ti, ta, lt, po, mc,
>   \h, \l, and horizontal coordinates of \D; v for the
>   vertically-oriented requests and functions pl, wh, ch, dt,
>   sp, sv, ne, rt, \v, \x, \L, and vertical coordinates of
>   \D; p for the vs request; and u for the requests nr, if,
>   and ie. *All* other requests ignore any scale indicators.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature

Reply via email to