diff options
author | steve <steve@FreeBSD.org> | 1998-11-10 02:05:13 +0000 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1998-11-10 02:05:13 +0000 |
commit | 6616ea1c5b12426d3b17d34ea5b15a7ef5e09451 (patch) | |
tree | 1912d8f20d20093aeebfddfa8f8ef18cd1146834 /lang/nawk | |
parent | 455db2701f1af1f78ef29812a88d891604a446ec (diff) | |
download | FreeBSD-ports-6616ea1c5b12426d3b17d34ea5b15a7ef5e09451.zip FreeBSD-ports-6616ea1c5b12426d3b17d34ea5b15a7ef5e09451.tar.gz |
Update to version 98.10.20.
PR: 8530
Reviewed by: maintainer
Submitted by: Pedro F. Giffuni <pfgiffun@bachue.usc.unal.edu.co>
Diffstat (limited to 'lang/nawk')
-rw-r--r-- | lang/nawk/Makefile | 13 | ||||
-rw-r--r-- | lang/nawk/distinfo | 2 | ||||
-rw-r--r-- | lang/nawk/files/patch-aa | 49 | ||||
-rw-r--r-- | lang/nawk/files/patch-ba | 147 | ||||
-rw-r--r-- | lang/nawk/pkg-descr | 9 | ||||
-rw-r--r-- | lang/nawk/pkg-plist | 2 |
6 files changed, 192 insertions, 30 deletions
diff --git a/lang/nawk/Makefile b/lang/nawk/Makefile index 8bb5b0a..7e22209 100644 --- a/lang/nawk/Makefile +++ b/lang/nawk/Makefile @@ -1,25 +1,26 @@ -# New ports collection makefile for: kawk +# New ports collection makefile for: nawk # Version required: 98.02.11 # Date created: 29 April 1998 # Whom: Josh Gilliam <josh@quick.net> # -# $Id$ +# $Id: Makefile,v 1.1.1.1 1998/07/04 19:21:55 steve Exp $ # DISTNAME= awk -PKGNAME= kawk-98.02.11 +PKGNAME= nawk-98.10.20 CATEGORIES= lang MASTER_SITES= http://cm.bell-labs.com/who/bwk/ +EXTRACT_SUFX= tar.gz MAINTAINER= josh@quick.net NO_WRKSUBDIR= yes MAKEFILE= makefile ALL_TARGET= a.out -MAN1= kawk.1 +MAN1= nawk.1 do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/a.out ${PREFIX}/bin/kawk - ${INSTALL_MAN} ${WRKSRC}/awk.1 ${PREFIX}/man/man1/kawk.1 + ${INSTALL_PROGRAM} ${WRKSRC}/a.out ${PREFIX}/bin/nawk + ${INSTALL_MAN} ${WRKSRC}/awk.1 ${PREFIX}/man/man1/nawk.1 .include <bsd.port.mk> diff --git a/lang/nawk/distinfo b/lang/nawk/distinfo index bbb8135..ab73a2a 100644 --- a/lang/nawk/distinfo +++ b/lang/nawk/distinfo @@ -1 +1 @@ -MD5 (awk.tar.gz) = 6a55811b417b489d6ce0a10cd1e9ab06 +MD5 (awktar.gz) = 5ce5f5aa2d1d5232afb9108c7445f3fe diff --git a/lang/nawk/files/patch-aa b/lang/nawk/files/patch-aa index d4615cf..d937fad 100644 --- a/lang/nawk/files/patch-aa +++ b/lang/nawk/files/patch-aa @@ -1,18 +1,31 @@ ---- makefile.orig Sat Aug 16 05:52:46 1997 -+++ makefile Wed Apr 29 13:52:20 1998 -@@ -22,13 +22,9 @@ - # THIS SOFTWARE. - # ****************************************************************/ - --CFLAGS = -g --CFLAGS = -O --CC = purify cc --CC = gcc -Wall -g --CC = cc -+CFLAGS ?= ${CFLAGS} -+CC ?= ${CC} - --YACC = bison -y - YACC = yacc - YFLAGS = -d - +*** makefile.orig Tue Oct 20 08:48:03 1998 +--- makefile Sun Nov 1 16:32:49 1998 +*************** +*** 22,34 **** + # THIS SOFTWARE. + # ****************************************************************/ + +! CFLAGS = -g +! CFLAGS = -O +! CC = gcc -Wall -g +! CC = purify cc +! CC = cc + +! YACC = bison -y + YACC = yacc + YFLAGS = -d + +--- 22,34 ---- + # THIS SOFTWARE. + # ****************************************************************/ + +! CFLAGS ?= ${CFLAGS} +! #CFLAGS = -O +! #CC = gcc -Wall -g +! #CC = purify cc +! CC ?= ${CC} + +! #YACC = bison -y + YACC = yacc + YFLAGS = -d + diff --git a/lang/nawk/files/patch-ba b/lang/nawk/files/patch-ba new file mode 100644 index 0000000..6682e09 --- /dev/null +++ b/lang/nawk/files/patch-ba @@ -0,0 +1,147 @@ +*** b.c.orig Sun Nov 1 17:14:22 1998 +--- b.c Sun Nov 1 17:23:00 1998 +*************** +*** 27,32 **** +--- 27,35 ---- + #define DEBUG + + #include <ctype.h> ++ #ifdef __FreeBSD__ ++ #include <limits.h> ++ #endif + #include <stdio.h> + #include <string.h> + #include <stdlib.h> +*************** +*** 74,79 **** +--- 77,100 ---- + fa *fatab[NFA]; + int nfatab = 0; /* entries in fatab */ + ++ #ifdef __FreeBSD__ ++ static int ++ collate_range_cmp(a, b) ++ int a, b; ++ { ++ int r; ++ static char s[2][2]; ++ ++ if ((unsigned char)a == (unsigned char)b) ++ return 0; ++ s[0][0] = a; ++ s[1][0] = b; ++ if ((r = strcoll(s[0], s[1])) == 0) ++ r = (unsigned char)a - (unsigned char)b; ++ return r; ++ } ++ #endif ++ + fa *makedfa(char *s, int anchor) /* returns dfa for reg expr s */ + { + int i, use, nuse; +*************** +*** 284,289 **** +--- 305,313 ---- + char *cclenter(char *p) /* add a character class */ + { + int i, c, c2; ++ #ifdef __FreeBSD__ ++ int c3; ++ #endif + char *op, *bp; + static char *buf = 0; + static int bufsz = 100; +*************** +*** 301,306 **** +--- 325,347 ---- + c2 = *p++; + if (c2 == '\\') + c2 = quoted(&p); ++ #ifdef __FreeBSD__ ++ if (collate_range_cmp(c, c2) > 0) { ++ bp--; ++ i--; ++ continue; ++ } ++ for (c3 = 0; c3 < (1 << CHAR_BIT) - 1; c3++) { ++ if (collate_range_cmp(c, c3) <= 0 && ++ collate_range_cmp(c3, c2) <= 0) { ++ if (!adjbuf(&buf, &bufsz, bp-buf+2, 100, &bp, 0)) ++ ERROR "out of space for character class [%.10s...] 2", p FATAL; ++ *bp++ = c3 + 1; ++ i++; ++ } ++ } ++ #else ++ if (c > c2) { /* empty; ignore */ + if (c > c2) { /* empty; ignore */ + bp--; + i--; +*************** +*** 312,317 **** +--- 353,359 ---- + *bp++ = ++c; + i++; + } ++ #endif + continue; + } + } +*** main.c.orig Sun Nov 1 17:24:32 1998 +--- main.c Sun Nov 1 17:28:40 1998 +*************** +*** 27,38 **** +--- 27,43 ---- + #define DEBUG + #include <stdio.h> + #include <ctype.h> ++ #include <locale.h> + #include <stdlib.h> + #include <string.h> + #include <signal.h> + #include "awk.h" + #include "ytab.h" + ++ #ifdef __FreeBSD__ ++ # include <floatingpoint.h> ++ #endif ++ + extern char **environ; + extern int nfields; + +*************** +*** 55,66 **** + char *fs = NULL, *marg; + int temp; + +! cmdname = argv[0]; + if (argc == 1) { + fprintf(stderr, "Usage: %s [-f programfile | 'program'] [-Ffieldsep] [-v var=value] [files]\n", cmdname); + exit(1); + } + signal(SIGFPE, fpecatch); + yyin = NULL; + symtab = makesymtab(NSYMTAB); + while (argc > 1 && argv[1][0] == '-' && argv[1][1] != '\0') { +--- 60,80 ---- + char *fs = NULL, *marg; + int temp; + +! setlocale(LC_ALL, ""); +! +! if ((cmdname = strrchr(argv[0], '/')) != NULL) +! cmdname++; +! else +! cmdname = argv[0]; + if (argc == 1) { + fprintf(stderr, "Usage: %s [-f programfile | 'program'] [-Ffieldsep] [-v var=value] [files]\n", cmdname); + exit(1); + } + signal(SIGFPE, fpecatch); ++ #ifdef __FreeBSD__ ++ fpsetround(FP_RN); ++ fpsetmask(0L); ++ #endif + yyin = NULL; + symtab = makesymtab(NSYMTAB); + while (argc > 1 && argv[1][0] == '-' && argv[1][1] != '\0') { diff --git a/lang/nawk/pkg-descr b/lang/nawk/pkg-descr index 990b2b4..a2f84fc 100644 --- a/lang/nawk/pkg-descr +++ b/lang/nawk/pkg-descr @@ -1,8 +1,9 @@ -This is Brian Kernighan's awk, which is "the one true awk". -Awk scans input files for specified patterns and can perform -an associated action when a line of the file matches the -pattern. +This is the version of awk described in "The AWK Programming Language", +by Al Aho, Brian Kernighan, and Peter Weinberger +(Addison-Wesley, 1988, ISBN 0-201-07981-X). +Awk scans input files for specified patterns and can perform an associated +action when a line of the file matches the pattern. -- Josh Gilliam <josh@quick.net> diff --git a/lang/nawk/pkg-plist b/lang/nawk/pkg-plist index b20e574..d29730e 100644 --- a/lang/nawk/pkg-plist +++ b/lang/nawk/pkg-plist @@ -1 +1 @@ -bin/kawk +bin/nawk |