Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/historical/nawk/dist remove trailing whitespace.



details:   https://anonhg.NetBSD.org/src/rev/30f3cac23aa8
branches:  trunk
changeset: 458564:30f3cac23aa8
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Aug 01 06:14:45 2019 +0000

description:
remove trailing whitespace.

diffstat:

 external/historical/nawk/dist/FIXES   |  34 +++++++++++++++++-----------------
 external/historical/nawk/dist/awk.1   |  12 ++++++------
 external/historical/nawk/dist/awk.h   |   4 ++--
 external/historical/nawk/dist/b.c     |  34 +++++++++++++++++-----------------
 external/historical/nawk/dist/lex.c   |  22 +++++++++++-----------
 external/historical/nawk/dist/lib.c   |   2 +-
 external/historical/nawk/dist/main.c  |   6 +++---
 external/historical/nawk/dist/proto.h |   2 ++
 external/historical/nawk/dist/run.c   |   4 ++--
 external/historical/nawk/dist/tran.c  |  12 ++++++------
 external/historical/nawk/dist/ytab.c  |  10 +++++-----
 11 files changed, 72 insertions(+), 70 deletions(-)

diffs (truncated from 592 to 300 lines):

diff -r 9ffa6ed74cf8 -r 30f3cac23aa8 external/historical/nawk/dist/FIXES
--- a/external/historical/nawk/dist/FIXES       Thu Aug 01 03:43:54 2019 +0000
+++ b/external/historical/nawk/dist/FIXES       Thu Aug 01 06:14:45 2019 +0000
@@ -52,10 +52,10 @@
        /pat/, \n /pat/ {...} is now legal, though bad style to use.
 
        added checks to new -v code that permits -vnospace; thanks to
-       ruslan ermilov for spotting this and providing the patch. 
+       ruslan ermilov for spotting this and providing the patch.
 
        removed fixed limit on number of open files; thanks to aleksey
-       cheusov and christos zoulos. 
+       cheusov and christos zoulos.
 
        fixed day 1 bug that resurrected deleted elements of ARGV when
        used as filenames (in lib.c).
@@ -73,10 +73,10 @@
        and arnold robbins, changed srand() to return the previous
        seed (which is 1 on the first call of srand).  the seed is
        an Awkfloat internally though converted to unsigned int to
-       pass to the library srand().  thanks, everyone. 
+       pass to the library srand().  thanks, everyone.
 
        fixed a subtle (and i hope low-probability) overflow error
-       in fldbld, by adding space for one extra \0.  thanks to 
+       in fldbld, by adding space for one extra \0.  thanks to
        robert bassett for spotting this one and providing a fix.
 
        removed the files related to compilation on windows.  i no
@@ -113,7 +113,7 @@
 
 Oct 23, 2007:
        minor fix in lib.c: increase inputFS to 100, change malloc
-       for fields to n+1.  
+       for fields to n+1.
 
        fixed memory fault caused by out of order test in setsval.
 
@@ -160,7 +160,7 @@
 
        core dump on linux with BEGIN {nextfile}, now fixed.
 
-       removed some #ifdef's in run.c and lex.c that appear to no 
+       removed some #ifdef's in run.c and lex.c that appear to no
        longer be necessary.
 
 Apr 24, 2005:
@@ -174,8 +174,8 @@
        rethinking it.
 
 Dec 31, 2004:
-       prevent overflow of -f array in main, head off potential error in 
-       call of SYNTAX(), test malloc return in lib.c, all with thanks to 
+       prevent overflow of -f array in main, head off potential error in
+       call of SYNTAX(), test malloc return in lib.c, all with thanks to
        todd miller.
 
 Dec 22, 2004:
@@ -203,8 +203,8 @@
        code known to man.
 
        fixed a storage leak in call() that appears to have been there since
-       1983 or so -- a function without an explicit return that assigns a 
-       string to a parameter leaked a Cell.  thanks to moinak ghosh for 
+       1983 or so -- a function without an explicit return that assigns a
+       string to a parameter leaked a Cell.  thanks to moinak ghosh for
        spotting this very subtle one.
 
 Jul 31, 2003:
@@ -226,7 +226,7 @@
        radix character in programs and command line arguments regardless of
        the locale; otherwise, the locale should prevail for input and output
        of numbers.  so it's intended to work that way.
-       
+
        i have rescinded the attempt to use strcoll in expanding shorthands in
        regular expressions (cclenter).  its properties are much too
        surprising; for example [a-c] matches aAbBc in locale en_US but abBcC
@@ -290,7 +290,7 @@
 Jun 28, 2002:
        modified run/format() and tran/getsval() to do a slightly better
        job on using OFMT for output from print and CONVFMT for other
