mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-11-16 23:20:43 +00:00
logo: add utils to dump file
This commit is contained in:
parent
468387a47f
commit
2e8b0a20ce
25
utils/logo/logo_cat.c
Normal file
25
utils/logo/logo_cat.c
Normal 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
16
utils/logo/text_cat.c
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user