From a968c1bd6d41033bc5d32ebfd6ec0491d6ea51b9 Mon Sep 17 00:00:00 2001 From: Enrico Fraccaroli Date: Thu, 14 Oct 2021 17:41:26 +0200 Subject: [PATCH] Remove useless file. --- files/prog/more.c | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 files/prog/more.c diff --git a/files/prog/more.c b/files/prog/more.c deleted file mode 100644 index fa67ac4..0000000 --- a/files/prog/more.c +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include - -void main(int argc, char ** argv) -{ - if (argc == 2) - { - // Try to open the file. - int fd = open(argv[1], O_RDONLY, 42); - if (fd > -1) - { - char c; - // Put on the standard output the characters. - while (read(fd, &c, 1)) putchar(c); - putchar('\n'); - putchar('\n'); - close(fd); - } - else - { - printf("%s: cannot find the file.\n\n", argv[1]); - } - } - else - { - printf("Usage: more file\n\n"); - } -} \ No newline at end of file