aboutsummaryrefslogtreecommitdiffstats
path: root/troff/ext.h
blob: 9a523b2c5664221a58cc5b7dfcdaa56d9326d936 (plain) (blame)
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License, Version 1.0 only
 * (the "License").  You may not use this file except in compliance
 * with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */
/*
 * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
/*	  All Rights Reserved  	*/


/*	from OpenSolaris "ext.h	1.10	05/06/08 SMI"	*/

/*
 * Portions Copyright (c) 2005 Gunnar Ritter, Freiburg i. Br., Germany
 *
 * Sccsid @(#)ext.h	1.111 (gritter) 10/23/09
 */

/*
 * Changes Copyright (c) 2014 Carsten Kunze <carsten.kunze at arcor.de>
 */

/*
 * University Copyright- Copyright (c) 1982, 1986, 1988
 * The Regents of the University of California
 * All Rights Reserved
 *
 * University Acknowledgment- Portions of this document are derived from
 * software developed by the University of California, Berkeley, and its
 * contributors.
 */

#include <sys/types.h>

extern	char	**argp;
extern	char	*chname;
extern	char	*eibuf;
extern	char	*ibufp;
extern	char	*obufp;
extern	char	*xbufp;
extern	char	*xeibuf;
extern	char	*cfname[NSO+1];
extern	char	devname[20];
extern	char	ibuf[IBUFSZ];
extern	char	**mfiles;
extern	char	*nextf;
extern	char	obuf[],	*obufp;
extern	char	*termtab,	*fontfile;
extern	char	xbuf[IBUFSZ];
extern	filep	apptr;
extern	filep	ip;
extern	filep	nextb;
extern	filep	offset;
extern	filep	roff;
extern	filep	woff;
#ifdef NROFF
extern	long	lvmot;
extern	size_t	*chtab;
#else
extern	short	*chtab;
extern	int	html;
#endif
extern	int	*pnp;
extern	int	*pstab;
extern	int	app;
extern	int	ascii;
extern	int	bd;
extern	int	*bdtab;
extern	int	blmac;
extern	int	lsmac;
extern	int	glss;
extern	int	lsn;
extern	int	ccs;
extern	int	charf;
extern	tchar	**chartab;
extern	struct charout	*charout;
extern	int	charoutsz;
extern	int	clonef;
extern	int	copyf;
extern	int	cs;
extern	int	defaultpl;
extern	int	defcf;
extern	int	dfact;
extern	int	dfactd;
extern	int	diflg;
extern	int	dilev;
extern	int	donef;
extern	int	donep;
extern	int	dotT;
extern	int	dpn;
extern	int	dl;
extern	int	ds;
extern	int	ecs;
extern	int	ejf;
extern	int	em;
extern	int	eqflg;
extern	int	error;
extern	int	esc;
extern	int	eschar;
extern	int	ev;
extern	int	fc;
extern	char	*fchartab;
extern	int	flss;
extern	int	fmtchar;
extern	int	*fontlab;
extern	int	gflag;
extern	int	hflg;
extern	int	ifi;
extern	int	ifile;
extern	int	ifl[NSO];
extern	int	iflg;
extern	int	init;
extern	int	lastkern;
extern	int	lasttrack;
extern	int	lead;
extern	int	lg;
extern	int	lgf;
extern	int	macerr;
extern	int	mb_cur_max;
extern	int	mflg;
extern	int	mfont;
extern	int	minflg;
extern	int	minspc;
extern	int	mpts;
extern	int	ndone;
extern	struct contab	*newmn;
extern	int	nflush;
extern	int	nfo;
extern	int	nfonts;
extern	int	nform;
extern	int	nhyp;
extern	int	nlflg;
extern	int	nmfi;
extern	int	no_out;
extern	int	nofeed;
extern	int	nolt;
extern	int	nonumb;
extern	int	noscale;
extern	int	npn;
extern	int	npnflg;
extern	int	nx;
extern	int	oldbits;
extern	struct contab	*oldmn;
extern	int	*olt;
extern	int	over;
extern	int	padc;
extern	int	padj;
extern	int	pfont;
extern	int	pfrom;
extern	pid_t	pipeflg;
extern	int	pl;
extern	int	pnlist[];
extern	int	po1;
extern	int	po;
extern	int	ppts;
extern	int	print;
extern	int	ptid;
extern	int	pto;
extern	int	quiet;
extern	int	ralss;
extern	int	rargc;
extern	int	raw;
extern	int	rawwidth;
extern	long	realpage;
extern	int	res;
extern	int	setwdf;
extern	int	sfont;
extern	int	smnt;
extern	int	stdi;
extern	int	stop;
extern	int	sv;
extern	int	tabch,	ldrch;
extern	int	tailflg;
extern	int	tflg;
extern	int	totout;
extern	int	trap;
extern	int	*trtab;
extern	int	*trintab;
extern	int	*trnttab;
extern	int	tryglf;
extern	int	tty;
extern	int	ttyod;
extern	int	Tflg;
extern	int	ulfont;
extern	int	vflag;
extern	int	vpt;
extern	int	wbfi;
extern	int	widthp;
extern	int	xflag;
extern	int	xfont;
extern	int	xpts;
extern	int	no_out;
extern	int	ejl;
extern	struct	s	*frame,	*stk,	*nxf;
extern	tchar	**hyp;
extern	tchar	*olinep;
extern	tchar	*pbbuf;
extern	int	pbsize;
extern	int	pbp;
extern	int	lastpbp;
extern	tchar	ch;
extern	tchar	nrbits;
extern	tchar	*oline;
extern	size_t	olinesz;
extern	struct widcache {	/* width cache, indexed by character */
	int	fontpts;
	int	rst;
	int	rsb;
	int	width;
	int	track;
	char	*evid;
} *widcache;
extern	char *gchtab;
extern	struct	d	*d;
extern	struct	d	*dip;
extern	int	initbdtab[];

