X-Git-Url: http://mop.ddnsfree.com/gitweb/?p=mopice.git;a=blobdiff_plain;f=greetings.c;fp=greetings.c;h=0000000000000000000000000000000000000000;hp=1df0d98c30be84d6e7e3318903c2d23fe7bda558;hb=3538304c516e91f4cf3659bd0692c05b023d8eff;hpb=dcf07fc045d19295fea79ffd9e8ce539d6b00f53 diff --git a/greetings.c b/greetings.c deleted file mode 100644 index 1df0d98..0000000 --- a/greetings.c +++ /dev/null @@ -1,28 +0,0 @@ -#include - -int main_old() { - int ret; - char val; - char *pos = " *"; - while ((ret = read(0, &val, 1)) > 0) { - // printf("%d\n", 64 + (val / 2)); - printf("%s\n", &(pos[64+(val / 2)])); - fflush(stdout); - } - -} - -int main() { - int ret, ival; - char val; - char *pos = " *"; - while ((ret = read(0, &val, 1)) > 0) { - val = val >> 1; - // fprintf(stdout, "%d\n", *(signed char *)(&ival)); - // val = *(signed char *)(&ival); - // fprintf(stdout, "%s\n", &(pos[64+(val/2)])); - write(2,&val,1); - // fflush(stdout); - } - -}