Cawf is a nroff-like text formatter. Cawf provides a usable subset

of raw nroff capabilities and the styles of the man, me(7), and
ms(7) macro sets.  New macro files can be added.  And it has some
rudimentary output device support via a device configuration file
(and new devices can be added).

I need help improving -man macro and making mandoc ...
This commit is contained in:
Jeremy C. Reed 2003-07-02 23:02:05 +00:00
parent c174f818f7
commit fcd75ed181
6 changed files with 113 additions and 0 deletions

11
cawf/DESCR Normal file
View file

@ -0,0 +1,11 @@
Cawf is a nroff-like text formatter. Cawf provides a usable subset
of raw nroff capabilities and the styles of the man, me(7), and
ms(7) macro sets. New macro files can be added. And it has some
rudimentary output device support via a device configuration file
(and new devices can be added).
Written by Vic Abell, Cawf is a C version of awf, Henry Spencer's
Amazingly Workable (text) Formatter.
This package also includes a companion output filter, bsfilt(1),
which is a colcrt-like backspace filter.

41
cawf/Makefile Normal file
View file

@ -0,0 +1,41 @@
# $NetBSD: Makefile,v 1.1.1.1 2003/07/02 23:02:05 jeremy-c-reed Exp $
DISTNAME= cawf
PKGNAME= cawf-4.10
WRKSRC= ${WRKDIR}
CATEGORIES= textproc
MASTER_SITES= ftp://vic.cc.purdue.edu/pub/
MASTER_SITES+= http://www.tux.org/pub/sites/vic.cc.purdue.edu/
EXTRACT_SUFX= .zip
MAINTAINER= reed@reedmedia.net
HOMEPAGE= ftp://vic.cc.purdue.edu/pub/cawf.README
COMMENT= nroff-like text formatter
CAWFLIB= ${PREFIX}/share/cawf
PLIST_SUBST+= CAWFLIB=share/cawf
BUILD_DEFS+= CAWFLIB
MAKE_FLAGS+= CAWFLIB=${CAWFLIB}
post-extract:
${MV} ${WRKSRC}/cawf.1 ${WRKSRC}/cawf.1.orig &&
${SED} -e "s|/Homes/abe/lib/cawf|${CAWFLIB}|g" \
< ${WRKSRC}/cawf.1.orig > ${WRKSRC}/cawf.1
do-install:
${INSTALL_DATA_DIR} ${CAWFLIB}
${INSTALL_DATA} ${WRKSRC}/common ${CAWFLIB}
${INSTALL_DATA} ${WRKSRC}/device.cf ${CAWFLIB}
${INSTALL_DATA} ${WRKSRC}/dumb.dev ${CAWFLIB}
${INSTALL_DATA} ${WRKSRC}/man.mac ${CAWFLIB}
${INSTALL_DATA} ${WRKSRC}/me.mac ${CAWFLIB}
${INSTALL_DATA} ${WRKSRC}/ms.mac ${CAWFLIB}
${INSTALL_PROGRAM} ${WRKSRC}/cawf ${PREFIX}/bin/
${INSTALL_PROGRAM} ${WRKSRC}/bsfilt ${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/cawf.1 ${PREFIX}/man/man1/cawf.1
${INSTALL_MAN} ${WRKSRC}/bsfilt.1 ${PREFIX}/man/man1/bsfilt.1
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/cawf
${INSTALL_DATA} ${WRKSRC}/00readme ${PREFIX}/share/doc/cawf/README
${INSTALL_DATA} ${WRKSRC}/00diffs ${PREFIX}/share/doc/cawf/roff-differences.txt
.include "../../mk/bsd.pkg.mk"

15
cawf/PLIST Normal file
View file

@ -0,0 +1,15 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2003/07/02 23:02:05 jeremy-c-reed Exp $
bin/bsfilt
bin/cawf
${CAWFLIB}/common
${CAWFLIB}/device.cf
${CAWFLIB}/dumb.dev
${CAWFLIB}/man.mac
${CAWFLIB}/me.mac
${CAWFLIB}/ms.mac
man/man1/bsfilt.1
man/man1/cawf.1
share/doc/cawf/README
share/doc/cawf/roff-differences.txt
@dirrm ${CAWFLIB}
@dirrm share/doc/cawf

16
cawf/TODO Normal file
View file

@ -0,0 +1,16 @@
Is there a make variable expansion for removing like:
CAWFLIB=${CAWFLIB:S/${PREFIX}\///}
(for the PLIST)
The macros need a lot of help to be able to support
NetBSD's -mdoc and even -man. I started working on a
new -mandoc but didn't include with this.
This uses its own getopt and regexp. Probably should
attempt to use the operating system's own.
man.mac needs to be a lot smarter, for example
.ds CH "Unix Programmer's Manual
should be set depending on section number,
like if 9 then: Kernel Manual
and Unix replaced with operating system name

5
cawf/distinfo Normal file
View file

@ -0,0 +1,5 @@
$NetBSD: distinfo,v 1.1.1.1 2003/07/02 23:02:05 jeremy-c-reed Exp $
SHA1 (cawf.zip) = c16985f79c5d9b11de62dff6ed24d210ca12eb40
Size (cawf.zip) = 287677 bytes
SHA1 (patch-aa) = d6568d61fe127c36b5a3d3615d39e27235d70c03

25
cawf/patches/patch-aa Normal file
View file

@ -0,0 +1,25 @@
$NetBSD: patch-aa,v 1.1.1.1 2003/07/02 23:02:05 jeremy-c-reed Exp $
--- Makefile.orig Sat Feb 22 09:26:18 1997
+++ Makefile
@@ -14,7 +14,7 @@
#
# Redefine CAWFLIB by adding -DCAWFLIB=\"...\" to DEFS.
#
-#DEFS = -DUNIX -DUSG -DCAWFLIB=\"/usr/local/lib/cawf\"
+DEFS = -DUNIX -DUSG -DSTDLIB -DCAWFLIB=\"${CAWFLIB}\"
#
# Customize the install rule.
#
@@ -34,9 +34,9 @@
#
#DEFS = -DUNIX -DMALLOCH
-DEFS = -DUNIX -DSTDLIB -D_NEXT_SOURCE -ansi -pedantic
+#DEFS = -DUNIX -DSTDLIB -D_NEXT_SOURCE -ansi -pedantic
-CFLAGS = -O ${DEFS}
+CFLAGS += ${DEFS}
HDR = ansi.h cawf.h cawflib.h proto.h regexp.h regmagic.h