Source-Changes-HG archive

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

[src/trunk]: src/lib/libedit Avoid c99 for now.



details:   https://anonhg.NetBSD.org/src/rev/e30d75b339d8
branches:  trunk
changeset: 343534:e30d75b339d8
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Feb 12 17:23:21 2016 +0000

description:
Avoid c99 for now.

diffstat:

 lib/libedit/eln.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 12134946d972 -r e30d75b339d8 lib/libedit/eln.c
--- a/lib/libedit/eln.c Fri Feb 12 15:36:08 2016 +0000
+++ b/lib/libedit/eln.c Fri Feb 12 17:23:21 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: eln.c,v 1.20 2016/02/12 15:36:08 christos Exp $        */
+/*     $NetBSD: eln.c,v 1.21 2016/02/12 17:23:21 christos Exp $        */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: eln.c,v 1.20 2016/02/12 15:36:08 christos Exp $");
+__RCSID("$NetBSD: eln.c,v 1.21 2016/02/12 17:23:21 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include "histedit.h"
@@ -73,8 +73,10 @@
 
        tmp = el_wgets(el, nread);
        if (tmp != NULL) {
+           int i;
            size_t nwread = 0;
-           for (int i = 0; i < *nread; i++)
+
+           for (i = 0; i < *nread; i++)
                nwread += ct_enc_width(tmp[i]);
            *nread = (int)nwread;
        }



Home | Main Index | Thread Index | Old Index