From 3a060d6056b5bb55a9a4bd3ae48a4b181dfefef6 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 11 Jun 2005 16:44:01 +0000 Subject: [PATCH] [_WIN32] (loc_StripDels): Remove. Different behavior depending on the platform is evil, and line editing is none of the server's business anyway. If your client can't deal with the delete key, well, here's a nickel, kid, get yourself a better computer. --- src/lib/gen/ioqueue.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/src/lib/gen/ioqueue.c b/src/lib/gen/ioqueue.c index 41f68cda..472a8556 100644 --- a/src/lib/gen/ioqueue.c +++ b/src/lib/gen/ioqueue.c @@ -169,9 +169,6 @@ ioq_gets(struct ioqueue *ioq, s_char *buf, int cc) buf[actual] = '\0'; /* remove the newline too */ removecc(ioq, nbytes + 1); -#if defined(_WIN32) - loc_StripDels(buf); -#endif } return nbytes; } @@ -420,34 +417,3 @@ ioq_makebuf(struct ioqueue *ioq, char *pBuf, int nBufLen) return ncopied; } #endif /* _WIN32 */ - -#if defined(_WIN32) -/* - * Remove backspaces and DELs from the buffer. - * - * Why? Because I got tired of telneting into the - * server and having to type perfectly... - */ -static void -loc_StripDels(char *pBuf) -{ - char *cp; - char *dp; - char *sp; - - for (cp = pBuf; *cp;) { - /* Remove Backspace and DEL */ - if (*cp == '\b' || *cp == '\x8F') { - if (cp == pBuf) - dp = cp; - else - dp = cp - 1; - sp = cp + 1; - while (*sp) - *dp++ = *sp++; - *dp = 0; - } else - cp++; - } -} -#endif