From c5fcf7179a83ef65c86c6a4a390029149e518649 Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Tue, 5 Oct 2021 21:49:54 +0200 Subject: Duzy commit ze smieciami --- Semestr 4/ask/lista9/ropex.c | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 Semestr 4/ask/lista9/ropex.c (limited to 'Semestr 4/ask/lista9/ropex.c') diff --git a/Semestr 4/ask/lista9/ropex.c b/Semestr 4/ask/lista9/ropex.c deleted file mode 100644 index dbeae12..0000000 --- a/Semestr 4/ask/lista9/ropex.c +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include -#include - -/* Get string from stdin */ -void readline(FILE *in, char *p) { - int c; - while (true) { - c = fgetc(in); - if (c == EOF || c == '\n') - break; - *p++ = c; - } - *p = '\0'; -} - -void echo(FILE *in) { - char buf[48]; - readline(in, buf); - puts(buf); -} - -int main(int argc, char *argv[]) { - FILE *in = NULL; - if (argc == 2) - in = fopen(argv[1], "rb"); - if (in == NULL) - in = stdin; - echo(in); - return 0; -} -- cgit v1.2.3