diff options
author | John Ankarström <john@ankarstrom.se> | 2020-10-23 02:12:30 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-10-23 02:12:30 +0200 |
commit | 4605b90ff1e0de5b12e04647cd5dacd9848a9a74 (patch) | |
tree | 4fc6bcadbeabaea9c3941047123ed462b8087ca9 /tt.c | |
parent | c3143fbdb7ea46539023e11cb30a7b14434030f3 (diff) | |
download | tt-master.tar.gz |
Diffstat (limited to 'tt.c')
-rw-r--r-- | tt.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |