aboutsummaryrefslogtreecommitdiff
path: root/tt.c
diff options
context:
space:
mode:
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;