summaryrefslogtreecommitdiff
path: root/libc/tests/line2.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/tests/line2.c')
-rw-r--r--libc/tests/line2.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libc/tests/line2.c b/libc/tests/line2.c
new file mode 100644
index 0000000..6cc11ff
--- /dev/null
+++ b/libc/tests/line2.c
@@ -0,0 +1,15 @@
+
+#include <stdio.h>
+
+char buf[256];
+
+main()
+{
+ FILE * fd;
+ fd = fopen("/etc/passwd", "r");
+
+ while(fgets(buf, sizeof(buf), fd) != NULL)
+ {
+ printf(">>%s", buf);
+ }
+}