úprava pro přesměrování ze souboru u t2b, v Makefile doplněno vytváření podadresáře bin pro binárky a upraven překlad do tohoto podadresáře.

This commit is contained in:
2026-01-28 16:28:30 +01:00
parent b3c9758f3f
commit dc2cafa317
5 changed files with 26 additions and 9 deletions
+12 -2
View File
@@ -17,16 +17,26 @@ int main() {
// hláška k zadání vstupu
printf("Zadejte textovy vstup: ");
printf("Zadejte textovy vstup (rucni ukonceni pomoci 2xCTRL+Z na Windows (2xCTRL+D na Linuxu)): ");
// čtení prvního znaku vstupu
in = fgetc(stdin);
// odřádkování po zadání dat, protože už nemáme Enter
fputc('\n', stdout);
// hláška o výstupu
printf("Zakodovany binarni vystup: ");
// cyklus zpracování vstupu
while(in != EOF && in != '\n') {
// zrušena možnost Enter na konci, nešly načítat víceřádkové soubory
// technický popis chování:
//Using Control-D, you cause the terminal driver to make all the input typed so far on the line available
//for reading, even if you've not typed return. If you type, say, abc and then Control-D,
//the terminal driver makes the three characters abc available (and Control-D is not seen by the program).
//If you type Control-D again, or type return and then Control-D, then there are no more characters available,
//so the underlying read() system call returns 0, which the standard I/O system interprets as EOF.
while(in != EOF /*&& in != '\n'*/) {
// ladicí výpis aktuálního znaku
debug("%c\n", in);