Source-Changes-HG archive

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

[src/trunk]: src/bin/ksh ksh: Eliminate dead code from expand.h



details:   https://anonhg.NetBSD.org/src/rev/dd58578abd4f
branches:  trunk
changeset: 825108:dd58578abd4f
user:      kamil <kamil%NetBSD.org@localhost>
date:      Fri Jun 30 05:14:12 2017 +0000

description:
ksh: Eliminate dead code from expand.h

diffstat:

 bin/ksh/expand.h |  22 ++--------------------
 1 files changed, 2 insertions(+), 20 deletions(-)

diffs (36 lines):

diff -r bc6dbde036eb -r dd58578abd4f bin/ksh/expand.h
--- a/bin/ksh/expand.h  Fri Jun 30 04:44:46 2017 +0000
+++ b/bin/ksh/expand.h  Fri Jun 30 05:14:12 2017 +0000
@@ -1,30 +1,12 @@
-/*     $NetBSD: expand.h,v 1.5 2013/10/18 19:53:34 christos Exp $      */
+/*     $NetBSD: expand.h,v 1.6 2017/06/30 05:14:12 kamil Exp $ */
 
 /*
  * Expanding strings
  */
-/* $Id: expand.h,v 1.5 2013/10/18 19:53:34 christos Exp $ */
+/* $Id: expand.h,v 1.6 2017/06/30 05:14:12 kamil Exp $ */
 
 #define X_EXTRA                8       /* this many extra bytes in X string */
 
-#if 0                          /* Usage */
-       XString xs;
-       char *xp;
-
-       Xinit(xs, xp, 128, ATEMP); /* allocate initial string */
-       while ((c = generate()) {
-               Xcheck(xs, xp); /* expand string if necessary */
-               Xput(xs, xp, c); /* add character */
-       }
-       return Xclose(xs, xp);  /* resize string */
-/*
- * NOTE:
- *     The Xcheck and Xinit macros have a magic + X_EXTRA in the lengths.
- *     This is so that you can put up to X_EXTRA characters in a XString
- *     before calling Xcheck. (See yylex in lex.c)
- */
-#endif /* 0 */
-
 typedef struct XString {
        char   *end, *beg;      /* end, begin of string */
        size_t  len;            /* length */



Home | Main Index | Thread Index | Old Index