Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit don't stop reading after empty lines from: Nirbh...
details: https://anonhg.NetBSD.org/src/rev/7523d1c48dc9
branches: trunk
changeset: 767674:7523d1c48dc9
user: christos <christos%NetBSD.org@localhost>
date: Tue Jul 26 21:03:17 2011 +0000
description:
don't stop reading after empty lines from: Nirbhay Choubey
diffstat:
lib/libedit/el.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 4071839447f7 -r 7523d1c48dc9 lib/libedit/el.c
--- a/lib/libedit/el.c Tue Jul 26 20:51:23 2011 +0000
+++ b/lib/libedit/el.c Tue Jul 26 21:03:17 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: el.c,v 1.62 2011/03/20 12:36:14 bouyer Exp $ */
+/* $NetBSD: el.c,v 1.63 2011/07/26 21:03:17 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)el.c 8.2 (Berkeley) 1/3/94";
#else
-__RCSID("$NetBSD: el.c,v 1.62 2011/03/20 12:36:14 bouyer Exp $");
+__RCSID("$NetBSD: el.c,v 1.63 2011/07/26 21:03:17 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -540,6 +540,8 @@
return (-1);
while ((ptr = fgetln(fp, &len)) != NULL) {
+ if (*ptr == '\n')
+ continue; /* Empty line. */
dptr = ct_decode_string(ptr, &el->el_scratch);
if (!dptr)
continue;
Home |
Main Index |
Thread Index |
Old Index