summaryrefslogtreecommitdiff
path: root/sys/doc/prfile
blob: 04fd23b2a5fcd0a89fa20cd58879274565e53a45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
#!/bin/rc

switch($#*){
	case 1
		outfile = $1
		infile = $1.ms
	case *
		outfile = $1
		shift
		infile = $*
}

FONTS='.FP lucidasans'

MACS ='.de BT
.nr PX \\n(.s
.nr PF \\n(.f
.nr Bt 1
.ft 1
.ps \\n(PS
''lt \\n(LTu
.po \\n(POu
.if \\n%>0 .tl \(ts\\*(LF\(ts\\*(CF\(ts\\*(RF\(ts
.ft \\n(PF
.ps \\n(PX
..
.de PT
.lt \\n(LLu
.pc %
.nr PN \\n%
.nr Ps \\n(PS-1
.if \\n(Bt>0  .if e .tl @\\n%     \s\\n(Ps\\*(Au\s0@@@
.if \\n(Bt>0  .if o .tl @@@\f2\\*(Tl\\f1     \\n%@
.lt \\n(.lu
..'


macros = -ms

switch($outfile){
case 8½ acme gfx panel sam
	macros = ($macros -mpictures)
}

switch($outfile){
case 9 comp 8½ utf acme
	macros = ($macros -mnihongo)
}

fn assemble{
	switch($1){
	case 9
		pageno = 1
		title = 'Plan 9 From Bell Labs'
		author = 'INTRODUCTION'
	case README
		pageno = 23
		title = '\s-1README\s0'
		author = 'INTRODUCTION'
	case names
		pageno = 29
		title = 'The Use of Name Spaces in Plan 9'
		author = 'INTRODUCTION'
	case net
		pageno = 35
		title = 'The Organization of Networks in Plan 9'
		author = 'INTRODUCTION'
	case comp
		pageno = 49
		title = 'How to Use the Plan 9 C Compiler'
		author = 'PROGRAMMING'
	case ape
		pageno = 63
		title = 'APE \(em The ANSI/POSIX Environment'
		author = 'PROGRAMMING'
	case ug
		pageno = 67
		title = 'Alef User''s Guide'
		author = 'PROGRAMMING'
	case alef
		pageno = 103
		title = 'Alef Language Reference Manual'
		author = 'PROGRAMMING'
	case acidpaper
		pageno = 141
		title = 'Acid: A Debugger Built From A Language'
		author = 'PROGRAMMING'
	case acid
		pageno = 155
		title = 'Acid Manual'
		author = 'PROGRAMMING'
	case mk
		pageno = 181
		title = 'Maintaining Files on Plan 9 with Mk'
		author = 'PROGRAMMING'
	case mkfiles
		pageno = 195
		title = 'Plan 9 Mkfiles'
		author = 'PROGRAMMING'
	case asm
		pageno = 203
		title = 'A Manual for the Plan 9 assembler'
		author = 'PROGRAMMING'
	case 8½
		pageno = 211
		title = '8½, the Plan 9 Window System'
		author = 'USER INTERFACES'
	case rc
		pageno = 221
		title = 'Rc \(em The Plan 9 Shell'
		author = 'USER INTERFACES'
	case sam
		pageno = 237
		title = 'The Text Editor Sam'
		author = 'USER INTERFACES'
	case acme	# actually done in acme/mkfile
		pageno = 267
		title = 'The Text Editor Sam'
		author = 'USER INTERFACES'
	case utf
		pageno = 283
		title = 'Hello World, or \f1\S''12''Καλημέρα κόσμε\fP\S''0'', or \f(Jpこんにちは 世界\fP'
		author = 'IMPLEMENTATION'
	case compiler
		pageno = 295
		title = 'Plan 9 C Compilers'
		author = 'IMPLEMENTATION'
	case libmach
		pageno = 305
		title = 'Adding Application Support for a New Architecture'
		author = 'IMPLEMENTATION'
	case fs
		pageno = 313
		title = 'The Plan 9 File Server'
		author = 'IMPLEMENTATION'
	case il
		pageno = 321
		title = 'The IL Protocol'
		author = 'IMPLEMENTATION'
	case sleep
		pageno = 327
		title = 'Process Sleep and Wakeup on a Shared-memory Multiprocessor'
		author = 'IMPLEMENTATION'
	case gfx
		pageno = 333
		title = 'Raster Graphics in Plan 9'
		author = 'MISCELLANY'
	case panel
		pageno = 343
		title = 'A Quick Introduction to the Panel Library'
		author = 'MISCELLANY'
	case lp
		pageno = 363
		title = 'A Guide to the Lp Printer Spooler'
		author = 'MISCELLANY'
	case troff
		pageno = 371
		title = 'Troff User''s Manual'
		author = 'MISCELLANY'
	case spin
		pageno = 411
		title = 'Using SPIN'
		author = 'MISCELLANY'
	case port
		pageno = 439
		title = 'The Various Ports'
		author = 'INSTALLATION'
	case install
		pageno = 447
		title = 'Installing the Plan 9 Distribution'
		author = 'INSTALLATION'
	case *
		echo $1 page number not known >[2=1]
		exit page
	}
	echo $FONTS
	echo .pn $pageno
	echo .ds Tl "$title
	echo .ds Au "$author
	echo $MACS
	pic $infile | tbl | eqn
}

assemble $outfile | troff $macros | lp -m.9 -dstdout > $outfile.bs