From 40ad7b021e773dc0d2baad40ead36abf885dfad9 Mon Sep 17 00:00:00 2001 From: piaip Date: Tue, 22 Apr 2008 12:19:57 +0000 Subject: - CRLF issue: make accepting LF an option. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4232 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/io.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mbbsd/io.c b/mbbsd/io.c index 0c35b030..c3a7f5e4 100644 --- a/mbbsd/io.c +++ b/mbbsd/io.c @@ -300,7 +300,16 @@ dogetch(void) } else if (c == KEY_LF) { + // XXX it is reported that still some users + // experience double ENTERs. We are not sure if there + // are still any stupid clients. But if any, you + // can reject the LFs. According the the compatibility + // test, most clients send CR only so it should be fine. +#ifdef ACCEPT_LF return KEY_ENTER; +#else + return KEY_UNKNOWN; +#endif } // XXX also treat ^H and 127 (KEY_BS2) the same one? -- cgit v1.2.3