aboutsummaryrefslogtreecommitdiff
path: root/Semestr 4/ask/lista9/ropex.c
diff options
context:
space:
mode:
authorFranciszek Malinka <franciszek.malinka@gmail.com>2021-10-05 21:49:54 +0200
committerFranciszek Malinka <franciszek.malinka@gmail.com>2021-10-05 21:49:54 +0200
commitc5fcf7179a83ef65c86c6a4a390029149e518649 (patch)
treed29ffc5b86a0d257453cedcf87d91a13d8bf3b0d /Semestr 4/ask/lista9/ropex.c
parentf8a88b6a4aba1f66d04711a9330eaba49a50c463 (diff)
Duzy commit ze smieciami
Diffstat (limited to 'Semestr 4/ask/lista9/ropex.c')
-rw-r--r--Semestr 4/ask/lista9/ropex.c31
1 files changed, 0 insertions, 31 deletions
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 <stdbool.h>
-#include <stdint.h>
-#include <stdio.h>
-
-/* 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;
-}