diff options
author | wen <wen@FreeBSD.org> | 2010-05-19 13:44:33 +0800 |
---|---|---|
committer | wen <wen@FreeBSD.org> | 2010-05-19 13:44:33 +0800 |
commit | 270a1ae490142840dfa772947bede20a48ed88ff (patch) | |
tree | 0f142c89d75deaf99e4560b33e1b90f9f9463b7f /lang | |
parent | 3fd777216ed4deaac4433c857d392f2aa06820c3 (diff) | |
download | freebsd-ports-gnome-270a1ae490142840dfa772947bede20a48ed88ff.tar.gz freebsd-ports-gnome-270a1ae490142840dfa772947bede20a48ed88ff.tar.zst freebsd-ports-gnome-270a1ae490142840dfa772947bede20a48ed88ff.zip |
- Update to 20100209
PR: ports/146172
Submitted by: Pedro Giffuni <giffunip@tutopia.com>
Approved by: maintainer(timeout, >2 weeks)
Diffstat (limited to 'lang')
-rw-r--r-- | lang/nawk/Makefile | 2 | ||||
-rw-r--r-- | lang/nawk/distinfo | 6 | ||||
-rw-r--r-- | lang/nawk/files/patch-awk.h | 15 | ||||
-rw-r--r-- | lang/nawk/files/patch-b.c | 67 | ||||
-rw-r--r-- | lang/nawk/files/patch-lex.c | 39 | ||||
-rw-r--r-- | lang/nawk/files/patch-lib.c | 29 | ||||
-rw-r--r-- | lang/nawk/files/patch-proto.h | 10 | ||||
-rw-r--r-- | lang/nawk/files/patch-run.c | 69 |
8 files changed, 134 insertions, 103 deletions
diff --git a/lang/nawk/Makefile b/lang/nawk/Makefile index 77f8344a203c..13a0bc75d04b 100644 --- a/lang/nawk/Makefile +++ b/lang/nawk/Makefile @@ -7,7 +7,7 @@ # PORTNAME= nawk -PORTVERSION= 20091126 +PORTVERSION= 20100209 CATEGORIES= lang MASTER_SITES= http://www.cs.princeton.edu/~bwk/btl.mirror/ DISTNAME= awk diff --git a/lang/nawk/distinfo b/lang/nawk/distinfo index bb19d722d19c..e2813649236b 100644 --- a/lang/nawk/distinfo +++ b/lang/nawk/distinfo @@ -1,3 +1,3 @@ -MD5 (nawk/awk.tar.gz) = ec8545e7c732e4402e963c70ba766a5b -SHA256 (nawk/awk.tar.gz) = 4dbf070864f8ea626ef2b24b2bca6efc8fb372cf6d96fdcf3926663a6e8d0099 -SIZE (nawk/awk.tar.gz) = 117853 +MD5 (nawk/awk.tar.gz) = 7e6c71ae36ec48ce1d9160f25174bf77 +SHA256 (nawk/awk.tar.gz) = d3b9c2df870d5dc48575fe5c8c5004c73e9ebf124710e83c0e6febdc0df104c1 +SIZE (nawk/awk.tar.gz) = 123234 diff --git a/lang/nawk/files/patch-awk.h b/lang/nawk/files/patch-awk.h new file mode 100644 index 000000000000..ebc52be054ea --- /dev/null +++ b/lang/nawk/files/patch-awk.h @@ -0,0 +1,15 @@ +--- awk.h.orig 2004/12/30 01:52:48 1.11 ++++ awk.h 2008/06/04 14:04:42 1.12 +@@ -127,6 +127,12 @@ + #define FTOUPPER 12 + #define FTOLOWER 13 + #define FFLUSH 14 ++#define FAND 15 ++#define FFOR 16 ++#define FXOR 17 ++#define FCOMPL 18 ++#define FLSHIFT 19 ++#define FRSHIFT 20 + + /* Node: parse tree is made of nodes, with Cell's at bottom */ + diff --git a/lang/nawk/files/patch-b.c b/lang/nawk/files/patch-b.c deleted file mode 100644 index 6ed634861b0b..000000000000 --- a/lang/nawk/files/patch-b.c +++ /dev/null @@ -1,67 +0,0 @@ ---- b.c.orig 2007-03-31 15:56:18.000000000 -0500 -+++ b.c 2008-07-07 08:44:50.000000000 -0500 -@@ -84,8 +84,8 @@ - - if (setvec == 0) { /* first time through any RE */ - maxsetvec = MAXLIN; -- setvec = (int *) malloc(maxsetvec * sizeof(int)); -- tmpset = (int *) malloc(maxsetvec * sizeof(int)); -+ setvec = (int *) calloc(maxsetvec, sizeof(int)); -+ tmpset = (int *) calloc(maxsetvec, sizeof(int)); - if (setvec == 0 || tmpset == 0) - overflo("out of space initializing makedfa"); - } -@@ -137,7 +137,7 @@ - f->accept = poscnt-1; /* penter has computed number of positions in re */ - cfoll(f, p1); /* set up follow sets */ - freetr(p1); -- if ((f->posns[0] = (int *) calloc(1, *(f->re[0].lfollow)*sizeof(int))) == NULL) -+ if ((f->posns[0] = (int *) calloc(*(f->re[0].lfollow), sizeof(int))) == NULL) - overflo("out of space in makedfa"); - if ((f->posns[1] = (int *) calloc(1, sizeof(int))) == NULL) - overflo("out of space in makedfa"); -@@ -157,7 +157,7 @@ - f->reset = 0; - k = *(f->re[0].lfollow); - xfree(f->posns[2]); -- if ((f->posns[2] = (int *) calloc(1, (k+1)*sizeof(int))) == NULL) -+ if ((f->posns[2] = (int *) calloc(k+1, sizeof(int))) == NULL) - overflo("out of space in makeinit"); - for (i=0; i <= k; i++) { - (f->posns[2])[i] = (f->re[0].lfollow)[i]; -@@ -357,7 +357,7 @@ - setvec[i] = 0; - setcnt = 0; - follow(v); /* computes setvec and setcnt */ -- if ((p = (int *) calloc(1, (setcnt+1)*sizeof(int))) == NULL) -+ if ((p = (int *) calloc(setcnt+1, sizeof(int))) == NULL) - overflo("out of space building follow set"); - f->re[info(v)].lfollow = p; - *p = setcnt; -@@ -531,7 +531,7 @@ - for (i = 2; i <= f->curstat; i++) - xfree(f->posns[i]); - k = *f->posns[0]; -- if ((f->posns[2] = (int *) calloc(1, (k+1)*sizeof(int))) == NULL) -+ if ((f->posns[2] = (int *) calloc(k+1, sizeof(int))) == NULL) - overflo("out of space in pmatch"); - for (i = 0; i <= k; i++) - (f->posns[2])[i] = (f->posns[0])[i]; -@@ -588,7 +588,7 @@ - for (i = 2; i <= f->curstat; i++) - xfree(f->posns[i]); - k = *f->posns[0]; -- if ((f->posns[2] = (int *) calloc(1, (k+1)*sizeof(int))) == NULL) -+ if ((f->posns[2] = (int *) calloc(k+1, sizeof(int))) == NULL) - overflo("out of state space"); - for (i = 0; i <= k; i++) - (f->posns[2])[i] = (f->posns[0])[i]; -@@ -920,7 +920,7 @@ - for (i = 0; i < NCHARS; i++) - f->gototab[f->curstat][i] = 0; - xfree(f->posns[f->curstat]); -- if ((p = (int *) calloc(1, (setcnt+1)*sizeof(int))) == NULL) -+ if ((p = (int *) calloc(setcnt+1, sizeof(int))) == NULL) - overflo("out of space in cgoto"); - - f->posns[f->curstat] = p; diff --git a/lang/nawk/files/patch-lex.c b/lang/nawk/files/patch-lex.c new file mode 100644 index 000000000000..ca3c00b0d662 --- /dev/null +++ b/lang/nawk/files/patch-lex.c @@ -0,0 +1,39 @@ +--- lex.c.orig 2006/04/16 02:10:18 1.9 ++++ lex.c 2008/06/04 14:04:42 1.10 +@@ -48,9 +48,11 @@ + { "BEGIN", XBEGIN, XBEGIN }, + { "END", XEND, XEND }, + { "NF", VARNF, VARNF }, ++ { "and", FAND, BLTIN }, + { "atan2", FATAN, BLTIN }, + { "break", BREAK, BREAK }, + { "close", CLOSE, CLOSE }, ++ { "compl", FCOMPL, BLTIN }, + { "continue", CONTINUE, CONTINUE }, + { "cos", FCOS, BLTIN }, + { "delete", DELETE, DELETE }, +@@ -70,13 +72,16 @@ + { "int", FINT, BLTIN }, + { "length", FLENGTH, BLTIN }, + { "log", FLOG, BLTIN }, ++ { "lshift", FLSHIFT, BLTIN }, + { "match", MATCHFCN, MATCHFCN }, + { "next", NEXT, NEXT }, + { "nextfile", NEXTFILE, NEXTFILE }, ++ { "or", FFOR, BLTIN }, + { "print", PRINT, PRINT }, + { "printf", PRINTF, PRINTF }, + { "rand", FRAND, BLTIN }, + { "return", RETURN, RETURN }, ++ { "rshift", FRSHIFT, BLTIN }, + { "sin", FSIN, BLTIN }, + { "split", SPLIT, SPLIT }, + { "sprintf", SPRINTF, SPRINTF }, +@@ -88,6 +93,7 @@ + { "tolower", FTOLOWER, BLTIN }, + { "toupper", FTOUPPER, BLTIN }, + { "while", WHILE, WHILE }, ++ { "xor", FXOR, BLTIN }, + }; + + #define DEBUG diff --git a/lang/nawk/files/patch-lib.c b/lang/nawk/files/patch-lib.c deleted file mode 100644 index 242068fd485e..000000000000 --- a/lang/nawk/files/patch-lib.c +++ /dev/null @@ -1,29 +0,0 @@ ---- lib.c.orig 2007-10-22 18:17:52.000000000 -0500 -+++ lib.c 2008-07-07 09:38:58.000000000 -0500 -@@ -59,7 +59,7 @@ - { - if ( (record = (char *) malloc(n)) == NULL - || (fields = (char *) malloc(n+1)) == NULL -- || (fldtab = (Cell **) malloc((nfields+1) * sizeof(Cell *))) == NULL -+ || (fldtab = (Cell **) calloc((nfields+1), sizeof(Cell *))) == NULL - || (fldtab[0] = (Cell *) malloc(sizeof(Cell))) == NULL ) - FATAL("out of space for $0 and fields"); - *fldtab[0] = dollar0; -@@ -78,7 +78,7 @@ - if (fldtab[i] == NULL) - FATAL("out of space in makefields %d", i); - *fldtab[i] = dollar1; -- sprintf(temp, "%d", i); -+ snprintf(temp, sizeof temp, "%d", i); - fldtab[i]->nval = tostring(temp); - } - } -@@ -226,7 +226,7 @@ - char *s, temp[50]; - extern Array *ARGVtab; - -- sprintf(temp, "%d", n); -+ snprintf(temp, sizeof temp, "%d", n); - x = setsymtab(temp, "", 0.0, STR, ARGVtab); - s = getsval(x); - dprintf( ("getargv(%d) returns |%s|\n", n, s) ); diff --git a/lang/nawk/files/patch-proto.h b/lang/nawk/files/patch-proto.h new file mode 100644 index 000000000000..3abcc89b79d3 --- /dev/null +++ b/lang/nawk/files/patch-proto.h @@ -0,0 +1,10 @@ +--- proto.h.orig 2003/10/26 11:34:23 1.5 ++++ proto.h 2007/11/06 23:07:52 1.5.22.1 +@@ -112,6 +112,7 @@ extern double getfval(Cell *); + extern char *getsval(Cell *); + extern char *getpssval(Cell *); /* for print */ + extern char *tostring(const char *); ++extern char *tostringN(const char *, size_t n); + extern char *qstring(const char *, int); + + extern void recinit(unsigned int); diff --git a/lang/nawk/files/patch-run.c b/lang/nawk/files/patch-run.c index b7b32aa2dbdb..e9c691f9015b 100644 --- a/lang/nawk/files/patch-run.c +++ b/lang/nawk/files/patch-run.c @@ -1,6 +1,69 @@ ---- run.c.orig Mon Dec 6 06:44:42 2004 -+++ run.c Sat Feb 26 18:01:46 2005 -@@ -1507,15 +1507,15 @@ +--- run.c.orig 2009-11-26 23:59:16.000000000 +0000 ++++ run.c 2010-04-29 22:50:49.000000000 +0000 +@@ -1504,20 +1504,78 @@ + nextarg = nextarg->nnext; + } + break; ++ case FCOMPL: ++ u = ~((int)getfval(x)); ++ break; ++ case FAND: ++ if (nextarg == 0) { ++ WARNING("and requires two arguments; returning 0"); ++ u = 0; ++ break; ++ } ++ y = execute(a[1]->nnext); ++ u = ((int)getfval(x)) & ((int)getfval(y)); ++ tempfree(y); ++ nextarg = nextarg->nnext; ++ break; ++ case FFOR: ++ if (nextarg == 0) { ++ WARNING("or requires two arguments; returning 0"); ++ u = 0; ++ break; ++ } ++ y = execute(a[1]->nnext); ++ u = ((int)getfval(x)) | ((int)getfval(y)); ++ tempfree(y); ++ nextarg = nextarg->nnext; ++ break; ++ case FXOR: ++ if (nextarg == 0) { ++ WARNING("or requires two arguments; returning 0"); ++ u = 0; ++ break; ++ } ++ y = execute(a[1]->nnext); ++ u = ((int)getfval(x)) ^ ((int)getfval(y)); ++ tempfree(y); ++ nextarg = nextarg->nnext; ++ break; ++ case FLSHIFT: ++ if (nextarg == 0) { ++ WARNING("or requires two arguments; returning 0"); ++ u = 0; ++ break; ++ } ++ y = execute(a[1]->nnext); ++ u = ((int)getfval(x)) << ((int)getfval(y)); ++ tempfree(y); ++ nextarg = nextarg->nnext; ++ break; ++ case FRSHIFT: ++ if (nextarg == 0) { ++ WARNING("or requires two arguments; returning 0"); ++ u = 0; ++ break; ++ } ++ y = execute(a[1]->nnext); ++ u = ((int)getfval(x)) >> ((int)getfval(y)); ++ tempfree(y); ++ nextarg = nextarg->nnext; ++ break; + case FSYSTEM: + fflush(stdout); /* in case something is buffered already */ u = (Awkfloat) system(getsval(x)) / 256; /* 256 is unix-dep */ break; case FRAND: |