Path: utzoo!attcan!uunet!convex!convex1.convex.com!rosenkra From: rosenkra@convex1.convex.com (William Rosencranz) Newsgroups: comp.os.minix Subject: nroff v1.10p3 (part01/05) Summary: new version Keywords: nroff conditionals ms man Message-ID: <104586@convex.convex.com> Date: 3 Aug 90 04:18:58 GMT Sender: news@convex.com Organization: Convex Computer Corporation; Richardson, TX Lines: 1814 --- part 1 of 5 shar files #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # If this archive is complete, you will see the following message at the end: # "End of archive 1 (of 5)." # # Contents: # MANIFEST Makefile Makefile.tos POST.MNX README nroff.man # # Wrapped by rosenkra%c1yankee@convex.com on Thu Aug 2 13:39:42 1990 # PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f MANIFEST -a "${1}" != "-c" ; then echo shar: Will not over-write existing file \"MANIFEST\" else echo shar: Extracting \"MANIFEST\" \(1400 characters\) sed "s/^X//" >MANIFEST <<'END_OF_MANIFEST' XManifest: X Xmacro libraries: X-rw-r--r-- 1 rosenkra 8405 Jul 29 14:59 tmac.an (install in /usr/lib/tmac) X-rw-r--r-- 1 rosenkra 9432 Jul 29 14:59 tmac.s X Xsource code: X-rw-r--r-- 1 rosenkra 8221 Jul 29 15:36 Makefile (read this before make) X-rw-r--r-- 1 rosenkra 8118 Jul 30 00:19 Makefile.tos X-rw-r--r-- 1 rosenkra 30522 Jul 29 15:34 command.c X-rw-r--r-- 1 rosenkra 1819 Jul 29 15:34 config.h X-rw-r--r-- 1 rosenkra 18010 Jul 29 15:34 escape.c X-rw-r--r-- 1 rosenkra 4007 Jul 29 15:34 io.c X-rw-r--r-- 1 rosenkra 13787 Jul 29 15:34 low.c X-rw-r--r-- 1 rosenkra 10226 Jul 29 15:34 macros.c X-rw-r--r-- 1 rosenkra 19776 Jul 29 15:34 main.c X-rw-r--r-- 1 rosenkra 15981 Jul 29 15:39 nroff.h X-rw-r--r-- 1 rosenkra 21 Jul 29 15:34 patchlvl.h X-rw-r--r-- 1 rosenkra 5761 Jul 29 15:34 strings.c X-rw-r--r-- 1 rosenkra 13950 Jul 29 15:34 text.c X-rw-r--r-- 1 rosenkra 534 Jul 29 15:38 version.h X Xothers X-rw-r--r-- 1 rosenkra 3657 Jul 29 14:59 README (please read this first) X-rw-r--r-- 1 rosenkra 1212 Jul 30 00:20 MANIFEST (this file) X-rw-r--r-- 1 rosenkra 3574 Aug 2 13:22 POST.MNX (read this, too) X Xman pages: X-rw-r--r-- 1 rosenkra 7280 Jul 29 15:09 man.man (manpage sources) X-rw-r--r-- 1 rosenkra 3486 Jul 29 15:09 ms.man X-rw-r--r-- 1 rosenkra 25302 Jul 29 15:18 nroff.man X Xtests: X-rw-r--r-- 1 rosenkra 32307 Jul 29 15:27 tests.uu (uuencoded compressed shar) END_OF_MANIFEST if test 1400 -ne `wc -c Makefile <<'END_OF_Makefile' X#---------------------------------------------------------------------------- X# makefile for nroff 07/21/90 wjr. this makefile _SHOULD_ handle minix, tos, X# and unix. PLEASE READ THE ENTIRE MAKEFILE BEFORE YOU MAKE! X# X# this makefile was designed for my own make(1) and may not work correctly X# with minix. but then i don't have to worry about 64k limits so it can be X# more robust. it should work with any reasonable make, though. nothing fancy X# here... X# X# note that i have set this up for minix, based on the old makefile but X# it has not been tested... X# X# please look at the makefile first to customize it to your environment. X#---------------------------------------------------------------------------- X# X# MACRO DEFINITIONS: X# X X# version (3 digits max): X# XVER = 110 X X# compiler: X# XCC = cc X X# rename: X# XRENAME = cp X X# install: X# XINSTALL = cp X X# X# main target: X# X# for tos, make this ".ttp", otherwise blank X# XEXTN = X X# for testing, use "x", otherwise blank X# XXTST = XTARGET = $(XTST)nroff$(EXTN) X X# manual page names: X# X# section of the manual (generally always "1") X# XSECTN = 1 XMANSRC = nroff.man XCATPAGE = nroff.cat XMANPAGE = nroff.$(SECTN) XSECTN_an = 7 XMANSRC_an = man.man XCATPAGE_an = man.cat XMANPAGE_an = man.$(SECTN_an) XSECTN_s = 7 XMANSRC_s = ms.man XCATPAGE_s = ms.cat XMANPAGE_s = ms.$(SECTN_s) X X# compile flags: X# X# for different versions, use only one of the following sets in VERSFLAGS: X# tos: -Dtos -Dalcyon X# minix ST: -Dminix -DatariST X# minix PC: -Dminix X# unix: -Dunix X# X# DEBUG can be "-g" under unix and OPTIMIZE can be "-O" X# note that minix may need other flags as well (i don't have minix) X# XVERSFLAGS = -D_MINIX -D_POSIX_SOURCE XDEFS = -F XDEBUG = XOPTIMIZE = XCFLAGS = $(DEFS) $(VERSFLAGS) $(DEBUG) $(OPTIMIZE) X X# link flags: X# X# for tos, i use "-s -stksiz", others may vary X# XLDFLAGS = -i X X# source files: X# XHEADERS = config.h nroff.h version.h XSRCS1 = main.c command.c text.c io.c XSRCS2 = macros.c strings.c escape.c low.c XSRCS = $(SRCS1) $(SRCS2) X X# object targets: X# X# for normal systems (i.e. sun,apollo,hp,ibm,cray,etc): O=o X# for minix (ACK is right!): O=s (SHEESH!!!) XO =s XOBJS = main.$O command.$O text.$O io.$O macros.$O strings.$O \ X escape.$O low.$O X X# other files in the distribution: X# XTESTS = test.0 XOTHERS = README MANIFEST Makefile nroff.man man.man ms.man \ X tmac.an tmac.s $(TESTS) X X# linked libraries: X# X# for tos, i use "-lterm" X# XLIBS = X X# arc archive: X# XARCFILE = nroff$(VER).arc X X# executable uuencoded: X# XUUEFILE = nroff$(VER).uue X X# shar files: X# XSHARFLG = -a XSHARF1 = nroff$(VER).01 XSHARF2 = nroff$(VER).02 XSHARF3 = nroff$(VER).03 XSHARF4 = nroff$(VER).04 XSHARF5 = nroff$(VER).05 XSHARFILE = nroff$(VER).shr X X# macro library files: X# XMAN_MACRO = tmac.an XMS_MACRO = tmac.s X#ME_MACRO = tmac.e X X# final locations for things: X# X# set these as per your system (for "make install") X# tos: TMACDIR = c:\lib\tmac (for tmac.an) X# BINDIR = c:\bin (for nroff) X# MANDIR = c:\man\man$(SECTN) (for nroff.1) X# minix: TMACDIR = /usr/lib/tmac X# BINDIR = /usr/bin X# MANDIR = /usr/man/man$(SECTN) X# unix: TMACDIR = /usr/local/lib/tmac X# BINDIR = /usr/local/bin X# MANDIR = /usr/local/man/man$(SECTN) X# XTMACDIR = /usr/lib/tmac XBINDIR = /bin XMANDIR = /usr/man/man$(SECTN) XMANDIR_an = /usr/man/man$(SECTN_an) XMANDIR_s = /usr/man/man$(SECTN_s) X X# system path seperator: X# X# note that my make under tos uses \ for line continuation so i can't X# put a space after the "=". X# for tos, use: S=\ (NO SPACES!!!) X# for minix, unix, use: S=/ X# XS =/ X X# testing: X# X# make sure to "setenv TMACDIR ." first... X# XRUNPARM = -man test.0 XRUNOUT = >test.out X X# a non-objecting rm command: X# X# unix/minix: RM = rm -f XRM = rm -f X X X#---------------------------------------------------------------------------- X# X# ACTIONS: X# X X X# directions for making things is default target... X# Xdirections: X @echo Please read the README file first. Also review makefile. X @echo Type "make all" to build $(TARGET) X @echo Type "make manpage" to build $(MANPAGE) X @echo Type "make install" to build/install $(TARGET) X @echo Type "make test" to test $(TARGET) X @echo Type "make clean" to remove objects X @echo Type "make clobber" to remove objects and $(TARGET) X @echo Type "make arc" to make source archive $(ARCFILE) X @echo Type "make shar" to make source shar file $(SHARFILE) X @echo Type "make uue" to make uuencoded $(TARGET) $(UUEFILE) X X X X# make main target... X# Xall: $(TARGET) X X$(TARGET): $(OBJS) X $(CC) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) X @echo "done making $(TARGET)" X X X X# make installable manpage... X# X# you may have to change this. i keep my manpages pre-nroffed so i use X# CATPAGE as my manpage. your man(1) may use nroff to display manpages, X# so you may want to do this instead: X# X# manpage: $(MANPAGE) $(MANPAGE_an) X# X# $(MANPAGE): $(MANSRC) X# $(RENAME) $(MANSRC) $(MANPAGE) X# X# $(MANPAGE_an): $(MANSRC_an) X# $(RENAME) $(MANSRC_an) $(MANPAGE_an) X# Xmanpage: $(MANPAGE) $(MANPAGE_an) $(MANPAGE_s) X @echo "done making manpages" X X$(MANPAGE): $(CATPAGE) X $(RENAME) $(CATPAGE) $(MANPAGE) X X$(MANPAGE_an): $(CATPAGE_an) X $(RENAME) $(CATPAGE_an) $(MANPAGE_an) X X$(MANPAGE_s): $(CATPAGE_s) X $(RENAME) $(CATPAGE_s) $(MANPAGE_s) X X$(CATPAGE): $(MANSRC) # note: uses built-in .man.cat rule!!!!! X X$(CATPAGE_an): $(MANSRC_an) X X$(CATPAGE_s): $(MANSRC_s) X X X X# to test run it... X# Xtest: $(TARGET) X $(TARGET) $(RUNPARM) $(RUNOUT) X @echo "done with test" X X X# install target, manpage, and lib stuff... X# Xinstall: install_bin install_man install_tmac X @echo "install complete" X Xinstall_bin: $(TARGET) X $(INSTALL) $(TARGET) $(BINDIR)$S$(TARGET) X @echo "done installing $(TARGET)" X Xinstall_man: $(MANPAGE) $(MANPAGE_an) $(MANPAGE_s) X $(INSTALL) $(MANPAGE) $(MANDIR)$S$(MANPAGE) X $(INSTALL) $(MANPAGE_an) $(MANDIR_an)$S$(MANPAGE_an) X $(INSTALL) $(MANPAGE_s) $(MANDIR_s)$S$(MANPAGE_s) X @echo "done installing manpages" X Xinstall_tmac: X $(INSTALL) $(MAN_MACRO) $(TMACDIR)$S$(MAN_MACRO) X $(INSTALL) $(MS_MACRO) $(TMACDIR)$S$(MS_MACRO) X# $(INSTALL) $(ME_MACRO) $(TMACDIR)$S$(ME_MACRO) X @echo "done installing macro packages" X X X X# clean up... X# Xclean: X $(RM) $(OBJS) X Xclobber: X $(RM) $(OBJS) X $(RM) $(TARGET) X Xcleansrc: X $(RM) $(SRCS) $(HEADERS) X Xcleandocs: X $(RM) docs.arc readme bugs $(MANPAGE) $(MAN_MACRO) $(MS_MACRO) X X X X# various archives... X# Xuue: X $(UUENCODE) $(TARGET) X @echo done making $(UUEFILE) X Xshar: uue X $(SHAR) $(SHARFLG) $(OTHERS) >$(SHARF1) X $(SHAR) $(SHARFLG) $(SRCS1) >$(SHARF2) X $(SHAR) $(SHARFLG) $(SRCS2) >$(SHARF3) X $(SHAR) $(SHARFLG) $(HEADERS) >$(SHARF4) X $(SHAR) $(SHARFLG) $(UUEFILE) >$(SHARF5) X @echo done making $(SHARF1) $(SHARF2) $(SHARF3) $(SHARF4) $(SHARF5) X Xarc: X $(ARC) a $(ARCFILE) $(OTHERS) X $(ARC) a $(ARCFILE) $(HEADERS) X $(ARC) a $(ARCFILE) $(SRCS) X @echo done making $(ARCFILE) X X X X# the following actions i use while developing so i can save disk space. X X# use this to save space on disk X# Xbackup: objs.arc srcs.arc docs.arc X Xobjs.arc: X $(ARC) a objs.arc $(OBJS) $(TARGET) X @echo done making objs.arc. consider "make clean" X Xsrcs.arc: X $(ARC) a srcs.arc $(HEADERS) X $(ARC) a srcs.arc $(SRCS) X @echo done making srcs.arc. consider "make cleansrc" X Xdocs.arc: X $(ARC) a docs.arc readme bugs $(MANPAGE) $(MAN_MACRO) $(MS_MACRO) X @echo done making docs.arc. consider "make cleandocs" X X# use this to go back to work after "make backup" X# Xrestore: X $(ARC) x srcs.arc $(HEADERS) X $(ARC) x srcs.arc $(SRCS) X $(ARC) x docs.arc $(MANPAGE) $(MAN_MACRO) $(MS_MACRO) X $(ARC) x objs.arc $(OBJS) X $(ARC) x objs.arc $(TARGET) X @echo done with restore...ok to continue to hack X @echo be sure to setenv TMACDIR during testing X X X#---------------------------------------------------------------------------- X# X# DEPENDENCIES: X# X# note: nroff.h includes version.h and config.h. all sources include nroff.h X# and in addition, main.c includes config.h as well (first thing). X Xversion.h: patchlvl.h X touch version.h X Xnroff.h: version.h config.h X touch nroff.h X Xmain.$O: main.c nroff.h Xcommand.$O: command.c nroff.h Xtext.$O: text.c nroff.h Xio.$O: io.c nroff.h Xmacros.$O: macros.c nroff.h Xstrings.$O: strings.c nroff.h Xescape.$O: escape.c nroff.h Xlow.$O: low.c nroff.h X X# the end... END_OF_Makefile if test 8221 -ne `wc -c Makefile.tos <<'END_OF_Makefile.tos' X#---------------------------------------------------------------------------- X# makefile for nroff 07/21/90 wjr. this makefile _SHOULD_ handle minix, tos, X# and unix. PLEASE READ THE ENTIRE MAKEFILE BEFORE YOU MAKE! X# X# this makefile was designed for my own make(1) and may not work correctly X# with minix. but then i don't have to worry about 64k limits so it can be X# more robust. it should work with any reasonable make, though. nothing fancy X# here... X# X# please look at the makefile first to customize it to your environment. X#---------------------------------------------------------------------------- X# X# MACRO DEFINITIONS: X# X X# version (3 digits max): X# XVER = 110 X X# compiler: X# XCC = cc X X# rename: X# XRENAME = cp X X# install: X# XINSTALL = cp X X# X# main target: X# X# for tos, make this ".ttp", otherwise blank X# XEXTN = .ttp X X# for testing, use "x", otherwise blank X# XXTST = XTARGET = $(XTST)nroff$(EXTN) X X# manual page names: X# X# section of the manual (generally always "1") X# XSECTN = 1 XMANSRC = nroff.man XCATPAGE = nroff.cat XMANPAGE = nroff.$(SECTN) XSECTN_an = 7 XMANSRC_an = man.man XCATPAGE_an = man.cat XMANPAGE_an = man.$(SECTN_an) XSECTN_s = 7 XMANSRC_s = ms.man XCATPAGE_s = ms.cat XMANPAGE_s = ms.$(SECTN_s) X X# compile flags: X# X# for different versions, use only one of the following sets in VERSFLAGS: X# tos: -Dtos -Dalcyon X# minix ST: -Dminix -DatariST X# minix PC: -Dminix X# unix: -Dunix X# X# DEBUG can be "-g" under unix and OPTIMIZE can be "-O" X# note that minix may need other flags as well (i don't have minix) X# XVERSFLAGS = -Dalcyon -Dtos XDEFS = XDEBUG = XOPTIMIZE = XCFLAGS = $(DEFS) $(VERSFLAGS) $(DEBUG) $(OPTIMIZE) X X# link flags: X# X# for tos, i use "-s -stksiz", others may vary X# XLDFLAGS = -s -stksiz X X# source files: X# XHEADERS = config.h nroff.h version.h XSRCS1 = main.c command.c text.c io.c XSRCS2 = macros.c strings.c escape.c low.c XSRCS = $(SRCS1) $(SRCS2) X X# object targets: X# X# for normal systems (i.e. sun,apollo,hp,ibm,cray,etc): O=o X# for minix (ACK is right!): O=s (SHEESH!!!) XO =o XOBJS = main.$O command.$O text.$O io.$O macros.$O strings.$O \ X escape.$O low.$O X X# other files in the distribution: X# XTESTS = test.0 XOTHERS = README MANIFEST Makefile nroff.man man.man ms.man \ X tmac.an tmac.s $(TESTS) X X# linked libraries: X# X# for tos, i use "-lc" X# XLIBS = -lterm -ltime -lc X X# arc archive: X# XARCFILE = nroff$(VER).arc X X# executable uuencoded: X# XUUEFILE = nroff$(VER).uue X X# shar files: X# XSHARFLG = -a XSHARF1 = nroff$(VER).01 XSHARF2 = nroff$(VER).02 XSHARF3 = nroff$(VER).03 XSHARF4 = nroff$(VER).04 XSHARF5 = nroff$(VER).05 XSHARFILE = nroff$(VER).shr X X# macro library files: X# XMAN_MACRO = tmac.an XMS_MACRO = tmac.s X#ME_MACRO = tmac.e X X# final locations for things: X# X# set these as per your system (for "make install") X# tos: TMACDIR = c:\lib\tmac (for tmac.an) X# BINDIR = c:\bin (for nroff) X# MANDIR = c:\man\man$(SECTN) (for nroff.1) X# minix: TMACDIR = /usr/lib/tmac X# BINDIR = /usr/bin X# MANDIR = /usr/man/man$(SECTN) X# unix: TMACDIR = /usr/local/lib/tmac X# BINDIR = /usr/local/bin X# MANDIR = /usr/local/man/man$(SECTN) X# XTMACDIR = c:\lib\tmac XBINDIR = c:\bin XMANDIR = c:\man\man$(SECTN) XMANDIR_an = c:\man\man$(SECTN_an) XMANDIR_s = c:\man\man$(SECTN_s) X X# system path seperator: X# X# note that my make under tos uses \ for line continuation so i can't X# put a space after the "=". X# for tos, use: S=\ (NO SPACES!!!) X# for minix, unix, use: S=/ X# XS =\ X X# testing: X# X# make sure to "setenv TMACDIR ." first... X# XRUNPARM = -man test.0 XRUNOUT = >test.out X X# a non-objecting rm command: X# X# unix/minix: RM = rm -f XRM = rm X X X#---------------------------------------------------------------------------- X# X# ACTIONS: X# X X X# directions for making things is default target... X# Xdirections: X @echo Please read the README file first. Also review makefile. X @echo Type "make all" to build $(TARGET) X @echo Type "make manpage" to build $(MANPAGE) X @echo Type "make install" to build/install $(TARGET) X @echo Type "make test" to test $(TARGET) X @echo Type "make clean" to remove objects X @echo Type "make clobber" to remove objects and $(TARGET) X @echo Type "make arc" to make source archive $(ARCFILE) X @echo Type "make shar" to make source shar file $(SHARFILE) X @echo Type "make uue" to make uuencoded $(TARGET) $(UUEFILE) X X X X# make main target... X# Xall: $(TARGET) X X$(TARGET): $(OBJS) X $(CC) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) X @echo "done making $(TARGET)" X X X X# make installable manpage... X# X# you may have to change this. i keep my manpages pre-nroffed so i use X# CATPAGE as my manpage. your man(1) may use nroff to display manpages, X# so you may want to do this instead: X# X# manpage: $(MANPAGE) $(MANPAGE_an) X# X# $(MANPAGE): $(MANSRC) X# $(RENAME) $(MANSRC) $(MANPAGE) X# X# $(MANPAGE_an): $(MANSRC_an) X# $(RENAME) $(MANSRC_an) $(MANPAGE_an) X# Xmanpage: $(MANPAGE) $(MANPAGE_an) $(MANPAGE_s) X @echo "done making manpages" X X$(MANPAGE): $(CATPAGE) X $(RENAME) $(CATPAGE) $(MANPAGE) X X$(MANPAGE_an): $(CATPAGE_an) X $(RENAME) $(CATPAGE_an) $(MANPAGE_an) X X$(MANPAGE_s): $(CATPAGE_s) X $(RENAME) $(CATPAGE_s) $(MANPAGE_s) X X$(CATPAGE): $(MANSRC) # use built-in .man.cat rule X X$(CATPAGE_an): $(MANSRC_an) X X$(CATPAGE_s): $(MANSRC_s) X X X X# to test run it... X# Xtest: $(TARGET) X $(TARGET) $(RUNPARM) $(RUNOUT) X @echo "done with test" X X X# install target, manpage, and lib stuff... X# Xinstall: install_bin install_man install_tmac X @echo "install complete" X Xinstall_bin: $(TARGET) X $(INSTALL) $(TARGET) $(BINDIR)$S$(TARGET) X @echo "done installing $(TARGET)" X Xinstall_man: $(MANPAGE) $(MANPAGE_an) $(MANPAGE_s) X $(INSTALL) $(MANPAGE) $(MANDIR)$S$(MANPAGE) X $(INSTALL) $(MANPAGE_an) $(MANDIR_an)$S$(MANPAGE_an) X $(INSTALL) $(MANPAGE_s) $(MANDIR_s)$S$(MANPAGE_s) X @echo "done installing manpages" X Xinstall_tmac: X $(INSTALL) $(MAN_MACRO) $(TMACDIR)$S$(MAN_MACRO) X $(INSTALL) $(MS_MACRO) $(TMACDIR)$S$(MS_MACRO) X# $(INSTALL) $(ME_MACRO) $(TMACDIR)$S$(ME_MACRO) X @echo "done installing macro packages" X X X X# clean up... X# Xclean: X $(RM) $(OBJS) errs X Xclobber: X $(RM) $(OBJS) X $(RM) $(TARGET) X Xcleansrc: X $(RM) $(SRCS) $(HEADERS) X Xcleandocs: X $(RM) docs.arc readme bugs $(MANPAGE) $(MAN_MACRO) $(MS_MACRO) X X X X# various archives... X# Xuue: X $(UUENCODE) $(TARGET) X @echo done making $(UUEFILE) X Xshar: uue X $(SHAR) $(SHARFLG) $(OTHERS) >$(SHARF1) X $(SHAR) $(SHARFLG) $(SRCS1) >$(SHARF2) X $(SHAR) $(SHARFLG) $(SRCS2) >$(SHARF3) X $(SHAR) $(SHARFLG) $(HEADERS) >$(SHARF4) X $(SHAR) $(SHARFLG) $(UUEFILE) >$(SHARF5) X @echo done making $(SHARF1) $(SHARF2) $(SHARF3) $(SHARF4) $(SHARF5) X Xarc: X $(ARC) a $(ARCFILE) $(OTHERS) X $(ARC) a $(ARCFILE) $(HEADERS) X $(ARC) a $(ARCFILE) $(SRCS) X @echo done making $(ARCFILE) X X X X# the following actions i use while developing so i can save disk space. X X# use this to save space on disk X# Xbackup: objs.arc srcs.arc docs.arc X Xobjs.arc: X $(ARC) a objs.arc $(OBJS) $(TARGET) X @echo done making objs.arc. consider "make clean" X Xsrcs.arc: X $(ARC) a srcs.arc $(HEADERS) X $(ARC) a srcs.arc $(SRCS) X @echo done making srcs.arc. consider "make cleansrc" X Xdocs.arc: X $(ARC) a docs.arc readme bugs $(MANPAGE) $(MAN_MACRO) $(MS_MACRO) X @echo done making docs.arc. consider "make cleandocs" X X# use this to go back to work after "make backup" X# Xrestore: X $(ARC) x srcs.arc $(HEADERS) X $(ARC) x srcs.arc $(SRCS) X $(ARC) x docs.arc $(MANPAGE) $(MAN_MACRO) $(MS_MACRO) X $(ARC) x objs.arc $(OBJS) X $(ARC) x objs.arc $(TARGET) X @echo done with restore...ok to continue to hack X @echo be sure to setenv TMACDIR during testing X X X#---------------------------------------------------------------------------- X# X# DEPENDENCIES: X# X# note: nroff.h includes version.h and config.h. all sources include nroff.h X# and in addition, main.c includes config.h as well (first thing). X Xversion.h: patchlvl.h X touch version.h X Xnroff.h: version.h config.h X touch nroff.h X Xmain.$O: main.c nroff.h Xcommand.$O: command.c nroff.h Xtext.$O: text.c nroff.h Xio.$O: io.c nroff.h Xmacros.$O: macros.c nroff.h Xstrings.$O: strings.c nroff.h Xescape.$O: escape.c nroff.h Xlow.$O: low.c nroff.h X X# the end... END_OF_Makefile.tos if test 8118 -ne `wc -c POST.MNX <<'END_OF_POST.MNX' XThis is a new version of nroff(1), a text processor similar to Unix(tm) Xnroff, though not 100% compatible (not all the commands are available and Xthe macro packages here will not work with unix nroff, though the macro Xcommands in text files will). This is version 1.10 and was written on Xa 4 MB atari ST under TOS, not minix. I have NOT tested it under minix Xbecause I do not have minix operational on my "spare" ST (yet?). X XNOTE: there was a patch to 0.99 for the termcap stuff in main.c. Xunfortunately, i lost it in my last "career move" so you may need to Xfix this for terminal support for bold, italic, and/or standout modes. XIf you do, pls send me the patch (diff -c oldfile.c newfile.f is fine). X XI made the Makefile as compatible as I could for minix. The original X(TOS) makefile is also included. You _SHOULD_ just be able to say: X X % make all X Xand it will compile. I would suggest you look at the Makefile first Xbefore trying "make install". At least do "make -n install" to see what Xwould happen (assuming, of course, that minix make has a unix-like "-n" Xflag). X XThis version adds 2 things: 1) support (partial) for the ".if" command X(look at the tmac.* files to see how it can be used), and 2) a working Xthough hardly complete -ms (manuscript) package. I also added the ".mc" Xcommand to make changebars in documents possible. oh, i added the "-raN" Xcommand line switch (to preset a user number register). X XThis post is equivalent to TOS nroff, v1.10, patchlevel 3. v1.10 was Xposted to c.s.atari.st and c.b.atari.st up to patchlevel 2. pl 3 only Xmakes it possible to specify margin char location with the .mc command Xwhich is like 4-5 lines of code. This is what I am currently using Xas of this writing. X XI suggest you use the macro packages rather than raw nroff commands as Xthey may not always work as you would expect. vertical displacements Xare generally in "units" rather than inches though horizontal distances Xshould be ok with inches, though you will need floating point support. Xnroff does not yet support complicated things like: X X .in \nA+\n(.l/2 X Xjust single numbers (no arithmetic on args). use the existing macro Xpackages (tmac.an and tmac.s) and the test programs (in tests.uu) as Xa guide for using nroff or for writing/expanding macro packages. X XFutures: I eventually hope to finish the .if command (to accept block Xinput as in: X X .if something \{\ X ... X ... \} X Xand add support for .ie/.el (if/else) within the next few months. I'd Xalso like to add at least .wh traps and possibly diversions within X6 months, depending on what little free time I have. X XNote that there is a GNU troff on prep.ai.mit.edu (ftp access). I have XNOT ported that to minix since i seriously doubt it would fit. It would Xtake forever to run on my 8 Mhz ST anyway. My nroff is a single pass Xnroff while "real" nroff is at least 2 pass, I think, and though no Xspeed demon itself, this nroff is probably faster than what the full Xnroff would do on these tiny systems. X XAnyway, have fun. I use this all the time to write -ms and -man docs Xon my atari, then move them (without changes) to other unix systems X(currently convex). The -ms package has all the basics: TL,AU,AI,AB,AE, XSH,NH,PP,LP,QP,XP,RS,RE,IP(buggy),I,B,R which will easily let you make Xnice looking documents. Check the test cases in tests.uu (this is a Xuuencoded shar file). Note that there is no support for displays, keeps, Xfootnotes, tables, etc. in the -ms package. It is pretty basic. The -man Xpackage supports TH,SH,SS,PP,RS,RE,IP,I,B,IR,BR, etc. X XEnjoy... X X-Bill Rosenkranz Xrosenkra%c1yankee@convex.com X END_OF_POST.MNX if test 3574 -ne `wc -c README <<'END_OF_README' X------------------------------------ Xnroff (TOS, Minix) v1.10 7/22/90 wjr X------------------------------------ X XThis is an improved release of a version of nroff for both TOS and Unix X(Minix and BSD). It was written under TOS and 4BSD unix but has been Xreleased with Minix 1.5.5 as well. Unfortunately I have no access to Minix Xso I do not know if this particular version will work correctly under Minix. XIt does run under both SunOS and Convex, both BSD, so i feel pretty confident Xthat it should run under Minix. You will need to change the makefile Xregardless. I use Alcyon and my own cc(1). X XBesides small bug fixes, these are some new features since v0.99 (BETA): X X - added .if command which makes it possible to make a reasonable X ms package X X - fixed the bug where line filling on lines containing standout X would not fill properly X X - added a -ms package which is not half bad X X - enhanced the -man package X XMuch of this works. The things that (still) don't are all the hard things: Xdiversions, traps, conditionals, etc. See the man pages for what is not Xsupported (yet). Font switching, underlining, etc. are limited to reverse Xvideo on the screen (TOS). X XThere are decent man and ms packages included (tmac.an and tmac.s) which are Xnot perfect but then they are not half bad either. To make them better, nroff Xneeds diversions and traps, something that I will eventually do. They should Xhandle most common man tasks, though. They get installed in /usr/lib/tmac Xunder Minix and c:\lib\tmac under atari TOS, unless you change the location Xin nroff.h. For testing, you can X X % setenv TMACDIR . X % nroff -man file X Xto use tmac.an (say) in the cwd. X XFor porting info, look in config.h, nroff.h and the makefile. The termcap Xlibrary is used to get standout capabilites for doing bold and italics to Xthe screen (Minix and Unix). The TOS version has these hardwired to the Xvt52 escapes. Minix and BSD have termcap(3) and S5R3 has terminfo, which I Xbelieve also includes the tgetent/tgetnum/tgetflag/tgetstr functions for Xcompatibility. Note that the Sun /etc/termcap includes padding in some of Xthe definitions which I strip out. See main.c. X XIf you want to try and use nroff for printer output, the termcap library X(Minix and Unix only) looks for TERMCAP in your environment (a file) so Xthat you could do: X X % env TERMCAP=printer_termcap_file nroff -man file X Xand substitute your own file with "so" (standout) for your printer. This Xassumes your system has env, but you get the idea. X XThe program is small enough to work under Minix. It does not have a large Xstack, but does store all macros and strings in a common namespace. Look Xin nroff.h for the size. X XIf you do hack away, I would appreciate you sending me the changes so I can Xkeep this centralized. X XThe future holds increased capabilites, though I find it pretty useful Xas it is. Most man things are possible and you can do reports and resumes Xand such without much problem. See the example files included as well as Xthe manpage sources (nroff.man, man.man, ms.man) and the macro libraries X(tmac.an and tmac.s) for more help. Most people do not write macro libraries Xbut rather use the predefined macros (-man and -ms) which are supported Xpretty well at this point. X XThings to do include: X X - support for "block" if's, i.e. X X .if condition \{\ X ... X ... X ... \} X X - support for .ie/.el (if/else) X X - traps, diversions X X - vertical motions X X - two-character user number registers X X - tabs, leaders, and fields X X - hyphenation X X - environment switching X XIf anyone has a few spare minutes, maybe you could add these? Just kidding! X X XEnjoy... X X X-Bill Rosenkranz Xrosenkra%c1yankee@convex.com END_OF_README if test 3657 -ne `wc -c nroff.man <<'END_OF_nroff.man' X.\" nroff(1) manpage by rosenkra@convex.com (Bill Rosenkranz, 7/22/90) X.\" X.TH NROFF 1 X.SH NAME Xnroff - text processor (Version 1.10) X.SH SYNOPSIS Xnroff [options] file [...] X.SH DESCRIPTION XNroff is a text processor and formatter based on the design Xprovided in "Software Tools" by Kernighan and Plauger. XIt has been modified to closely resemble the Unix(tm) nroff command. XThe text and commands found in the file(s) Xare processed to generate formatted text. XNote that one (and only one) of the files can be "-" which reads Xinput from stdin at that point. XThe output always goes to stdout which can be redirected by the shell. X.\" Using the command line option -l will cause the output to X.\" be sent to the printer instead. XThe -o option lets you redirect error output to the specified Xfile rather than stderr. XDebugging information always goes to the file "nroff.dbg" and is Xgenerally used only for program development. X.SH OPTIONS XThe following command line options are available: X.IP -d XSet debug mode. X.IP -h XHold before exit (Atari TOS only). X.IP -m XProcess macro file tmac.. XThus -man would cause the file tmac.an to be loaded. XNote that files processed in this way should contain only macro definitions, Xno immediate output should be generated from this file (see ENVIRONMENT). X.IP -o XSet error log file (default is stderr). X.IP -raN XPreset number register 'a' (single character) to N (decimal integer only). X.IP -po XShift output right n spaces (like .po). X.IP -pn XInitial page number (like .pn). X.IP -v XPrints the version information to stdout. X.IP + XCauses output to start with page n. X.IP - XCauses output to stop after page n. X.IP - XInput from stdin. X.sp X.SH ENVIRONMENT XNroff recognizes the following environment variables from the shell: X.IP TMACDIR XAn alternate directory to find the files tmac.* ("." for example). XThe default is c:\\lib\\tmac under TOS and /usr/lib/tmac under XMinix or Unix(tm). X.IP TMPDIR XAn alternate directory to place any temporary files. XThe default is the current directory. XNote that nroff does not currently use any temporary files. X.SH COMMANDS XCommands typically are distinguished by a period in column one Xof the input Xfollowed by a two character abbreviation for the command funtion. XThe abbreviation may then be followed by an optional numeric or Xcharacter argument. XThe numeric argument may be an absolute value such as setting Xthe right margin to a particular column, or the argument may be Xpreceded by a plus sign or a minus sign to indicate that the Xparameter should be modified relative to a previous setting. XThe following commands are recognized (those marked "extension" Xare requests added to the basic set provided by Unix(tm) nroff): X.\" X.IP .ad XBegin line adjustment. XIf fill mode is not on, adjustment is defered until it is back on. XIf a type indicator is present, the adjustment type is changed as follows: X.nf X X Indicator Type X l adjust left margin only X r adjust right margin only X c center X b or n adjust both margins (default) X absent unchanged X.fi X.\" X.IP .af XAssign format to number register. XThe available formats are: X.nf X X Format Numbering Sequence X 1 0,1,2,3,4,... X 001 000,001,002,... X i 0,i,ii,iii,iv,v,... X I 0,I,II,III,IV,V,... X a 0,a,b,...,z,aa,ab,...zz,aaa,... X A 0,A,B,...,Z,AA,AB,...ZZ,AAA,... X X.fi XThe second format above indicates that the field width, i.e. number Xof digits, is specified by the number of digits in the format type. X.\" X.IP .bd XIgnored by nroff. X.\" X.IP .bo (extension) XCauses the following lines of text to appear in boldface. XThe optional argument specifies the number of lines to be typed in boldface. XBoldface and underlining are mutually exclusive features. XThe appearance of a boldface command will cause any underlining to cease. X.\" X.IP .bp (extension) XCauses succeeding text to appear at the top of a new page. XThe optional argument specifies the page number for the new page. XThe initial value is one and the default value is one more than Xthe previous page number. X.\" X.IP .br XCauses succeeding text to start on a new line at the current left margin. XThere is no numeric argument for this command. X.\" X.IP .bs (extension) XEnables or disables the appearance of backspaces in the output text. XUnderlining and boldface options are implemented by inserting Xcharacter - backspace - character combinations into the output buffer. XThis is fine for devices which properly recognize the backspace character. XSome printers, however, do not recognize backspaces, so the option is Xprovided to overprint one line buffer with another. XThe first line buffer is terminated with just a carriage return Xrather than the carriage return - linefeed combination. XA zero argument or no argument to the backspace command removes Xbackspaces from the output. XA non-zero argument leaves them in the output. XThe default is to remove backspaces. X.\" X.IP .cc XChanges the nroff command character to that specified by the Xcharacter argument. XIf no argument is provided, the default is a period (\.). X.\" X.IP .ce XCauses the next line of text to appear centered on the output. XThe optional argument specifies if more than one line is to be centered. X.\" X.IP .cs XIgnored by nroff. X.\" X.IP .cu XCauses the next line(s) of text to be continuously underlined. XUnlike the underline command (see \.ul) which underlines only Xalphanumerics, continuous underlining underlines all printable characters. XThe optional argument specifies the number of lines of text to underlined. XAny normal underlining or boldface commands currently in effect will be Xterminated. X.\" X.IP .c2 XChanges the nroff no break character to that specified by the Xcharacter argument. XIf no argument is provided, the default is a single quote. X.\" X.IP .de XCauses all text and commands following to be used to define a macro. XThe definition is terminated by a \.en command or the Xdefault \.\. terminator. XThe first two characters of the argument following the \.de Xcommand become the name of the new command. XIt should be noted that upper and lower case arguments are considered different. XThus, the commands \.PP and \.pp could define two different macros. XCare should be exercised since existing commands may be redefined. X.sp XA macro may contain up to nine arguments. XIn the macro definition, the placement of arguments is designated by the Xtwo character sequences, $1, $2, ... $9. XWhen the macro is invoked, each argument of the macro command line is Xsubstituted for its corresponding designator in the expansion. XThe first argument of the macro command is substituted for the $1 Xin the expansion, the second argument for the $2, and so forth. XArguments are typically strings which do not contain blanks or tabs. XIf an argument is to contain blanks, then it should be surrounded by Xeither single or double quotes. X.\" X.IP .ds XDefine a string. XTo initiate the string with a blank or include blanks Xin the string, start it with a single or double quite. XThe string Xcan contain other defined strings or number registers as well as normal Xtext. XStrings are stored on the macro name space. X.\" X.IP .ec XChanges the nroff escape character to that specified by the Xcharacter argument. XIf no argument is provided, the default is a backslash. X.\" X.IP .ef (extension) XSpecifies the text for the footer on even numbered pages. XThe format is the same as for the footer command (see \.fo). X.\" X.IP .eh (extension) XSpecifies the text for the header on even numbered pages. XThe format is the same as for the footer command (see \.fo). X.\" X.IP .en (extension) XDesignates the end of a macro definition. X.\" X.IP .eo XTurn the escape mechanism off. X.\" X.IP .ex XExit nroff at this point in the processing. XEx forces all files closed and flushes the output. X.\" X.IP .fi XCauses the input text to be rearranged or filled to obtain the maximum Xword count possible between the previously set left and right margins. XNo argument is expected. X.\" X.IP .fl XCauses the output buffer to be flushed immediately. X.\" X.IP .fo (extension) XSpecifies text to be used for a footer. XThe footer text contains three strings seperated by a delimiter character. XThe first non-blank character following the command is designated Xas the delimiter. XThe first text string is left justified to the current indentation Xvalue (specified by \.in). XThe second string is centered between the current indentation value Xand the current right margin value (specified by \.rm). XThe third string is right justified to the current right margin value. XThe absence of footer text will result in the footer being printed as Xone blank line. XThe presence of the page number character (set by \.pc) in the footer Xtext results in the current page number being inserted at that position. XMultiple occurrances of the page number character are allowed. X.\" X.IP .ft XChanges the current font. XThe choices are R (Times Roman), I (Times Italic), B (Times Bold), XS (math special), and P used to request the previous font. XP resets the next previous font to be the one just changed, amounting to a swap. X.\" X.IP .he (extension) XSpecifies text to be used for a header. XThe format is the same as for the footer (see \.fo). X.\" X.IP .if XExecute a command if the condition is true. XFormat is: X.nf X X .if c command X .if !c command X .if N command X .if !N command X .if "str1"str2" command X .if !"str1"str2" command X X.fi XHere c is a single letter: n (true if nroff), t (true if troff), e (true Xif even page), or o (true if odd page). XN is a numerical experssion and can include operators +, -, *, /, % (mod), X>, <, >=, <=, = (or ==), & (and), or : (or). XIf the result is greater than 0, the condition evaluates true. XNumbers in the expression can be either constants or contents of number Xregisters. XStrings are tested using delimeter / or " only at this time. XNote that "block" conditionals like: X.nf X X .if c \\{\\ X ... X ... X ... \\} X X.fi Xare not yet supported. XAlso the .ie/.el conditional is not yet supported. X.\" X.IP .in XIndents the left margin to the column value specified by the argument. XThe default left margin is set to zero. X.\" X.IP .ju (extension) XCauses blanks to be inserted between words in a line of Xoutput in order to align or justify the right margin. XThe default is to justify. X.\" X.IP .lg XIgnored by nroff. X.\" X.IP .ll XSets the current line length. XThe default is eighty. X.\" X.IP .ls XSets the line spacing to the value specified by the argument. XThe default is for single spacing. X.\" X.IP .lt XSet length of three-part titles. XLine length and title length Xare independent. XIndents do not apply to titles but page offsets do. X.\" X.IP .m1 (extension) XSpecifies the number of lines in the header margin. XThis is the space from the physical top of page to and including Xthe header text. XA value of zero causes the header to not be printed. XA value of one causes the header to appear at the physical top of page. XLarger argument values cause the appropriate number of blank Xlines to appear before the header is printed. X.\" X.IP .m2 (extension) XSpecifies the number of blank lines to be printed between Xthe header line and the first line of the processed text. X.\" X.IP .m3 (extension) XSpecifies the number of blank lines to be printed between Xthe last line of processed text and the footer line. X.\" X.IP .m4 (extension) XSpecifies the number of lines in the footer margin. XThis command affects the footer the same way the \.m1 Xcommand affects the header. X.\" X.IP .mc XMargin character. The first argument is the character to use, Xthe second is the distance to the right of the right margin Xto place the margin character. Useful for change bars. XNo arguments turns the capability off. Note that with this Xnroff, the margin character is always a single character only Xand this distance is prefered to be in inches (e.g. 0.2i). XThe default space is 0.2i (2 spaces). X.\" X.IP .na XNoadjust. XAjdustment is turned off; the right margin is ragged. XThe adjustment type for \.ad is not changed. XOutput line filling still occurs if fill mode is on. X.\" X.IP .ne XSpecifies a number of lines which should not be broken across a page boundary. XIf the number of lines remaining on a page is less than the Xvalue needed, then a new output page is started. X.\" X.IP .nf XSpecifies that succeeding text should be printed without Xrearrangement, or with no fill. XNo argument is expected. X.\" X.IP .nj (extension) XSpecifies that no attempt should be made to align or justify the right margin. XNo argument is expected. X.\" X.IP .nr XCauses the value of a number register to be set or modified. XA total of twenty-six number registers are available designated X\\na through \\nz (either upper or lower case is allowed). XWhen the sequence \\nc is imbedded in the text, the current value Xof number register c replaces the sequence, thus, such things as Xparagraph numbering can be accomplished with relative ease. X.\" X.IP .of (extension) XSpecifies the text for the footer on odd numbered pages. XThe format is the same as the footer command (see \.fo). X.\" X.IP .oh (extension) XSpecifies the text for the header on odd numbered pages. XThe format is the same as the footer command (see \.fo). X.\" X.IP .pc XSpecifies the page number character to be used in headers and footers. XThe occurrance of this character in the header or footer text Xresults in the current page number being printed. XThe default for this character is the percent sign (%). X.\" X.IP .pl XSpecifies the page length or the number of lines per output page. XThe default is sixty-six. X.\" X.IP .pm XPrint macros. XThe names and sizes of the macros are printed to stdout. XThis is useful when building a macro package to see how much of the Xtotal namespace is consumed by the package. X.\" X.IP .pn XChanges the page number of the current page and all Xsubsequent pages to its argument. XIf no argument is given, the command is ignored. X.\" X.IP .po XSpecifies a page offset value. XThis allows the formatted text to be shifted to the right by Xthe number of spaces specified. XThis feature may also be invoked by a switch on the command line. X.\" X.IP .ps XIgnored by nroff. X.\" X.IP .rr XRemoves a number register. X.\" X.IP .so XCauses input to be retrieved from the file specified Xby the command's character string argument. XThe contents of the new file are inserted into the output Xstream until an EOF is detected. XProcessing of the original file is then resumed. XCommand nesting is allowed. X.\" X.IP .sp XSpecifies a number of blank lines to be output before Xprinting the next line of text. X.\" X.IP .ss XIgnored by nroff. X.\" X.IP .ti XTemporarily alters the indentation or left margin value for a single Xsucceeding input line. X.\" X.IP .tl XSpecifies text to be used for a page title. XThe format is the same as for the header (see \.he). X.\" X.IP .ul XCauses the next line(s) of text to be underlined. XUnlike the \.cu command, this command causes only alphanumerics Xto be underlined, skipping punctuation and white space. XUnderline and boldface are mutually exclusive. X.PP XThe following nroff commands, normally available, are currently Xnot implemented in this version: X.cc + X\.fp, \.mk, \.rt, \.vs, \.sv, \.os, \.ns, \.rs, \.am, \.as, \.rm, \.rn, X\.di, \.da, \.wh, \.ch, \.dt, \.it, \.em, \.ta, \.tc, \.lc, \.fc, \.lg, X\.uf, \.tr, \.nh, \.hy, \.hc, \.hw, \.nm, \.nn, \.ie, \.el, \.ev, \.rd, X\.ex, \.nx, \.pi, \.tm, and \.ig. X+cc . X.\" X.SH ESCAPE SEQUENCES XEscape sequences are used to access special characters (such as Greek Xletters) which may be outside the normal printable ASCII character set. XThe are also used to toggle certain actions such as font selection. X.PP X.ne 5 XThe escape sequences include: X.sp X.eo X.\" .ec - X.nf X\\ backslash character X\e printable version of escape character X\' accute accent (equivalent to \\(aa) X\` grave accent (equivalent to \\(ga) X\- minus sign X\. period X\ a single, unpaddable space X\0 digit-width space X\| 1\6em space (zero space in nroff) X\^ 1\12em space (zero space in nroff) X\& non-printing zero-width character X\" beginning of comment X\% default hyphenation character X\(xx special character named xx X\*x,\*(xx interpolate string x or xx X\fc font change (c = R,I,B,S,P) X\nx interpolate number register x X\t horizontal tab X.fi X.sp X.ne 5 XThe Atari ST (TOS) version of nroff includes the following special Xcharacters. NOTE: THESE ARE NOT AVAILABLE UNDER Minix OR Unix(tm)! X.sp X.nf X\(co copyright X\(rg registered X\(tm trademark X\(12 1/2 X\(14 1/4 X\(p2 exponent 2 X\(p3 exponent 3 X\(pn exponent n X\(aa acute X\(ga grave X\(de degree X\(dg dagger X\(ct cent X\(bu bullet X\(pp paragraph X\(^g ring bell X\(ua up arrow X\(da dn arrow X\(-> rt arrow X\(<- lf arrow X\(di divide X\(sr sq root X\(== == X\(>= >= X\(<= <= X\(+- +- X\(~= ~= X\(ap approx X\(no not X\(mo memeber X\(ca intersect X\(cu union X\(*a alpha X\(*b beta X\(*g gamma X\(*d delta X\(*s sigma X\(*p pi X\(*m mu X.fi X.ec X.SH PREDEFINED GENERAL NUMBER REGISTERS XThe following number registers are available for both reading and writing. XThey are accessed with the \\n(xx and \\nx escape and can be set with .nr: X.nf X.ne 5 X X% current page number Xdw current day of the week (1-7) Xdy current day of the month (1-31) Xhh current hours (0-23) Xln current line number Xmm current minutes (0-59) Xmo current month (1-12) Xss current seconds (0-59) Xyr last 2 digits of current year X.fi X.sp XThe following number registers are available for reading only: X.nf X.cc + X X.$ number of args available in current macro X.A always 1 in nroff X.H available horizontal resolution X.T always 0 in nroff X.V available vertical resolution X.c number of lines read from current file X.f current font (1-4) X.i current indent X.l current line length X.o current page offset X.p current page length X.v current vertical spacing X+cc . X X.fi X.SH NOTES XThere are several missing features, notably diversions, traps, Xconditionals, all the hard stuff. XThis means you can't use some existing macro packages (yet, I hope). XThere is no complete -ms and -me packages as a result. XThe goal is to make this nroff work with all the SunOS macro packages Xsometime before Unix becomes obsolete! X.PP XIf you make additions to this code, please mail the changes to me so I Xcan make formal distributions. X.SH BUGS XUndoubtedly more than I know about. XHere are a few: X.PP XThe ability to perform numerical calculations on registers is not Ximplemented. X.PP XAll dimensional units are in em's or inches only. X.PP XLines with multiple string instances (i.e. \\*(xx) don't seem to work. X.PP XLines with font changes (e.g. for italics) use vt52 escape sequences Xto go to highlight mode. XThis should read termcap/terminfo to do it right. X.PP XSome interpolations don't work properly. X.PP XThe code uses statically allocated arrays for macros, strings, and registers. XThis should be changed to dynamically allocated buffers or Xwrite to intermediate files on small memory systems (i.e. Minix). X.SH FILES X.nf X.ec | X\lib\tmac\tmac.* predefined macros (see ENVIRONMENT) Xnroff.dbg debugging output Xstderr default error output stream Xstdout output stream X X.ec \ X.fi X.SH AUTHOR X.nf XAdapted for Atari ST (TOS) and Minix by Bill Rosenkranz 11/89 X Xnet: rosenkra@convex.com XCIS: 71460,17 XGENIE: W.ROSENKRANZ X XOriginal author: X XStephen L. Browning X5723 North Parker Avenue XIndianapolis, Indiana 46220 X X.fi X.SH HISTORY X.nf XOriginally written in BDS C (by Stephen L. Browning?) XAdapted for standard C by W. N. Paul XHeavily hacked up to conform to the "real" nroff with numerous Xadditions by Bill Rosenkranz 11/89 XBug fixes (termcap) and Minix 1.5.5 compatibility by XWim 'Blue Baron' van Dorst (wsincc@tuerc3.urc.tue.nl) X X.fi X X.SH RECOMMENDATIONS XI envisioned this rather limited version as a way of formatting Xman pages for my Atari ST system. XIt works just fine for that. XThe man macro package is certainly adequate for that purpose. XHowever, it would be nice to have more. XI suggest you limit Xyourself to things which would port easily to other environments. XAll the man macros available here should port without effort Xto a more complete Unix(tm) environment. X.PP XNroff as it stands can certainly be useful. XI recommend you don't Xuse the commands marked "extension". XStudy the source for the man pages here (nroff(1), ms(7), and man(7)) as Xwell as the macro packages (tmac.an and tmac.s) and the examples to find Xout the quirks. XSome things may not quite work like they do under Unix(tm), but it is Xfairly close for what is here. X.SH REFERENCES XThis document briefly describes the workings of nroff. XIt is certainly not the definitive work on text processing. XI suggest you go out and get a good book (there are several on the market) Xor refer to the Unix(tm) manuals for more help. XNroff is just like a compiler and is much more complicated than (say) the C Xlanguage which only has a handful of rules and is much more thoroughly Xdocumented. XGood luck! X.SH REQUEST SUMMARY XThe following table summarizes the nroff requests currently available: X.nf X.ne 8 X.cc + X XRequest Form Initial Default Notes Explanation X-------------- ------- ------- ------- ---------------------- XFont and Character Size Control X X.ps +-N 10pt prev E point size (ignored) X.ss N 12/36em ignored E space size (ignored) X.cs F N M off - P constant space mode (ign) X.bd F N off - P embolden font F (ignored) X.bd S F N off - P embolden special font X.ft F Roman prev E change to font F X X+ne 4 XPage Control X X.pl +-N 11in 11in v page length X.bp +-N N=1 - B,v eject page X.pn +-N N=1 ignored - next page number N X.po +-N 0 prev v page offset X.ne N - N=1V D,v need N vertical space X X+ne 4 XText Filling, Adjusting, and Centering X X.br - - B break X.fi fill - B,E fill mode X.nf fill - B,E no fill or adjust X.ad c adj,both adjust E adjust output, mode c X.na adjust - E no adjust X.ce N off N=1 B,E center N lines X X+ne 4 XVertical Spacing X X.ls N N=1 prev E output N-1 Vs X.sp N - N=1V B,v space vertical X X+ne 4 XLine Length and Indenting X X.ll +-N 6.5i prev E,m line length X.in +-N N=0 prev B,E,m indent X.ti +-N - ignored B,E,m temporary indent X X+ne 4 XMacros, Strings, Diversions, and Position Traps X X.de xx yy - .yy=.. - define macro xx X.ds xx str - ignored - define string xx X X+ne 4 XNumber Registers X X.nr R +-N M - u define and set num reg X.af R c arabic - - assign format to reg X.rr R - - - remove register X X+ne 4 XI/O Conventions and Character Translation X X.ec c \ \ - set escape char X.eo on - - turn off escape mech X.lg N - - - ligature mode (ignored) X.ul N off N=1 E underline N lines X.cu N off N=1 E cont. underline X.cc c . . E set control char X.c2 c ' ' E set nobreak control char X X+ne 4 XThree-part Titles X X.tl 'l'c'r' - - three-part title X.pc c % off - page number char X.lt +-N 6.5in prev E,m length of title X X+ne 4 XConditional Acceptence of Input X X.if c cmd - - if c true, accept cmd X.if !c cmd - - if c false, accept cmd X.if N cmd - - if N > 0, accept cmd X.if !N cmd - - if N <= 0, accept cmd X.if "s1"s2" cmd - - if strings same, accept cmd X.if !"s1"s2" cmd - - if strings differ, accept cmd X X+ne 4 XInput/Output File Switching X X.so filename - - switch source file X X+ne 4 XMiscellaneous X X.mc c N - off E,m margin char c, seperation N X.pm t - all - print macro names X.fl - - B flush output buffer X X+ne 4 XNotes X XB causes a break XD mode or parameters associated with current diversion level XE relevant parameters are a part of the current environment XO must stay in effect until logical output XP mode must be still or again in effect at time of physical output Xv,p,m,u default scale indicators X X+cc X.fi END_OF_nroff.man if test 25302 -ne `wc -c