summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-22 20:19:57 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-22 20:19:57 +0800
commit40ad7b021e773dc0d2baad40ead36abf885dfad9 (patch)
tree2a460b301dd3f3b030ab3cdfbccdbfcf3c65dc01
parent73df3b82f606dae8f24a26dbb6a9285f693c457f (diff)
downloadpttbbs-40ad7b021e773dc0d2baad40ead36abf885dfad9.tar
pttbbs-40ad7b021e773dc0d2baad40ead36abf885dfad9.tar.gz
pttbbs-40ad7b021e773dc0d2baad40ead36abf885dfad9.tar.bz2
pttbbs-40ad7b021e773dc0d2baad40ead36abf885dfad9.tar.lz
pttbbs-40ad7b021e773dc0d2baad40ead36abf885dfad9.tar.xz
pttbbs-40ad7b021e773dc0d2baad40ead36abf885dfad9.tar.zst
pttbbs-40ad7b021e773dc0d2baad40ead36abf885dfad9.zip
- CRLF issue: make accepting LF an option.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4232 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/io.c9
1 files changed, 9 insertions, 0 deletions
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?