From 998b53c1c9e9941ecb9b2f025d3c1bf2b4a9256e Mon Sep 17 00:00:00 2001 From: gdr Date: Thu, 30 Oct 1997 04:04:35 +0000 Subject: [PATCH] modified for inclusion into GNO base build --- usr.bin/nroff/ChangeLog | 6 ++- usr.bin/nroff/Makefile | 50 ++++++++++++++++++++ usr.bin/nroff/{makefile.mk => Makefile.unix} | 2 +- usr.bin/nroff/README | 9 ++-- usr.bin/nroff/macros.c | 7 ++- usr.bin/nroff/man.7 | 4 +- usr.bin/nroff/ms.7 | 2 +- usr.bin/nroff/nroff.1 | 17 ++++--- usr.bin/nroff/nroff.c | 13 +++-- usr.bin/nroff/nroff.desc | 8 ++-- usr.bin/nroff/nroff.rez | 8 ++-- 11 files changed, 96 insertions(+), 30 deletions(-) create mode 100644 usr.bin/nroff/Makefile rename usr.bin/nroff/{makefile.mk => Makefile.unix} (97%) diff --git a/usr.bin/nroff/ChangeLog b/usr.bin/nroff/ChangeLog index 31156d5..4c0424e 100644 --- a/usr.bin/nroff/ChangeLog +++ b/usr.bin/nroff/ChangeLog @@ -1,7 +1,11 @@ CHANGES ------- -1.2 (18 March 97) +1.2.1 (19 October 1997) + - Incorporated nroff into the GNO base source tree. + - Renamed main.c to nroff.c, to simplify the makefile. + +1.2 (18 March 1997) - Maintenance of nroff has been taken over by Devin Reade, - Fixed a significant number of memory trashing bugs. Most of diff --git a/usr.bin/nroff/Makefile b/usr.bin/nroff/Makefile new file mode 100644 index 0000000..7f69b33 --- /dev/null +++ b/usr.bin/nroff/Makefile @@ -0,0 +1,50 @@ +# +# $Id: Makefile,v 1.1 1997/10/30 04:04:34 gdr Exp $ +# + +# Program name +PROG = nroff +SRCS = nroff.c command.c escape.c io.c low.c macros.c strings.c text.c + +# Add -D__STACK_CHECK__ to print, on exit, the amount of stack used +CFLAGS += +STACK = 6144 +# We need stack checking for now; recursion is involved. +DEBUG = 1 +BINDIR = /usr/bin +TMACDIR = /usr/lib/tmac +LDLIBS = -l/lib/ltermcap + +# Don't use the default 'release' and 'install' target. +CUSTOM_RELEASE = true + +.INCLUDE: /src/gno/prog.mk + +RELTMAC = $(RELEASE_DIR)$(TMACDIR) + +release: $(PROG) tmac.an tmac.s nroff.1 man.7 ms.7 + $(INSTALL) -d $(RELBIN) $(RELTMAC) $(RELMAN)/man1 $(RELMAN)/man7 + $(INSTALL) -m755 nroff $(RELBIN) + $(INSTALL) -m644 tmac.an tmac.s $(RELTMAC) + $(INSTALL) -m644 nroff.1 $(RELMAN)/man1 + $(INSTALL) -m644 man.7 ms.7 $(RELMAN)/man7 + +install: $(PROG) tmac.an tmac.s nroff.1 man.7 ms.7 + $(INSTALL) -d $(BINDIR) $(TMACDIR) $(MANDIR)/man1 $(MANDIR)/man7 + $(INSTALL) -m755 nroff $(BINDIR) + $(INSTALL) -m644 tmac.an tmac.s $(TMACDIR) + $(INSTALL) -m644 nroff.1 $(MANDIR)/man1 + $(INSTALL) -m644 man.7 ms.7 $(MANDIR)/man7 + +# +# additional dependancies +# +command.o:: $(SUNOS_H) nroff.h config.h +escape.o:: $(SUNOS_H) nroff.h config.h +io.o:: $(SUNOS_H) nroff.h config.h macros.h io.h +low.o:: $(SUNOS_H) nroff.h config.h +macros.o:: $(SUNOS_H) nroff.h config.h macros.h +main.o:: $(SUNOS_H) nroff.h config.h macros.h +strings.o:: $(SUNOS_H) nroff.h config.h +text.o:: $(SUNOS_H) nroff.h config.h io.h + diff --git a/usr.bin/nroff/makefile.mk b/usr.bin/nroff/Makefile.unix similarity index 97% rename from usr.bin/nroff/makefile.mk rename to usr.bin/nroff/Makefile.unix index 2fc9a52..0b78ff1 100644 --- a/usr.bin/nroff/makefile.mk +++ b/usr.bin/nroff/Makefile.unix @@ -1,7 +1,7 @@ # # Makefile for nroff(1). # -# $Id: makefile.mk,v 1.2 1997/03/20 06:40:50 gdr Exp $ +# $Id: Makefile.unix,v 1.1 1997/10/30 04:04:34 gdr Exp $ # IIGS = TRUE # TRUE or FALSE diff --git a/usr.bin/nroff/README b/usr.bin/nroff/README index 3976d49..0a5f62e 100644 --- a/usr.bin/nroff/README +++ b/usr.bin/nroff/README @@ -1,9 +1,9 @@ nroff - Text Processing Typesetter ---------------------------------- - This is 'nroff 1.2' for GNO/ME 1.0. This is fairly close to - the real Unix nroff, although there are still some things that - this one doesn't do that it should. + This is nroff for GNO. This is fairly close to the real UNIX + nroff, although there are still some things that this one doesn't + do that it should. This software was ported by Mike Horwath and Jawaid Bazyar for the GNO Multitasking Environment. Various bug fixes were applied @@ -22,6 +22,9 @@ Installation man.7 --> /usr/man/man7/man.7 ms.7 --> /usr/man/man7/ms.7 + Check to see that you don't still have /bin/nroff installed. + If you do, delete it. + If you want to put the macro files somewhere other than in /usr/lib/tmac, then set your TMACDIR environment variable to point to the directory in which they reside. diff --git a/usr.bin/nroff/macros.c b/usr.bin/nroff/macros.c index bf6aa46..688140c 100644 --- a/usr.bin/nroff/macros.c +++ b/usr.bin/nroff/macros.c @@ -19,7 +19,7 @@ * - Heavily hacked up to conform to "real" nroff by Bill Rosenkranz * - Heavily modified by Devin Reade to avoid memory trashing bugs. * - * $Id: macros.c,v 1.2 1997/03/20 06:40:50 gdr Exp $ + * $Id: macros.c,v 1.3 1997/10/30 04:04:34 gdr Exp $ */ #ifdef __ORCAC__ @@ -31,7 +31,12 @@ segment "macros____"; #include #include #include + +#ifdef __GNO__ +#include +#else #include "unix/err.h" +#endif #ifdef sparc #include "unix/sunos.h" diff --git a/usr.bin/nroff/man.7 b/usr.bin/nroff/man.7 index c88216f..7b011b8 100644 --- a/usr.bin/nroff/man.7 +++ b/usr.bin/nroff/man.7 @@ -1,9 +1,9 @@ .\" man(7) manpage by rosenkra@convex.com (Bill Rosenkranz, 7/22/90) .\" modifications by Devin Reade, 18 March 97 .\" -.\" $Id: man.7,v 1.2 1997/03/20 06:40:50 gdr Exp $ +.\" $Id: man.7,v 1.3 1997/10/30 04:04:34 gdr Exp $ .\" -.TH MAN 7 "18 March 1997" +.TH MAN 7 "19 October 1997" .SH NAME man - nroff macro package for manual pages .SH SYNOPSIS diff --git a/usr.bin/nroff/ms.7 b/usr.bin/nroff/ms.7 index 0c5f658..a9c84b0 100644 --- a/usr.bin/nroff/ms.7 +++ b/usr.bin/nroff/ms.7 @@ -1,6 +1,6 @@ .\" ms(7) manpage by rosenkra@convex.com (Bill Rosenkranz, 7/22/90) .\" -.TH MS 7 +.TH MS 7 "19 October 1997" .SH NAME ms - text formatting macros .SH SYNOPSIS diff --git a/usr.bin/nroff/nroff.1 b/usr.bin/nroff/nroff.1 index b3479dd..d506936 100644 --- a/usr.bin/nroff/nroff.1 +++ b/usr.bin/nroff/nroff.1 @@ -1,9 +1,9 @@ .\" nroff(1) manpage by rosenkra@convex.com (Bill Rosenkranz, 7/22/90) .\" modifications by Devin Reade, 18 March 97 .\" -.\" $Id: nroff.1,v 1.2 1997/03/20 06:40:51 gdr Exp $ +.\" $Id: nroff.1,v 1.3 1997/10/30 04:04:34 gdr Exp $ .\" -.TH NROFF 1 "18 March 1997" +.TH NROFF 1 "19 October 1997" .SH NAME nroff - text processing typesetter .SH SYNOPSIS @@ -674,16 +674,21 @@ Indianapolis, Indiana 46220 .fi .SH HISTORY -.nf Originally written in BDS C (by Stephen L. Browning?) +.br Adapted for standard C by W. N. Paul +.br Heavily hacked up to conform to the "real" nroff with numerous additions by Bill Rosenkranz 11/89 +.br Bug fixes (termcap) and Minix 1.5.5 compatibility by Wim 'Blue Baron' van Dorst (wsincc@tuerc3.urc.tue.nl) - -.fi - +.br +Modified for GNO v2.0.6 by Devin Reade. +.SH VERSION +This manual page documents +.BR nroff +version 1.2.1. .SH RECOMMENDATIONS I envisioned this rather limited version as a way of formatting man pages for my Atari ST system. diff --git a/usr.bin/nroff/nroff.c b/usr.bin/nroff/nroff.c index a27ce8e..aea5883 100644 --- a/usr.bin/nroff/nroff.c +++ b/usr.bin/nroff/nroff.c @@ -22,12 +22,11 @@ * - Heavily hacked up to conform to "real" nroff by Bill Rosenkranz * - Heavily modified by Devin Reade to avoid memory trashing bugs. * - * $Id: nroff.c,v 1.2 1997/03/20 06:40:50 gdr Exp $ + * $Id: nroff.c,v 1.3 1997/10/30 04:04:35 gdr Exp $ */ #ifdef __ORCAC__ segment "main______"; -#pragma stacksize 6144 #pragma optimize 79 #endif @@ -107,9 +106,9 @@ static char *version = "(GNO) v1.2, 5 Mar 97 gdr"; * *************************************************************************/ -#ifdef CHECK_STACK +#ifdef __STACK_CHECK__ static void -stackCleanup (void) { +printStack (void) { fprintf(stderr, "stack usage: %d bytes\n", _endStackCheck()); } #endif @@ -126,9 +125,9 @@ main (int argc, char *argv[]) { char *ps; #ifdef __GNO__ -#ifdef CHECK_STACK +#ifdef __STACK_CHECK__ _beginStackCheck(); - atexit(stackCleanup); + atexit(printStack); #endif if (argc > 0) { progname = __prognameGS(); @@ -991,7 +990,7 @@ processFile (void) { } } -#pragma optimize 8 +#pragma optimize 78 #pragma debug 0 void diff --git a/usr.bin/nroff/nroff.desc b/usr.bin/nroff/nroff.desc index 78b6d7e..4a63c13 100644 --- a/usr.bin/nroff/nroff.desc +++ b/usr.bin/nroff/nroff.desc @@ -1,9 +1,9 @@ Name: nroff -Version: 1.2 (18 Mar 97) -Shell: GNO/ME +Version: 1.2.1 (19 Oct 97) +Shell: GNO Author: Various. Maintained by Devin Reade. -Contact: gdr@myrias.com +Contact: gdr@eddore.myrias.com Where: /usr/bin -FTP: apple2.caltech.edu, ground.isca.uiowa.edu +FTP: apple2.caltech.edu, ground.isca.uiowa.edu, trenco.myrias.com Text Processing Typesetter diff --git a/usr.bin/nroff/nroff.rez b/usr.bin/nroff/nroff.rez index 8d05a8d..4a3bee3 100644 --- a/usr.bin/nroff/nroff.rez +++ b/usr.bin/nroff/nroff.rez @@ -1,18 +1,18 @@ /* - * $Id: nroff.rez,v 1.1 1997/03/14 06:22:29 gdr Exp $ + * $Id: nroff.rez,v 1.2 1997/10/30 04:04:35 gdr Exp $ */ #include "Types.Rez" resource rVersion (0x1, purgeable3, nocrossbank) { - { 1, 2, 0, /* version 1.2.0 */ + { 1, 2, 1, /* version */ release, /* development|alpha|beta|final|release */ 0 /* non-final release number */ }, - verBritain, /* close enough */ + verUS, "nroff", "Text Processing Typesetter\n" - "Devin Reade \n" + "Devin Reade \n" "Canada" };