aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-05-03 21:15:10 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-05-03 21:15:10 +0300
commitb0ef971780b3efb41f9bf6ce6c35dbf7526ebc89 (patch)
tree4e8f42f18f08b21dad505230ee9c838ac801ccb2
parent416451a7445efac4155f45fd68e75e58daffeda6 (diff)
downloadvideoteco-fork-b0ef971780b3efb41f9bf6ce6c35dbf7526ebc89.tar.gz
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.
-rw-r--r--teco.c6
1 files changed, 6 insertions, 0 deletions
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 = "";