Source-Changes-HG archive

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

[src/netbsd-1-5]: src/bin/ksh Pull up revision 1.4 (requested by dogcow):



details:   https://anonhg.NetBSD.org/src/rev/1c9f4bd49cfd
branches:  netbsd-1-5
changeset: 492864:1c9f4bd49cfd
user:      he <he%NetBSD.org@localhost>
date:      Tue Feb 26 19:50:52 2002 +0000

description:
Pull up revision 1.4 (requested by dogcow):
  Synchronize with current development version:
   o fix problem with ``set -x'' causing a core dump; fixes PR#11361
   o fix problem with ``set -e'' causing early exit; fixes PR#11542
   o fix various misspellings and nested extern declarations

diffstat:

 bin/ksh/c_sh.c   |  7 ++-----
 bin/ksh/expand.h |  6 +++---
 bin/ksh/lex.h    |  6 +++---
 bin/ksh/shf.c    |  3 +--
 bin/ksh/trap.c   |  4 ++--
 5 files changed, 11 insertions(+), 15 deletions(-)

diffs (119 lines):

diff -r 4312288ff45a -r 1c9f4bd49cfd bin/ksh/c_sh.c
--- a/bin/ksh/c_sh.c    Tue Feb 26 19:50:47 2002 +0000
+++ b/bin/ksh/c_sh.c    Tue Feb 26 19:50:52 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: c_sh.c,v 1.3 1999/10/20 15:09:59 hubertf Exp $ */
+/*     $NetBSD: c_sh.c,v 1.3.6.1 2002/02/26 19:50:52 he Exp $  */
 
 /*
  * built-in Bourne commands
@@ -10,6 +10,7 @@
 #include "ksh_times.h"
 
 static char *clocktos ARGS((clock_t t));
+extern clock_t j_usrtime, j_systime; /* computed by j_wait */
 
 
 /* :, false and true */
@@ -722,7 +723,6 @@
        struct tms t0, t1, tms;
        clock_t t0t, t1t = 0;
        int tf = 0;
-       extern clock_t j_usrtime, j_systime; /* computed by j_wait */
        char opts[1];
 
        t0t = ksh_times(&t0);
@@ -863,9 +863,6 @@
        return 0;
 }
 
-extern int c_test ARGS((char **wp));           /* in c_test.c */
-extern int c_ulimit ARGS((char **wp));         /* in c_ulimit.c */
-
 /* A leading = means assignments before command are kept;
  * a leading * means a POSIX special builtin;
  * a leading + means a POSIX regular builtin
diff -r 4312288ff45a -r 1c9f4bd49cfd bin/ksh/expand.h
--- a/bin/ksh/expand.h  Tue Feb 26 19:50:47 2002 +0000
+++ b/bin/ksh/expand.h  Tue Feb 26 19:50:52 2002 +0000
@@ -1,9 +1,9 @@
-/*     $NetBSD: expand.h,v 1.3 1999/10/20 15:09:59 hubertf Exp $       */
+/*     $NetBSD: expand.h,v 1.3.6.1 2002/02/26 19:50:53 he Exp $        */
 
 /*
  * Expanding strings
  */
-/* $Id: expand.h,v 1.3 1999/10/20 15:09:59 hubertf Exp $ */
+/* $Id: expand.h,v 1.3.6.1 2002/02/26 19:50:53 he Exp $ */
 
 #define X_EXTRA                8       /* this many extra bytes in X string */
 
@@ -13,7 +13,7 @@
 
        Xinit(xs, xp, 128, ATEMP); /* allocate initial string */
        while ((c = generate()) {
-               Xcheck(xs, xp); /* expand string if neccessary */
+               Xcheck(xs, xp); /* expand string if necessary */
                Xput(xs, xp, c); /* add character */
        }
        return Xclose(xs, xp);  /* resize string */
diff -r 4312288ff45a -r 1c9f4bd49cfd bin/ksh/lex.h
--- a/bin/ksh/lex.h     Tue Feb 26 19:50:47 2002 +0000
+++ b/bin/ksh/lex.h     Tue Feb 26 19:50:52 2002 +0000
@@ -1,10 +1,10 @@
-/*     $NetBSD: lex.h,v 1.3 1999/10/20 15:09:59 hubertf Exp $  */
+/*     $NetBSD: lex.h,v 1.3.6.1 2002/02/26 19:50:53 he Exp $   */
 
 /*
  * Source input, lexer and parser
  */
 
-/* $Id: lex.h,v 1.3 1999/10/20 15:09:59 hubertf Exp $ */
+/* $Id: lex.h,v 1.3.6.1 2002/02/26 19:50:53 he Exp $ */
 
 #define        IDENT   64
 
@@ -22,7 +22,7 @@
        char    ugbuf[2];       /* buffer for ungetsc() (SREREAD) and
                                 * alias (SALIAS) */
        int     line;           /* line number */
-       int     errline;        /* line the error occured on (0 if not set) */
+       int     errline;        /* line the error occurred on (0 if not set) */
        const char *file;       /* input file name */
        int     flags;          /* SF_* */
        Area    *areap;
diff -r 4312288ff45a -r 1c9f4bd49cfd bin/ksh/shf.c
--- a/bin/ksh/shf.c     Tue Feb 26 19:50:47 2002 +0000
+++ b/bin/ksh/shf.c     Tue Feb 26 19:50:52 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: shf.c,v 1.3 1999/10/20 15:10:00 hubertf Exp $  */
+/*     $NetBSD: shf.c,v 1.3.6.1 2002/02/26 19:50:53 he Exp $   */
 
 /*
  *  Shell file I/O routines
@@ -357,7 +357,6 @@
                shf->rp = nbuf + (shf->rp - shf->buf);
                shf->wp = nbuf + (shf->wp - shf->buf);
                shf->rbsize += shf->wbsize;
-               shf->wbsize += shf->wbsize;
                shf->wnleft += shf->wbsize;
                shf->wbsize *= 2;
                shf->buf = nbuf;
diff -r 4312288ff45a -r 1c9f4bd49cfd bin/ksh/trap.c
--- a/bin/ksh/trap.c    Tue Feb 26 19:50:47 2002 +0000
+++ b/bin/ksh/trap.c    Tue Feb 26 19:50:52 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.3 1999/10/20 15:10:00 hubertf Exp $ */
+/*     $NetBSD: trap.c,v 1.3.6.1 2002/02/26 19:50:53 he Exp $  */
 
 /*
  * signal handling
@@ -158,7 +158,7 @@
 }
 
 /* Returns the signal number of any pending traps: ie, a signal which has
- * occured for which a trap has been set or for which the TF_DFL_INTR flag
+ * occurred for which a trap has been set or for which the TF_DFL_INTR flag
  * is set.
  */
 int



Home | Main Index | Thread Index | Old Index