-       number->string conversions, as promised by posix and done by 
+       number->string conversions, as promised by posix and done by
        gawk and mawk.  there are still places where it doesn't work
        right if CONVFMT is changed; by then the STR attribute of the
        variable has been irrevocably set.  thanks to arnold robbins for
@@ -322,7 +322,7 @@
 Jan 1, 2002:
        fflush() or fflush("") flushes all files and pipes.
 
-       length(arrayname) returns number of elements; thanks to 
+       length(arrayname) returns number of elements; thanks to
        arnold robbins for suggestion.
 
        added a makefile.win to make it easier to build on windows.
@@ -372,7 +372,7 @@
 
 May 25, 2000:
        yet another attempt at making 8-bit input work, with another
-       band-aid in b.c (member()), and some (uschar) casts to head 
+       band-aid in b.c (member()), and some (uschar) casts to head
        off potential errors in subscripts (like isdigit).  also
        changed HAT to NCHARS-2.  thanks again to santiago vila.
 
@@ -419,7 +419,7 @@
        the test case.)
 
 Apr 16, 1999:
-       with code kindly provided by Bruce Lilly, awk now parses 
+       with code kindly provided by Bruce Lilly, awk now parses
        /=/ and similar constructs more sensibly in more places.
        Bruce also provided some helpful test cases.
 
@@ -476,7 +476,7 @@
 
 Oct 19, 1998:
        fixed a couple of bugs in getrec: could fail to update $0
-       after a getline var; because inputFS wasn't initialized, 
+       after a getline var; because inputFS wasn't initialized,
        could split $0 on every character, a misleading diversion.
 
        fixed caching bug in makedfa: LRU was actually removing
