2 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
4 * Copyright (c) 2016 by Delphix. All rights reserved.
7 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
8 /* All Rights Reserved */
12 * Copyright (c) 1980 Regents of the University of California.
13 * All rights reserved. The Berkeley software License Agreement
14 * specifies the terms and conditions for redistribution.
17 #pragma ident "%Z%%M% %I% %E% SMI"
21 * soelim - a filter to process n/troff input eliminating .so's
23 * Author: Bill Joy UCB July 8, 1977
25 * This program eliminates .so's from a n/troff input stream.
26 * It can be used to prepare safe input for submission to the
27 * phototypesetter since the software supporting the operator
28 * doesn't let them do chdir.
30 * This is a kludge and the operator should be given the
31 * ability to do chdir.
33 * This program is more generally useful, it turns out, because
34 * the program tbl doesn't understand ".so" directives.
36 #define STDIN_NAME "-"
39 main(int argc
, char *argv
[])
45 (void)process(STDIN_NAME
);
49 (void)process(argv
[0]);
65 if (!strcmp(file
, STDIN_NAME
)) {
68 soee
= fopen(file
, "r");
92 while (c
== ' ' || c
== '\t');
117 if (process(fname
) < 0)
119 printf(".so %s\n", fname
);