X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcat.c;h=e0f866d433e7d18479075e57c57fcf6f509c3ea0;hb=19d7d8904cc182b5da4ccb43aca11b4c6649a4d1;hp=fedf00780a4e3c8d1fe1a8ae38d9380aaa3a1daf;hpb=d8c196b5d4959165d1fcc5f31ff8fb9f95b1900e;p=c128-kasse diff --git a/src/cat.c b/src/cat.c index fedf007..e0f866d 100644 --- a/src/cat.c +++ b/src/cat.c @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include "general.h" @@ -15,36 +15,17 @@ int main() { unsigned char i; char buffer[8]; char readable[9]; - struct cbm_dirent *dirent; memset(readable, '\0', 9); while (1) { clrscr(); while (filename == NULL || *filename == '\0') { - printf("Please enter filename (q to exit, d for dirlist):\r\n"); + printf("Please enter filename (q to exit):\r\n"); filename = get_input(); } if (*filename == 'q') return 0; - else if (*filename == 'd') { - c = 0; - if (cbm_opendir((BYTE)8, (BYTE)8) != 0) { - cprintf("could not open directory\r\n"); - return 1; - } - while (cbm_readdir((BYTE)8, dirent) == 0) { - printf("file %d: %s\n", c, dirent->name); - get_input(); - } - cbm_closedir((BYTE)8); - - printf("Finished listing directory, press RETURN...\n"); - get_input(); - - filename = NULL; - continue; - } c = 0; if ((file = fopen(filename, "r")) == NULL) { printf("Could not open file\r\n");