From b0ef971780b3efb41f9bf6ce6c35dbf7526ebc89 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 3 May 2025 21:15:10 +0300 Subject: DOS: add `-8` command-line parameter for disabling automatic EOL conversions * this preserves CRs in the buffer - they will be echoed like ^M * This is inspired by SciTECO's `-8`/`--8bit` parameter. --- teco.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/teco.c b/teco.c index d5be9a6..cc5215a 100644 --- a/teco.c +++ b/teco.c @@ -1091,6 +1091,12 @@ int arg_skip; output_tty_name = argv[i+1]; arg_skip++; break; +#ifdef __WATCOMC__ + case '8': + /* don't convert DOS linebreaks */ + _fmode = O_BINARY; + break; +#endif default: fprintf(stderr,"teco: unknown switch '%c'\n",c); cp = ""; -- cgit v1.2.3