Ignore incoming LF, so that having Enter -> CR LF on input doesn't hurt
authorhpa <hpa>
Wed, 1 Dec 2004 00:24:47 +0000 (00:24 +0000)
committerhpa <hpa>
Wed, 1 Dec 2004 00:24:47 +0000 (00:24 +0000)
com32/lib/sys/line_input.c

index e0de58b..c24cf92 100644 (file)
@@ -47,6 +47,9 @@ ssize_t __line_input(struct file_info *fp, char *buf, size_t bufsize,
       return n;
     
     switch ( ch ) {
+    case '\n':                 /* Ignore incoming linefeed */
+      break;
+      
     case '\r':
       *buf = '\n';
       Write(fp, "\n", 1);