aboutsummaryrefslogtreecommitdiffstats
path: root/addcr.c
diff options
context:
space:
mode:
Diffstat (limited to 'addcr.c')
-rw-r--r--addcr.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/addcr.c b/addcr.c
new file mode 100644
index 0000000..85e6147
--- /dev/null
+++ b/addcr.c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+ int ch;
+
+ while (!feof(stdin))
+ {
+ ch=fgetc(stdin);
+ if (ch==10) fputc(13,stdout);
+ if (ch!=EOF) fputc(ch,stdout);
+ }
+ return 0;
+} \ No newline at end of file