From tuhs at tuhs.org Wed Jul 1 01:59:11 2026 From: tuhs at tuhs.org (Clem Cole via TUHS) Date: Tue, 30 Jun 2026 11:59:11 -0400 Subject: [TUHS] UNIX V4 clip by CBS In-Reply-To: References: Message-ID: below On Mon, Jun 29, 2026 at 5:12 PM Thalia Archibald via TUHS wrote: > The CBS story for our recovery of UNIX V4 has now been published! > It's a fun, short clip with footage not shown in the February video put > out by CHM. > https://www.youtube.com/watch?v=HatXp2dqxb4 nice. > > > As an aside, the black monitor in the historical clips (0:12, 0:44) looks > like a > Teletype Model 40. > I think you are right. I don't think I ever saw one with the video display option. But I did encounter a couple of track-mounted versions with a kyb/printer (ASR-33 function replacement) in a computer room. From tuhs at tuhs.org Wed Jul 1 02:09:43 2026 From: tuhs at tuhs.org (al kossow via TUHS) Date: Tue, 30 Jun 2026 09:09:43 -0700 Subject: [TUHS] UNIX V4 clip by CBS In-Reply-To: References: Message-ID: >> The CBS story for our recovery of UNIX V4 has now been published! >> It's a fun, short clip with footage not shown in the February video put >> out by CHM. >> https://www.youtube.com/watch?v=HatXp2dqxb4 > the reason it never ran https://cosocial.ca/@robpike/116836488725606098 From tuhs at tuhs.org Wed Jul 1 05:59:48 2026 From: tuhs at tuhs.org (Thalia Archibald via TUHS) Date: Tue, 30 Jun 2026 19:59:48 +0000 Subject: [TUHS] Several Missing UNIX Documents Procured In-Reply-To: References: Message-ID: <3936838F-BF08-419E-95C5-350DE4448AC9@archibald.dev> On Jun 29, 2026, at 19:35, segaloco wrote: > Hello one and all! I wanted to share news of a recent document haul that contains many interesting bits. The highlights are: > WwB 2.0 Source Code (circa 1982, I think it's all there) > More to come! > > - Matt G. Great work as usual! I’m especially excited by the WWB source. Thalia From tuhs at tuhs.org Wed Jul 1 06:04:36 2026 From: tuhs at tuhs.org (Rob Pike via TUHS) Date: Wed, 1 Jul 2026 06:04:36 +1000 Subject: [TUHS] Anachronistic verisimilitude at cat-v.org In-Reply-To: References: Message-ID: I don't own that page, but clearly those who do did not understand col(1). I'll forward this to tuhs to see if anyone there knows who can fix it. -rob On Tue, Jun 30, 2026 at 10:58 PM Douglas McIlroy < douglas.mcilroy at dartmouth.edu> wrote: > The display on page 2 of > https://harmful.cat-v.org/cat-v/unix_prog_design.pdf > is explainable, but may be mystifying to readers who > know backspace only as an editing convenience, not a > printing action. > > Doug > From tuhs at tuhs.org Wed Jul 1 07:39:13 2026 From: tuhs at tuhs.org (sl via TUHS) Date: Tue, 30 Jun 2026 17:39:13 -0400 Subject: [TUHS] Anachronistic verisimilitude at cat-v.org Message-ID: > On Tue, Jun 30, 2026 at 10:58 PM Douglas McIlroy < > douglas.mcilroy at dartmouth.edu> wrote: > >> The display on page 2 of >> https://harmful.cat-v.org/cat-v/unix_prog_design.pdf >> is explainable, but may be mystifying to readers who >> know backspace only as an editing convenience, not a >> printing action. >> >> Doug > > I don't own that page, but clearly those who do did not understand col(1). > I'll forward this to tuhs to see if anyone there knows who can fix it. > > -rob i inherited cat-v.org from uriel when he passed away in 2012. i have postscript but no troff source for the original paper. over the years i've discovered multiple problems with the document. back in 2013 i wrote to bwk: Page 4 of the pdf version, the paragraph that begins with "The answer is 'No.'" contains lines such as: cat's job is to the data in files and: Programs that collect data shouldn't the data Amusing, but presumably not intentional. There are other examples of apparently missing words throughout the file. bwk confirmed that nobody seemed to have the source, and copied rob on the reply. since the source was presumed lost, i examined the version published in the BLTJ, and reported: The printed version from BLTJ had also lost some characters during its journey from source to print. Specifically, the backquotes from the example on page 3: cat `cat filelist` The italics missing from my copy were intact in this version. Today, a friend located a postscript version that seems to have retained all of the missing pieces: http://netlib.bell-labs.com/cm/cs/doc/84/kp.ps.gz this version addressed the problems i'd originally noticed but now exhibits the problems doug noted above. everyone stopped responding to me at this point, and in the subsequent years i have failed to recreate the entire document by re-typing it. sl From tuhs at tuhs.org Wed Jul 1 16:11:52 2026 From: tuhs at tuhs.org (segaloco via TUHS) Date: Wed, 01 Jul 2026 06:11:52 +0000 Subject: [TUHS] Several Missing UNIX Documents Procured In-Reply-To: References: Message-ID: <_ZPnpqeXOG-z90KK54srYeB-L0MtGjnxiU7Iiv4rFIMENi1T7xASQD93Fp9FezjQsLqENcKsm6DB3aAwlMtdLE8kSNxrhvGVJ5MxbU3La6I=@protonmail.com> On Monday, June 29th, 2026 at 18:35, segaloco via TUHS wrote: > Hello one and all! I wanted to share news of a recent document haul that contains many interesting bits. > > ... > > There are other odds and ends, and the seller found another binder already and may continue to do so, I've arranged to check in again on Friday. Among the random bits here too are two issues of the WECo UNIX Systems Newsletter that, among other things, detail "UNIX Release 6.0". From the February 1983 newsletter: > > > UNIX System Release 6.0 planning and development is continuing on schedule. The target ready-to-order > > date is December 15, 1983. The most probable features include: > > > > - Demand Paging > > - Job Control > > - shell Enhancements > > - Curser(sic)/Terminfo Package > > - Selected BSD commands (ls,mail,pg) > > - cron/at Package > > - Arbitrary length variable names in C (flexnames) > > The earliest SVR2 manuals, those distributed internally to BTL facilities, are dated December, 1983, so presumably USG delivered on their ready-to-order timeline. > These two newsletter issues are now uploaded here: https://archive.org/details/unix-systems-newsletter-vol-5-no-3 https://archive.org/details/unix-systems-newsletter-vol-6-no-1 These are right as System V is making it out and Release 6.0 (SVR2) is being developed. They give a little peek into what folks inside AT&T were seeing on the eve of System V and divestiture. - Matt G. From tuhs at tuhs.org Fri Jul 3 22:41:06 2026 From: tuhs at tuhs.org (Folkert van Heusden via TUHS) Date: Fri, 03 Jul 2026 14:41:06 +0200 Subject: [TUHS] fork In-Reply-To: <9c0a5b114cb4e4a293be81543c25b1bc@vanheusden.com> References: <9c0a5b114cb4e4a293be81543c25b1bc@vanheusden.com> Message-ID: <1444cb0fa6d0d8425d07057de72eb567@vanheusden.com> > p.s. it is on http://pdp.komputilo.nl:8080/ (behind a NAT router) and > it takes quite a while to serve pages :-) After fixing an important bug (stack yellow zone did not trigger an MMR1 update) it is a lot more stable! Kernel compiles go all the way to the finish, finally :-) If I remember correctly, I also mentioned not being able to talk to the NTPd included in BSD: that is also solved after I switched to NTP v1. Regards -- www.vanheusden.com From tuhs at tuhs.org Mon Jul 6 22:32:16 2026 From: tuhs at tuhs.org (Aharon Robbins via TUHS) Date: Mon, 06 Jul 2026 15:32:16 +0300 Subject: [TUHS] Reconstituted - Program design in the UNIX environment Message-ID: Hello All, Last week, with some spare time and a desire to stop doing things that really needed doing, I decided to try to reconstitute the troff source for "Program design in the UNIX environment" which had apparently been lost. This version fixes a few issues in the existing PostScript version of the document from http://harmful.cat-v.org. I've made it available at https://github.com/arnoldrobbins/unix-program-design also. Comments and/or fixes are welcome. I have sent the files directly to Rob and Brian. Enjoy, Arnold -------------- next part -------------- .\" Borrowed from BWK's macros from CSTR 100. .ig programs are displayed between .P1/.P2 pairs default is to indent by 1/2 inch, nofill, dP smaller .P1 x causes an indent of x instead. .P3 can be used to specify optional page-break points inside .P1/.P2 .. .nr DV .5v \" space before start of program .nr dT 5 .de P1 .nr P1 .4i \" program indent in .P1 .if \\n(.$ .nr P1 \\$1 .br .nr v \\n(.v .di p1 .in \\n(P1u .nf .ps -\\n(dP .vs -\\n(dVu .ft CW .nr t \\n(dT*\\w'x'u .ta 1u*\\ntu 2u*\\ntu 3u*\\ntu 4u*\\ntu 5u*\\ntu 6u*\\ntu 7u*\\ntu 8u*\\ntu 9u*\\ntu 10u*\\ntu 11u*\\ntu 12u*\\ntu 13u*\\ntu 14u*\\ntu .. .de P2 .br .ps \\n(PS .vs \\n(VSp .vs \\nvu .ft 1 .in .di .br .sp \\n(DVu .br .if \\n(.$=0 .ne \\n(dnu \" -\\n(DVu .p1 .sp \\n(DVu .br .fi .. From tuhs at tuhs.org Mon Jul 6 23:42:47 2026 From: tuhs at tuhs.org (Arnold Robbins via TUHS) Date: Mon, 06 Jul 2026 07:42:47 -0600 Subject: [TUHS] Reconstituted - Program design in the UNIX environment In-Reply-To: References: Message-ID: <202607061342.666DglvX005321@freefriends.org> Hmm, The troff file didn't get attached. It's attached now. Sorry 'bout that folks. Arnold Aharon Robbins via TUHS wrote: > Hello All, > > Last week, with some spare time and a desire to stop doing things > that really needed doing, I decided to try to reconstitute the troff > source for "Program design in the UNIX environment" which had > apparently been lost. > > This version fixes a few issues in the existing PostScript version > of the document from http://harmful.cat-v.org. > > I've made it available at https://github.com/arnoldrobbins/unix-program-design > also. > > Comments and/or fixes are welcome. > > I have sent the files directly to Rob and Brian. > > Enjoy, > > Arnold From tuhs at tuhs.org Tue Jul 7 00:00:36 2026 From: tuhs at tuhs.org (Jonathan Gray via TUHS) Date: Tue, 7 Jul 2026 00:00:36 +1000 Subject: [TUHS] Reconstituted - Program design in the UNIX environment In-Reply-To: References: Message-ID: On Mon, Jul 06, 2026 at 03:32:16PM +0300, Aharon Robbins via TUHS wrote: > Hello All, > > Last week, with some spare time and a desire to stop doing things > that really needed doing, I decided to try to reconstitute the troff > source for "Program design in the UNIX environment" which had > apparently been lost. > > This version fixes a few issues in the existing PostScript version > of the document from http://harmful.cat-v.org. checksum of unix_prog_design.ps from http://harmful.cat-v.org/cat-v/ matches that of kp.ps from https://9p.io/cm/cs/doc/index.html and http://web.archive.org/web/20080123190345id_/http://cm.bell-labs.com/cm/cs/papers.html Scans have some other differences such as numbered sections: UNIX System Readings and Applications Volume II, pp 18-28 https://bitsavers.org/pdf/att/unix/ https://archive.org/details/program-design-in-unix-environment From tuhs at tuhs.org Tue Jul 7 00:02:57 2026 From: tuhs at tuhs.org (Clem Cole via TUHS) Date: Mon, 6 Jul 2026 10:02:57 -0400 Subject: [TUHS] Reconstituted - Program design in the UNIX environment In-Reply-To: References: Message-ID: Thank you. Sent from a handheld expect more typos than usual On Mon, Jul 6, 2026 at 8:32 AM Aharon Robbins via TUHS wrote: > Hello All, > > Last week, with some spare time and a desire to stop doing things > that really needed doing, I decided to try to reconstitute the troff > source for "Program design in the UNIX environment" which had > apparently been lost. > > This version fixes a few issues in the existing PostScript version > of the document from http://harmful.cat-v.org. > > I've made it available at > https://github.com/arnoldrobbins/unix-program-design > also. > > Comments and/or fixes are welcome. > > I have sent the files directly to Rob and Brian. > > Enjoy, > > Arnold > From tuhs at tuhs.org Tue Jul 7 00:09:42 2026 From: tuhs at tuhs.org (Arnold Robbins via TUHS) Date: Mon, 06 Jul 2026 08:09:42 -0600 Subject: [TUHS] Reconstituted - Program design in the UNIX environment In-Reply-To: References: Message-ID: <202607061409.666E9gZ9007463@freefriends.org> Jonathan Gray wrote: > checksum of unix_prog_design.ps from > http://harmful.cat-v.org/cat-v/ > > matches that of kp.ps from > https://9p.io/cm/cs/doc/index.html and > http://web.archive.org/web/20080123190345id_/http://cm.bell-labs.com/cm/cs/papers.html > > Scans have some other differences such as numbered sections: > > UNIX System Readings and Applications Volume II, pp 18-28 > https://bitsavers.org/pdf/att/unix/ > > https://archive.org/details/program-design-in-unix-environment Rob -- were the numbered sections added for the BSTJ issue? Should I put them into this doc? I have a copy of that journal in my basement, so I should be able to do that. Thanks, Arnold From tuhs at tuhs.org Tue Jul 7 10:08:26 2026 From: tuhs at tuhs.org (Greg 'groggy' Lehey via TUHS) Date: Tue, 7 Jul 2026 10:08:26 +1000 Subject: [TUHS] Reconstituted - Program design in the UNIX environment In-Reply-To: <202607061342.666DglvX005321@freefriends.org> References: <202607061342.666DglvX005321@freefriends.org> Message-ID: On Monday, 6 July 2026 at 7:42:47 -0600, Arnold Robbins via TUHS wrote: > Hmm, > > The troff file didn't get attached. It's attached now. > > Sorry 'bout that folks. Sorry from our side, I suppose. Our mailing list software strips most attachments. We should probably revisit that situation (TUHS team please discuss), but since you also put it on github, we don't have a problem in this case. Greg -- Sent from my desktop computer. Finger grog at lemis.com for PGP public key. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft mail program reports problems, please read http://lemis.com/broken-MUA.php -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 195 bytes Desc: not available URL: From tuhs at tuhs.org Tue Jul 7 11:25:27 2026 From: tuhs at tuhs.org (Rob Pike via TUHS) Date: Tue, 7 Jul 2026 11:25:27 +1000 Subject: [TUHS] Reconstituted - Program design in the UNIX environment In-Reply-To: <202607061409.666E9gZ9007463@freefriends.org> References: <202607061409.666E9gZ9007463@freefriends.org> Message-ID: No idea, sorry. It was a while ago. -rob On Tue, Jul 7, 2026 at 12:19 AM Arnold Robbins via TUHS wrote: > Jonathan Gray wrote: > > > checksum of unix_prog_design.ps from > > http://harmful.cat-v.org/cat-v/ > > > > matches that of kp.ps from > > https://9p.io/cm/cs/doc/index.html and > > > http://web.archive.org/web/20080123190345id_/http://cm.bell-labs.com/cm/cs/papers.html > > > > Scans have some other differences such as numbered sections: > > > > UNIX System Readings and Applications Volume II, pp 18-28 > > https://bitsavers.org/pdf/att/unix/ > > > > https://archive.org/details/program-design-in-unix-environment > > Rob -- were the numbered sections added for the BSTJ issue? > Should I put them into this doc? > > I have a copy of that journal in my basement, so I should be able > to do that. > > Thanks, > > Arnold > From tuhs at tuhs.org Tue Jul 7 16:02:39 2026 From: tuhs at tuhs.org (Arnold Robbins via TUHS) Date: Tue, 07 Jul 2026 00:02:39 -0600 Subject: [TUHS] Reconstituted - Program design in the UNIX environment In-Reply-To: References: <202607061409.666E9gZ9007463@freefriends.org> Message-ID: <202607070602.66762d0r084030@freefriends.org> Rob, No problem, thanks. I have updated the copy in Github such that with `groff -r tj=1 ...' the headings and author biographies are included. It seems that some people aren't getting attachments so I won't try to include the document. If you want it, please get it from Github. Enjoy, Arnold Rob Pike wrote: > No idea, sorry. > > It was a while ago. > > -rob > > > On Tue, Jul 7, 2026 at 12:19 AM Arnold Robbins via TUHS > wrote: > > > Jonathan Gray wrote: > > > > > checksum of unix_prog_design.ps from > > > http://harmful.cat-v.org/cat-v/ > > > > > > matches that of kp.ps from > > > https://9p.io/cm/cs/doc/index.html and > > > > > http://web.archive.org/web/20080123190345id_/http://cm.bell-labs.com/cm/cs/papers.html > > > > > > Scans have some other differences such as numbered sections: > > > > > > UNIX System Readings and Applications Volume II, pp 18-28 > > > https://bitsavers.org/pdf/att/unix/ > > > > > > https://archive.org/details/program-design-in-unix-environment > > > > Rob -- were the numbered sections added for the BSTJ issue? > > Should I put them into this doc? > > > > I have a copy of that journal in my basement, so I should be able > > to do that. > > > > Thanks, > > > > Arnold > > From tuhs at tuhs.org Tue Jul 7 16:05:05 2026 From: tuhs at tuhs.org (G. Branden Robinson via TUHS) Date: Tue, 7 Jul 2026 01:05:05 -0500 Subject: [TUHS] Reconstituted - Program design in the UNIX environment In-Reply-To: References: Message-ID: <20260707060505.tbcl72syeuqt47aj@illithid> Hi Arnold, At 2026-07-06T15:32:16+0300, Aharon Robbins via TUHS wrote: > Last week, with some spare time and a desire to stop doing things > that really needed doing, I decided to try to reconstitute the troff > source for "Program design in the UNIX environment" which had > apparently been lost. > > This version fixes a few issues in the existing PostScript version > of the document from http://harmful.cat-v.org. > > I've made it available at https://github.com/arnoldrobbins/unix-program-design > also. Thanks for doing this work! > Comments and/or fixes are welcome. I have several observations. They are not necessarily critiques. Some are notes to myself, or to anyone interested in contributing to groff to improve it, or are simply things to keep in mind about how the ms(7) package has evolved over the years. 1. It's nice to see the dagger reappearing in the document title. 2. groff ms's default line length is longer than that used by the original version of this document. groff ms uses symmetrical left and right margins by default (about 190 px on my screen); the original PostScript file did not (left: ~190px, right: ~290 px). 3. Figure 1 now looks reasonable. I think Clem Cole asked me to look into why the original version formatted so weirdly. I wanted to answer his question, but I couldn't come up with one: I checked out my copy of the V1 cat.1 man page, but it is a truly plain text document. No overstriking is evident. I therefore cannot account for the appearance of the underscores in the original PostScript file. 4. The bibliographic references are set as footnotes instead of end notes. Arnold has a comment in the reconstruction: .\" Notable differences: .\" - The formatting of the references is different. Anyone who knows .\" how to make GNU refer mimic the original markup, please .\" let me know. When formatting the document for myself with groff 1.24.1, I got a couple of diagnostics. $ groff -R -m s -T pdf unix_prog_design.ms >| unix_prog_design.pdf refer:unix_prog_design.ms:687: error: found '$LIST$' but not accumulating references troff:unix_prog_design.ms:145: warning: font name 'CW' is deprecated Seeing that hint, with the following patch, the footnotes become end notes like in the original document. $ git diff diff --git a/unix_prog_design.ms b/unix_prog_design.ms index 35de433..dd34f47 100644 --- a/unix_prog_design.ms +++ b/unix_prog_design.ms @@ -21,6 +21,9 @@ .\" - Thanks to Brian Kernighan's CSTR 100 macros for .P1 and .P2. .\" .so prog.mac +.R1 +accumulate +.R2 .TL Program design in the UNIX\(dg .FS This means that it appears that GNU refer's `-e` option, which means the same thing, didn't work. I'll have to file a Savannah ticket about that. 5. Regarding the other diagnostic: troff:unix_prog_design.ms:145: warning: font name 'CW' is deprecated ...font names are a known portability grievance. You can either change "prog.mac" to use groff's name for Courier roman, "CR", or use groff ms's font selection macros. Here's an example of each solution. $ git diff diff --git a/prog.mac b/prog.mac index 21a61fe..a14fbba 100644 --- a/prog.mac +++ b/prog.mac @@ -19,7 +19,7 @@ .nf .ps -\\n(dP .vs -\\n(dVu -.ft CW +.ft CR .nr t \\n(dT*\\w'x'u .ta 1u*\\ntu 2u*\\ntu 3u*\\ntu 4u*\\ntu 5u*\\ntu 6u*\\ntu 7u*\\ntu 8u*\\ntu 9u*\\ntu 10u*\\ntu 11u*\\ntu 12u*\\ntu 13u*\\ntu 14u*\\ntu .. $ git diff diff --git a/prog.mac b/prog.mac index 21a61fe..a3ae43f 100644 --- a/prog.mac +++ b/prog.mac @@ -19,7 +19,7 @@ .nf .ps -\\n(dP .vs -\\n(dVu -.ft CW +.CW .nr t \\n(dT*\\w'x'u .ta 1u*\\ntu 2u*\\ntu 3u*\\ntu 4u*\\ntu 5u*\\ntu 6u*\\ntu 7u*\\ntu 8u*\\ntu 9u*\\ntu 10u*\\ntu 11u*\\ntu 12u*\\ntu 13u*\\ntu 14u*\\ntu .. @@ -28,7 +28,7 @@ .ps \\n(PS .vs \\n(VSp .vs \\nvu -.ft 1 +.R .in .di .br However, there are other uses of `\f(CW` in the document, and they warn too. Due to the unpopularity of repeated font availability warnings, GNU troff emits only one per font name.[1] In the future, I'd like GNU troff to work more like a proper linter in this respect, and issue a warning on each occurrence, there by making it easier to drive an editor session by redirecting its stderr to a file, and then editing that file with `vi -q`. Here's a patch to reformat the table of Pike-disapproved cat(1) options more similarly to the original PostScript file. I have no idea if K&P originally used tbl(1) for this purpose. I also reduced the type size, as is apparent in the original PostScript, and changed the option dashes to use the "correct" glyph, `\-`.[2] @@ -292,16 +292,19 @@ with features. This list comes from .CW cat on the Berkeley distribution of the UNIX system: .PP -.nf -.in .5i -\f(CW-s\fP strip multiple blank lines to a single instance -\f(CW-n\fP number the output lines -\f(CW-b\fP number only the non-blank lines -\f(CW-v\fP make non-printing characters visible - \f(CW-ve\fP mark ends of lines - \f(CW-vt\fP change representation of tab -.in -.5i -.fi +.RS +.TS +Lf(CR)p-1 Lp-1 S. +\-s strip multiple blank lines to a single instance +\-n number the output lines +\-b number only the non-blank lines +\-v make non-printing characters visible +.T& +L Lf(CR)p-1 Lp-1. +\& \-ve mark ends of lines +\& \-vt change representation of tab +.TE +.RE .PP In System V, there are similar options and even a clash of naming: .CW -s (One could alternatively eschew the `p` column modifiers to the table, and bracket the whole thing in `.ps -1` and `.ps` instead.) Using tbl(1) of course requires modification of the command line. $ groff -Rt -m s -T pdf unix_prog_design.ms >| unix_prog_design.pdf 6. Cleaning up another occurrences of font `CW`, I saw further opportunities to use `\-` for Unix option dashes and also to employ ms(7)'s `Q` and `U` strings for typographer's quotation marks. However, the latter are 4.2BSD ms extensions--a fact I had not documented in groff's ms(7) man page and "ms.ms" document! So I'll take a note to myself to fix that. Using `` and '' appears to kern the symbols more closely to the original. On the gripping hand, passing 3 arguments to the `CW` macro _is_ a GNU extension in groff ms(7). You can always get around that with `\c`, though. @@ -353,7 +356,8 @@ But what about .CW -v ? That prints non-printing characters in a visible representation. Making strange characters visible is a genuinely new -function, for which no existing program is suitable. (``\f(CWsed -n l\fP'', +function, for which no existing program is suitable. +.CW "sed \-n l" ``, '' the closest standard possibility, aborts when given very long input lines, which are more likely to occur in files containing non-printing characters.) So isn't it appropriate to add the @@ -535,7 +539,8 @@ pr -$0 -t -l1 $* is the program name (\c .CW 2 , .CW 3 , -etc.), so \-\f(CW$0\fP +etc.), so +.CW $0 "" \- becomes \-\fIn\fP where .I n 7. I see that the em dashes in the "use of cat" footnote now actually appear. Great work! Regards, Branden [1] https://lists.gnu.org/archive/html/groff/2024-10/msg00066.html [2] https://lwn.net/Articles/947941/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From tuhs at tuhs.org Tue Jul 7 16:05:45 2026 From: tuhs at tuhs.org (Arnold Robbins via TUHS) Date: Tue, 07 Jul 2026 00:05:45 -0600 Subject: [TUHS] Reconstituted - Program design in the UNIX environment In-Reply-To: References: <202607061342.666DglvX005321@freefriends.org> Message-ID: <202607070605.66765kHe084278@freefriends.org> No worries. Thanks. "Greg 'groggy' Lehey" wrote: > On Monday, 6 July 2026 at 7:42:47 -0600, Arnold Robbins via TUHS wrote: > > Hmm, > > > > The troff file didn't get attached. It's attached now. > > > > Sorry 'bout that folks. > > Sorry from our side, I suppose. Our mailing list software strips most > attachments. We should probably revisit that situation (TUHS team > please discuss), but since you also put it on github, we don't have a > problem in this case. > > Greg > -- > Sent from my desktop computer. > Finger grog at lemis.com for PGP public key. > See complete headers for address and phone numbers. > This message is digitally signed. If your Microsoft mail program > reports problems, please read http://lemis.com/broken-MUA.php From tuhs at tuhs.org Tue Jul 7 17:32:43 2026 From: tuhs at tuhs.org (Arnold Robbins via TUHS) Date: Tue, 07 Jul 2026 01:32:43 -0600 Subject: [TUHS] Reconstituted - Program design in the UNIX environment In-Reply-To: <20260707060505.tbcl72syeuqt47aj@illithid> References: <20260707060505.tbcl72syeuqt47aj@illithid> Message-ID: <202607070732.6677WhCk096086@freefriends.org> Hi. Thanks for these. I have made changes, although not verbatim, conditionalizing some things on \(.g for groff. I'd like the document to remain portable to Plan 9 troff. I've pushed the updates to Github. W.R.T. the cat(I) man page, I simply put in backspaces to get the overstriking, and manually converted whatever weird bit was in the PostScript for the em dashes back into \(em. Thanks, Arnold "G. Branden Robinson via TUHS" wrote: > Hi Arnold, > > At 2026-07-06T15:32:16+0300, Aharon Robbins via TUHS wrote: > > Last week, with some spare time and a desire to stop doing things > > that really needed doing, I decided to try to reconstitute the troff > > source for "Program design in the UNIX environment" which had > > apparently been lost. > > > > This version fixes a few issues in the existing PostScript version > > of the document from http://harmful.cat-v.org. > > > > I've made it available at https://github.com/arnoldrobbins/unix-program-design > > also. > > Thanks for doing this work! > > > Comments and/or fixes are welcome. > > I have several observations. They are not necessarily critiques. Some > are notes to myself, or to anyone interested in contributing to groff to > improve it, or are simply things to keep in mind about how the ms(7) > package has evolved over the years. > > 1. It's nice to see the dagger reappearing in the document title. > > 2. groff ms's default line length is longer than that used by the > original version of this document. groff ms uses symmetrical left > and right margins by default (about 190 px on my screen); the > original PostScript file did not (left: ~190px, right: ~290 px). > > 3. Figure 1 now looks reasonable. I think Clem Cole asked me to look > into why the original version formatted so weirdly. I wanted to > answer his question, but I couldn't come up with one: I checked out > my copy of the V1 cat.1 man page, but it is a truly plain text > document. No overstriking is evident. I therefore cannot account > for the appearance of the underscores in the original PostScript > file. > > 4. The bibliographic references are set as footnotes instead of end > notes. Arnold has a comment in the reconstruction: > > .\" Notable differences: > .\" - The formatting of the references is different. Anyone who knows > .\" how to make GNU refer mimic the original markup, please > .\" let me know. > > When formatting the document for myself with groff 1.24.1, I got a > couple of diagnostics. > > $ groff -R -m s -T pdf unix_prog_design.ms >| unix_prog_design.pdf > refer:unix_prog_design.ms:687: error: found '$LIST$' but not accumulating references > troff:unix_prog_design.ms:145: warning: font name 'CW' is deprecated > > Seeing that hint, with the following patch, the footnotes become end > notes like in the original document. > > $ git diff > diff --git a/unix_prog_design.ms b/unix_prog_design.ms > index 35de433..dd34f47 100644 > --- a/unix_prog_design.ms > +++ b/unix_prog_design.ms > @@ -21,6 +21,9 @@ > .\" - Thanks to Brian Kernighan's CSTR 100 macros for .P1 and .P2. > .\" > .so prog.mac > +.R1 > +accumulate > +.R2 > .TL > Program design in the UNIX\(dg > .FS > > This means that it appears that GNU refer's `-e` option, which > means the same thing, didn't work. I'll have to file a Savannah > ticket about that. > > 5. Regarding the other diagnostic: > > troff:unix_prog_design.ms:145: warning: font name 'CW' is deprecated > > ...font names are a known portability grievance. You can either > change "prog.mac" to use groff's name for Courier roman, "CR", or > use groff ms's font selection macros. Here's an example of each > solution. > > $ git diff > diff --git a/prog.mac b/prog.mac > index 21a61fe..a14fbba 100644 > --- a/prog.mac > +++ b/prog.mac > @@ -19,7 +19,7 @@ > .nf > .ps -\\n(dP > .vs -\\n(dVu > -.ft CW > +.ft CR > .nr t \\n(dT*\\w'x'u > .ta 1u*\\ntu 2u*\\ntu 3u*\\ntu 4u*\\ntu 5u*\\ntu 6u*\\ntu 7u*\\ntu 8u*\\ntu 9u*\\ntu 10u*\\ntu 11u*\\ntu 12u*\\ntu 13u*\\ntu 14u*\\ntu > .. > > $ git diff > diff --git a/prog.mac b/prog.mac > index 21a61fe..a3ae43f 100644 > --- a/prog.mac > +++ b/prog.mac > @@ -19,7 +19,7 @@ > .nf > .ps -\\n(dP > .vs -\\n(dVu > -.ft CW > +.CW > .nr t \\n(dT*\\w'x'u > .ta 1u*\\ntu 2u*\\ntu 3u*\\ntu 4u*\\ntu 5u*\\ntu 6u*\\ntu 7u*\\ntu 8u*\\ntu 9u*\\ntu 10u*\\ntu 11u*\\ntu 12u*\\ntu 13u*\\ntu 14u*\\ntu > .. > @@ -28,7 +28,7 @@ > .ps \\n(PS > .vs \\n(VSp > .vs \\nvu > -.ft 1 > +.R > .in > .di > .br > > However, there are other uses of `\f(CW` in the document, and they > warn too. Due to the unpopularity of repeated font availability > warnings, GNU troff emits only one per font name.[1] In the > future, I'd like GNU troff to work more like a proper linter in > this respect, and issue a warning on each occurrence, there by > making it easier to drive an editor session by redirecting its > stderr to a file, and then editing that file with `vi -q`. > > Here's a patch to reformat the table of Pike-disapproved cat(1) > options more similarly to the original PostScript file. I have no > idea if K&P originally used tbl(1) for this purpose. I also > reduced the type size, as is apparent in the original PostScript, > and changed the option dashes to use the "correct" glyph, `\-`.[2] > > @@ -292,16 +292,19 @@ with features. This list comes from > .CW cat > on the Berkeley distribution of the UNIX system: > .PP > -.nf > -.in .5i > -\f(CW-s\fP strip multiple blank lines to a single instance > -\f(CW-n\fP number the output lines > -\f(CW-b\fP number only the non-blank lines > -\f(CW-v\fP make non-printing characters visible > - \f(CW-ve\fP mark ends of lines > - \f(CW-vt\fP change representation of tab > -.in -.5i > -.fi > +.RS > +.TS > +Lf(CR)p-1 Lp-1 S. > +\-s strip multiple blank lines to a single instance > +\-n number the output lines > +\-b number only the non-blank lines > +\-v make non-printing characters visible > +.T& > +L Lf(CR)p-1 Lp-1. > +\& \-ve mark ends of lines > +\& \-vt change representation of tab > +.TE > +.RE > .PP > In System V, there are similar options and even a clash of naming: > .CW -s > > (One could alternatively eschew the `p` column modifiers to the > table, and bracket the whole thing in `.ps -1` and `.ps` instead.) > > Using tbl(1) of course requires modification of the command line. > > $ groff -Rt -m s -T pdf unix_prog_design.ms >| unix_prog_design.pdf > > 6. Cleaning up another occurrences of font `CW`, I saw further > opportunities to use `\-` for Unix option dashes and also to employ > ms(7)'s `Q` and `U` strings for typographer's quotation marks. > However, the latter are 4.2BSD ms extensions--a fact I had not > documented in groff's ms(7) man page and "ms.ms" document! So I'll > take a note to myself to fix that. Using `` and '' appears to kern > the symbols more closely to the original. On the gripping hand, > passing 3 arguments to the `CW` macro _is_ a GNU extension in groff > ms(7). You can always get around that with `\c`, though. > > @@ -353,7 +356,8 @@ But what about > .CW -v ? > That prints non-printing characters in a visible > representation. Making strange characters visible is a genuinely new > -function, for which no existing program is suitable. (``\f(CWsed -n l\fP'', > +function, for which no existing program is suitable. > +.CW "sed \-n l" ``, '' > the closest standard possibility, aborts when given very long input > lines, which are more likely to occur in files containing non-printing > characters.) So isn't it appropriate to add the > > @@ -535,7 +539,8 @@ pr -$0 -t -l1 $* > is the program name (\c > .CW 2 , > .CW 3 , > -etc.), so \-\f(CW$0\fP > +etc.), so > +.CW $0 "" \- > becomes \-\fIn\fP > where > .I n > > 7. I see that the em dashes in the "use of cat" footnote now actually > appear. > > Great work! > > Regards, > Branden > > [1] https://lists.gnu.org/archive/html/groff/2024-10/msg00066.html > [2] https://lwn.net/Articles/947941/