aboutsummaryrefslogtreecommitdiff
path: root/tt.c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2020-10-23 02:12:30 +0200
committerJohn Ankarström <john@ankarstrom.se>2020-10-23 02:12:30 +0200
commit4605b90ff1e0de5b12e04647cd5dacd9848a9a74 (patch)
tree4fc6bcadbeabaea9c3941047123ed462b8087ca9 /tt.c
parentc3143fbdb7ea46539023e11cb30a7b14434030f3 (diff)
downloadtt-4605b90ff1e0de5b12e04647cd5dacd9848a9a74.tar.gz
release 1.2.1HEADmaster
Diffstat (limited to 'tt.c')
-rw-r--r--tt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tt.c b/tt.c
index 66acdb2..94f3c35 100644
--- a/tt.c
+++ b/tt.c
@@ -97,6 +97,7 @@ int main(int argc, char *argv[]) {
if (line == NULL) err(1, "malloc");
while ((b = getchar()) != EOF) {
c = b;
+ if (c == '\r') continue;
if (c != '\n') {
if (line_l + 1 > line_s) {
line_s += 20;
@@ -133,6 +134,7 @@ int main(int argc, char *argv[]) {
while ((b = fgetc(fo)) != EOF) {
c = b;
+ if (c == '\r') continue;
if (c != '\n') {
if (line_l + 1 > line_s) {
line_s += 20;