Update to version 98.10.20.

PR:		8530
Reviewed by:	maintainer
Submitted by:	Pedro F. Giffuni <pfgiffun@bachue.usc.unal.edu.co>
This commit is contained in:
Steve Price 1998-11-10 02:05:13 +00:00
parent 6db901ce31
commit ca1e19a2f5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=14438
6 changed files with 192 additions and 30 deletions

View file

@ -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>

View file

@ -1 +1 @@
MD5 (awk.tar.gz) = 6a55811b417b489d6ce0a10cd1e9ab06
MD5 (awktar.gz) = 5ce5f5aa2d1d5232afb9108c7445f3fe

View file

@ -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

147
lang/nawk/files/patch-ba Normal file
View file

@ -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') {

View file

@ -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>

View file

@ -1 +1 @@
bin/kawk
bin/nawk