@@ -622,7 +622,7 @@
        input file. (thanks to arnold robbins for inspiration and code).
 
        small fixes to regexpr code:  can now handle []], [[], and
-       variants;  [] is now a syntax error, rather than matching 
+       variants;  [] is now a syntax error, rather than matching
        everything;  [z-a] is now empty, not z.  far from complete
        or correct, however.  (thanks to jeffrey friedl for pointing out
        some awful behaviors.)
diff -r 9ffa6ed74cf8 -r 30f3cac23aa8 external/historical/nawk/dist/awk.1
--- a/external/historical/nawk/dist/awk.1       Thu Aug 01 03:43:54 2019 +0000
+++ b/external/historical/nawk/dist/awk.1       Thu Aug 01 06:14:45 2019 +0000
@@ -49,7 +49,7 @@
 Each line is matched against the
 pattern portion of every pattern-action statement;
 the associated action is performed for each matched pattern.
-The file name 
+The file name
 .B \-
 means the standard input.
 Any
@@ -91,7 +91,7 @@
 .IP
 .IB pattern " { " action " }
 .PP
-A missing 
+A missing
 .BI { " action " }
 means print the line;
 a missing pattern always matches.
@@ -195,7 +195,7 @@
 .BR sin ,
 .BR cos ,
 and
-.BR atan2 
+.BR atan2
 are built in.
 Other built-in functions:
 .TF length
@@ -224,7 +224,7 @@
 substring of
 .I s
 that begins at position
-.IR m 
+.IR m
 counted from 1.
 .TP
 .BI index( s , " t" )
@@ -352,7 +352,7 @@
 of regular expressions and
 relational expressions.
 Regular expressions are as in
-.IR egrep ; 
+.IR egrep ;
 see
 .IR grep (1).
 Isolated regular expressions
@@ -512,7 +512,7 @@
 .fi
 .EE
 .SH SEE ALSO
-.IR lex (1), 
+.IR lex (1),
 .IR sed (1)
 .br
 A. V. Aho, B. W. Kernighan, P. J. Weinberger,
diff -r 9ffa6ed74cf8 -r 30f3cac23aa8 external/historical/nawk/dist/awk.h
--- a/external/historical/nawk/dist/awk.h       Thu Aug 01 03:43:54 2019 +0000
+++ b/external/historical/nawk/dist/awk.h       Thu Aug 01 06:14:45 2019 +0000
@@ -32,7 +32,7 @@
 
 #define        xfree(a)        { if ((a) != NULL) { free((void *) (a)); (a) = NULL; } }
 
-#define        NN(p)   ((p) ? (p) : "(null)")  /* guaranteed non-null for dprintf 
+#define        NN(p)   ((p) ? (p) : "(null)")  /* guaranteed non-null for dprintf
 */
 #define        DEBUG
 #ifdef DEBUG
@@ -155,7 +155,7 @@
 #define CCOPY  6
 #define CCON   5
 #define CTEMP  4
-#define CNAME  3 
+#define CNAME  3
 #define CVAR   2
 #define CFLD   1
 #define        CUNK    0
diff -r 9ffa6ed74cf8 -r 30f3cac23aa8 external/historical/nawk/dist/b.c
--- a/external/historical/nawk/dist/b.c Thu Aug 01 03:43:54 2019 +0000
+++ b/external/historical/nawk/dist/b.c Thu Aug 01 06:14:45 2019 +0000
@@ -220,7 +220,7 @@
        f->curstat = 2;
        f->out[2] = 0;
        k = *(f->re[0].lfollow);
-       xfree(f->posns[2]);                     
+       xfree(f->posns[2]);
        if ((f->posns[2] = calloc(1, (k+1)*sizeof(int))) == NULL)
                overflo("out of space in makeinit");
        for (i=0; i <= k; i++) {
@@ -649,9 +649,9 @@
  * RETURN VALUES
  *     0    No match found.
  *     1    Match found.
- */  
+ */
 
-int fnematch(fa *pfa, FILE *f, uschar **pbuf, int *pbufsize, int quantum)      
+int fnematch(fa *pfa, FILE *f, uschar **pbuf, int *pbufsize, int quantum)
 {
        uschar *buf = *pbuf;
        int bufsize = *pbufsize;
@@ -676,7 +676,7 @@
                        if (++j == k) {
                                if (k == bufsize)
                                        if (!adjbuf(&buf, &bufsize, bufsize+1, quantum, 0, "fnematch"))
-                                               FATAL("stream '%.30s...' too long", buf);       
+                                               FATAL("stream '%.30s...' too long", buf);
                                buf[k++] = (c = getc(f)) != EOF ? c : 0;
                        }
                        c = buf[j];
@@ -716,7 +716,7 @@
                 */
                do
                        if (buf[--k] && ungetc(buf[k], f) == EOF)
-                               FATAL("unable to ungetc '%c'", buf[k]); 
+                               FATAL("unable to ungetc '%c'", buf[k]);
                while (k > i + patlen);
                buf[k] = 0;
                return 1;
@@ -905,8 +905,8 @@
        uschar *buf = 0;
        int ret = 1;
        int init_q = (firstnum==0);             /* first added char will be ? */
-       int n_q_reps = secondnum-firstnum;      /* m>n, so reduce until {1,m-n} left  */ 
-       int prefix_length = reptok - basestr;   /* prefix includes first rep    */ 
+       int n_q_reps = secondnum-firstnum;      /* m>n, so reduce until {1,m-n} left  */
+       int prefix_length = reptok - basestr;   /* prefix includes first rep    */
        int suffix_length = strlen(reptok) - reptoklen; /* string after rep specifier   */
        int size = prefix_length +  suffix_length;
 
@@ -924,7 +924,7 @@
        }
        if ((buf = (uschar *) malloc(size+1)) == NULL)
                FATAL("out of space in reg expr %.10s..", lastre);
-       memcpy(buf, basestr, prefix_length);    /* copy prefix  */ 
+       memcpy(buf, basestr, prefix_length);    /* copy prefix  */
        j = prefix_length;
        if (special_case == REPEAT_ZERO) {
                j -= atomlen;
@@ -979,23 +979,23 @@
                if (firstnum < 2) {
                        /* 0 or 1: should be handled before you get here */
                } else {
-                       return replace_repeat(reptok, reptoklen, atom, atomlen, 
+                       return replace_repeat(reptok, reptoklen, atom, atomlen,
                                firstnum, secondnum, REPEAT_PLUS_APPENDED);
                }
        } else if (firstnum == secondnum) {     /* {n} or {n,n} -> simply repeat n-1 times */
                if (firstnum == 0) {    /* {0} or {0,0} */
-                       /* This case is unusual because the resulting 
-                          replacement string might actually be SMALLER than 
+                       /* This case is unusual because the resulting
+                          replacement string might actually be SMALLER than
                           the original ERE */
-                       return replace_repeat(reptok, reptoklen, atom, atomlen, 
+                       return replace_repeat(reptok, reptoklen, atom, atomlen,
                                        firstnum, secondnum, REPEAT_ZERO);
                } else {                /* (firstnum >= 1) */
-                       return replace_repeat(reptok, reptoklen, atom, atomlen, 
+                       return replace_repeat(reptok, reptoklen, atom, atomlen,
                                        firstnum, secondnum, REPEAT_SIMPLE);
                }
        } else if (firstnum < secondnum) {      /* {n,m} -> repeat n-1 times then alternate  */
                /*  x{n,m}  =>  xx...x{1, m-n+1}  =>  xx...x?x?x?..x?   */
-               return replace_repeat(reptok, reptoklen, atom, atomlen, 
+               return replace_repeat(reptok, reptoklen, atom, atomlen,
                                        firstnum, secondnum, REPEAT_WITH_Q);



Home | Main Index | Thread Index | Old Index