logo: add utils to dump file

This commit is contained in:
Vince Weaver 2021-07-26 21:33:44 -04:00
parent 468387a47f
commit 2e8b0a20ce
2 changed files with 41 additions and 0 deletions

25
utils/logo/logo_cat.c Normal file
View File

@ -0,0 +1,25 @@
#include <stdio.h>
int main(int argc, char **argv) {
int result;
int ch;
while(1) {
result=getchar();
if (result<0) break;
if (result==0) break;
ch=result&0x7f;
if (ch=='\r') {
putchar('\n');
}
else {
putchar(ch);
}
}
return 0;
}

16
utils/logo/text_cat.c Normal file
View File

@ -0,0 +1,16 @@
#include <stdio.h>
int main(int argc, char **argv) {
int result;
while(1) {
result=getchar();
if (result<0) break;
putchar(result&0x7f);
}
return 0;
}