Update to the 29-Nov-2002 distribution.

Since the distfile isn't versioned, this was the only way to fix the
"make distclean all" problem on 5-CURRENT.

Approved by:	kris
This commit is contained in:
David E. O'Brien 2002-12-12 23:31:51 +00:00
parent 1ba8985302
commit c855adcfd5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=71584
4 changed files with 16 additions and 100 deletions

View file

@ -7,7 +7,7 @@
#
PORTNAME= nawk
PORTVERSION= 20020628
PORTVERSION= 20021129
CATEGORIES= lang
MASTER_SITES= http://cm.bell-labs.com/who/bwk/
DISTNAME= awk

View file

@ -1 +1 @@
MD5 (awk.tar.gz) = 1e2ef4bce7e538c8bf513ac21120bb26
MD5 (awk.tar.gz) = b7da824c66a4e799b67b2d0b40be6b0e

View file

@ -1,5 +1,5 @@
--- b.c.orig Sun Sep 24 17:18:38 2000
+++ b.c Fri Nov 3 01:59:32 2000
--- b.c.orig Fri Nov 29 06:56:01 2002
+++ b.c Wed Dec 11 20:43:35 2002
@@ -27,6 +27,9 @@
#define DEBUG
@ -10,69 +10,19 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -75,6 +78,24 @@
fa *fatab[NFA];
int nfatab = 0; /* entries in fatab */
@@ -714,6 +717,7 @@
* must be less than twice the size of their full name.
*/
+#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(const char *s, int anchor) /* returns dfa for reg expr s */
+#ifndef __FreeBSD__
/* and because isblank doesn't show up in any of the header files on any
* system i use, it's defined here. if some other locale has a richer
* definition of "blank", sorry about that.
@@ -723,6 +727,7 @@
{
int i, use, nuse;
@@ -287,6 +308,9 @@
int i, c, c2;
uschar *p = (uschar *) argp;
uschar *op, *bp;
+#ifdef __FreeBSD__
+ int c3;
return c==' ' || c=='\t';
}
+#endif
static uschar *buf = 0;
static int bufsz = 100;
@@ -303,6 +327,22 @@
c2 = *p++;
if (c2 == '\\')
c2 = quoted((char **) &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))
+ FATAL("out of space for character class [%.10s...] 2", p);
+ *bp++ = c3 + 1;
+ i++;
+ }
+ }
+#else /*FreeBSD*/
if (c > c2) { /* empty; ignore */
bp--;
i--;
@@ -314,6 +354,7 @@
*bp++ = ++c;
i++;
}
+#endif /*FreeBSD*/
continue;
}
}
struct charclass {
const char *cc_name;

View file

@ -1,34 +0,0 @@
*** main.c.orig Mon Oct 19 18:49:03 1998
--- main.c Wed Jan 13 17:51:59 1999
***************
*** 27,32 ****
--- 27,33 ----
#define DEBUG
#include <stdio.h>
#include <ctype.h>
+ #include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
***************
*** 55,61 ****
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);
--- 56,67 ----
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);