#ifdef	EUC
#include <stddef.h>
extern	int	multi_locale;
extern  int	csi_width[];
extern	char	mbbuf1[];
extern	char	*mbbuf1p;
extern	wchar_t	twc;
extern	int	(*wdbdg)(wchar_t, wchar_t, int);
extern	wchar_t	*(*wddlm)(wchar_t, wchar_t, int);
#endif	/* EUC */
extern	int	**lhangtab;
extern	int	**rhangtab;
extern	int	**kernafter;
extern	int	**kernbefore;
extern	int	**ftrtab;
extern	char	*lgmark;
extern	struct lgtab	**lgtab;
extern	int	***lgrevtab;
extern	int	spreadwarn;
extern	int	spreadlimit;
extern	int	lastrq;
extern	int	noschr;
extern	int	argdelim;
extern	int	bol;
extern	int	prdblesc;
extern	int	gemu;
extern	int	chomp;
extern	int	chompend;

/* n1.c */
extern	void	mainloop(void);
extern	int	tryfile(const char *, char *, int);
extern	void	catch(int);
extern	void	kcatch(int);
extern	void	init0(void);
extern	void	init1(char);
extern	void	init2(void);
extern	void	cvtime(void);
extern	int	ctoi(register char *);
extern	void	mesg(int);
extern	void	errprint(const char *, ...);
#define	fdprintf	xxfdprintf
extern	void	fdprintf(int, const char *, ...);
extern	char	*roff_sprintf(char *, size_t, const char *, ...);
extern	int	control(register int, register int);
extern	int	getrq2(void);
extern	int	getrq(int);
extern	tchar	getch(void);
extern	void	setxon(void);
extern	tchar	getch0(void);
extern	void	pushback(register tchar *);
extern	void	cpushback(register const char *);
extern	tchar	*growpbbuf(void);
extern	int	nextfile(void);
extern	int	popf(void);
extern	void	flushi(void);
extern	int	getach(void);
extern	int	rgetach(void);
extern	void	casenx(void);
extern	int	getname(void);
extern	void	caseso(void);
extern	void	casepso(void);
extern	void	caself(void);
extern	void	casecf(void);
extern	void	casesy(void);
extern	void	getpn(register char *);
extern	void	setrpt(void);
extern	void	casedb(void);
extern	void	casexflag(void);
extern	void	casecp(void);
extern	void	caserecursionlimit(void);
extern	void	casechar(int);
extern	void	casefchar(void);
extern	void	caserchar(void);
extern	tchar	setchar(tchar);
extern	tchar	sfmask(tchar);
extern	int	issame(tchar, tchar);
/* n2.c */
extern	int	pchar(register tchar);
extern	void	pchar1(register tchar);
extern	void	outascii(tchar);
extern	void	oputs(register const char *);
extern	void	flusho(void);
extern	void	caseoutput(void);
extern	void	done(int);
extern	void	done1(int);
extern	void	done2(int);
extern	void	done3(int);
extern	void	edone(int);
extern	void	casepi(void);
/* n3.c */
extern	void	*growcontab(void);
extern	void	*growblist(void);
extern	void	caseig(void);
extern	void	casern(void);
extern	void	maddhash(register struct contab *);
extern	void	munhash(register struct contab *);
extern	filep	finds(register int, int, int);
extern	void	caserm(void);
extern	void	caseas(void);
extern	void	caseds(void);
extern	void	caseam(void);
extern	void	casede(void);
extern	struct contab	*findmn(register int);
extern	struct contab	*findmx(register int);
extern	int	skip(int);
extern	int	copyb(void);
extern	void	copys(void);
extern	filep	alloc(void);
extern	void	ffree(filep);
extern	void	wbt(tchar);
extern	void	wbf(register tchar);
extern	void	wbfl(void);
extern	tchar	rbf(void);
extern	tchar	rbf0(register filep);
extern	filep	incoff(register filep);
extern	tchar	popi(void);
extern	int	pushi(filep, int, enum flags);
extern	void	sfree(struct s *);
extern 	struct s	*macframe(void);
extern	int	getsn(int);
extern	int	setstr(void);
extern	void	collect(void);
extern	void	seta(void);
extern	void	casebox(void);
extern	void	caseboxa(void);
extern	void	caseda(int);
extern	void	casedi(int);
extern	void	casedt(void);
extern	void	caseals(void);
extern	void	casewatch(int);
extern	void	caseunwatch(void);
extern	void	prwatch(struct contab *, int, int);
extern	void	casetl(void);
extern	void	casepc(void);
extern	void	casechop(void);
extern	void	casepm(void);
extern	void	stackdump(void);
extern	const char	*macname(int);
extern	int	maybemore(int, int);
extern	tchar	setuc(void);
extern	int	makerq(const char *);
/* n4.c */
extern	void	*grownumtab(void);
extern	void	setn(void);
extern	int	wrc(tchar);
extern	void	setn1(int, int, tchar);
extern	void	nunhash(register struct numtab *);
extern	struct numtab	*findr(register int);
extern	struct numtab	*usedr(register int);
extern	int	fnumb(register int, register int (*)(tchar));
extern	int	decml(register int, register int (*)(tchar));
extern	int	roman(int, int (*)(tchar));
extern	int	roman0(int, int (*)(tchar), const char *, const char *);
extern	int	abc(int, int (*)(tchar));
extern	int	abc0(int, int (*)(tchar));
extern	int	hatoi(void);
#undef	atof
#define	atof	xxatof
extern	float	atof(void);
extern	long long	atoi0(void);
extern	double	atof0(void);
extern	void	setnr(const char *, int, int);
extern	void	setnrf(const char *, float, float);
extern	void	caserr(void);
extern	void	casernn(void);
extern	void	casenr(void);
extern	void	casenrf(void);
extern	void	caselnr(void);
extern	void	caselnrf(void);
extern	void	setr(void);
extern	void	caseaf(void);
extern	void	setaf(void);
extern	void	casealn(void);
extern	void	casewatchn(int);
extern	void	caseunwatchn(void);
extern	void	prwatchn(struct numtab *);
extern	int	vnumb(int *);
extern	int	hnumb(int *);
extern	int	inumb(int *);
extern	int	inumb2(int *, int *);
extern	float	atop(void);
extern	int	quant(int, int);
extern	tchar	moflo(int);
/* n5.c */
extern	void	save_tty(void);
extern	void	casead(void);
extern	void	casena(void);
extern	void	casefi(void);
extern	void	casenf(void);
extern	void	casepadj(void);
extern	void	casers(void);
extern	void	casens(void);
extern	void	casespreadwarn(void);
extern	int	chget(int);
extern	void	casecc(void);
extern	void	casec2(void);
extern	void	casehc(void);
extern	void	casetc(void);
extern	void	caselc(void);
extern	void	casehy(void);
extern	void	casenh(void);
extern	void	casehlm(void);
extern	void	casehcode(void);
extern	void	caseshc(void);
extern	void	casehylen(void);
extern	void	casehypp(void);
extern	void	casepshape(void);
extern	void	caselpfx(void);
#undef min
#undef max
extern	int	max(int, int);
extern	int	min(int, int);
extern	void	casece(void);
extern	void	caserj(void);
extern	void	casebrnl(void);
extern	void	casebrpnl(void);
extern	void	casein(void);
extern	void	casell(void);
extern	void	caselt(void);
extern	void	caseti(void);
extern	void	casels(void);
extern	void	casepo(void);
extern	void	casepl(void);
extern	void	casewh(void);
extern	void	casedwh(void);
extern	void	casech(void);
extern	void	casedch(void);
extern	void	casevpt(void);
extern	tchar	setolt(void);
extern	int	findn(struct d *, int);
extern	void	casepn(void);
extern	void	casebp(void);
extern	void	casetm(int);
extern	void	casetmc(void);
extern	void	caseerrprint(void);
extern	void	caseopen(void);
extern	void	caseopena(void);
extern	void	casewrite(void);
extern	void	casewritec(void);
extern	void	casewritem(void);
extern	void	caseclose(void);
extern	void	casesp(int);
extern	void	casebrp(void);
extern	void	caseblm(void);
extern	void	caselsm(void);
extern	void	casert(void);
extern	void	caseem(void);
extern	void	casefl(void);
extern	void	caseev(void);
extern	void	caseevc(void);
extern	void	evc(struct env *, struct env *);
extern	void	evcline(struct env *, struct env *);
extern	void	relsev(struct env *);
extern	void	caseel(void);
extern	void	caseie(void);
extern	void	caseif(int);
extern	void	casenop(void);
extern	void	casechomp(void);
extern	void	casereturn(void);
extern	void	casewhile(void);
extern	void	casebreak(void);
extern	void	casecontinue(int);
extern	void	eatblk(int);
extern	int	cmpstr(tchar);
extern	void	caserd(void);
extern	int	rdtty(void);
extern	void	caseec(void);
extern	void	caseeo(void);
extern	void	caseecs(void);
extern	void	caseecr(void);
extern	void	caseescoff(void);
extern	void	caseescon(void);
extern	void	caseta(void);
extern	void	casene(void);
extern	void	casetr(int);
extern	void	casetrin(void);
extern	void	casetrnt(void);
extern	void	casecu(void);
extern	void	caseul(void);
extern	void	caseuf(void);
extern	void	caseit(int);
extern	void	caseitc(void);
extern	void	casemc(void);
extern	void	casesentchar(void);
extern	void	casetranschar(void);
extern	void	casebreakchar(void);
extern	void	casenhychar(void);
extern	void	caseconnectchar(void);
extern	void	casemk(void);
extern	void	casesv(void);
extern	void	caseos(void);
extern	void	casenm(void);
extern	void	getnm(int *, int);
extern	void	casenn(void);
extern	void	caseab(void);
extern	void	restore_tty(void);
extern	void	set_tty(void);
extern	void	echo_off(void);
extern	void	echo_on(void);
/* n7.c */
extern	int	collectmb(tchar);
extern	void	tbreak(void);
extern	void	donum(void);
extern	void	text(void);
extern	void	nofill(void);
extern	void	callsp(void);
extern	void	ckul(void);
extern	int	storeline(register tchar, int);
extern	void	newline(int);
extern	int	findn1(struct d *, int);
extern	void	chkpn(void);
extern	int	findt(struct d *, int);
extern	int	findt1(void);
extern	void	eject(struct s *);
extern	int	movword(void);
extern	void	horiz(int);
extern	void	setnel(void);
extern	int	getword(int);
extern	void	storeword(register tchar, register int);
extern	void	growpgsize(void);
/* n8.c */
extern	void	hyphen(tchar *);
extern	int	punct(tchar);
extern	int	alph(tchar);
extern	void	caseht(void);
extern	void	casehw(void);
extern	int	exword(void);
extern	int	suffix(void);
extern	int	maplow(tchar);
extern	int	vowel(tchar);
extern	tchar	*chkvow(tchar *);
extern	void	digram(void);
extern	int	dilook(tchar, tchar, const char [26][13]);
extern	void	casehylang(void);
/* n9.c */
extern	tchar	setz(void);
extern	void	setline(void);
extern	tchar	eat(tchar);
extern	void	setov(void);
extern	void	setbra(void);
extern	void	setvline(void);
extern	void	setdraw(void);
extern	void	casefc(void);
extern	tchar	setfield(int);
extern	tchar	setpenalty(void);
extern	tchar	setdpenal(void);
extern	tchar	mkxfunc(int, int);
extern	void	pushinlev(void);
extern	tchar	popinlev(void);
extern	void	localize(void);
extern	void	caselc_ctype(void);
extern	void	casepsbb(void);
extern	void	casewarn(void);
extern	void	nosuch(int);
extern	void	illseq(int, const char *, int);
extern	void	missing(void);
extern	void	nodelim(int);
extern	void	storerq(int);
extern	int	fetchrq(tchar *);
extern	void	morechars(int);
#ifdef NROFF
extern	void	caseutf8conv(void);
extern	int	addch(char *);
#endif