Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/gen Recognize CR as end of line too. the telnet cli...



details:   https://anonhg.NetBSD.org/src/rev/de6e3a524729
branches:  trunk
changeset: 329993:de6e3a524729
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jun 16 16:29:30 2014 +0000

description:
Recognize CR as end of line too. the telnet client passes that to us instead
of linefeed.

diffstat:

 lib/libc/gen/getpass.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 535733912214 -r de6e3a524729 lib/libc/gen/getpass.c
--- a/lib/libc/gen/getpass.c    Mon Jun 16 14:43:22 2014 +0000
+++ b/lib/libc/gen/getpass.c    Mon Jun 16 16:29:30 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getpass.c,v 1.27 2012/05/26 19:34:16 christos Exp $    */
+/*     $NetBSD: getpass.c,v 1.28 2014/06/16 16:29:30 christos Exp $    */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getpass.c,v 1.27 2012/05/26 19:34:16 christos Exp $");
+__RCSID("$NetBSD: getpass.c,v 1.28 2014/06/16 16:29:30 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -245,7 +245,7 @@
                }
 
                /* End of line */
-               if (c == C(VEOL, CTRL('j')) || c == C(VEOL2, CTRL('l')))
+               if (c == C(VEOL, CTRL('j')) || c == C(VEOL2, CTRL('m')))
                        c = '\0';
 add:
                if (l >= len) {



Home | Main Index | Thread Index | Old Index