X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=linux.c;h=d99c738fb9fcf95898896e063e8b38ef39ff7e56;hb=cf91699c89b88f76dcf63c60624635184e8cb7eb;hp=9bd3b13e45464f8b891b39e671bf08e429c526ad;hpb=b0629033955fcfdcd93a4a2cf3ab29e8adc56200;p=super-star-trek.git diff --git a/linux.c b/linux.c index 9bd3b13..d99c738 100644 --- a/linux.c +++ b/linux.c @@ -1,31 +1,8 @@ #include #include -#include void randomize(void) { srand((int)time(NULL)); } -int max(int a, int b) { - if (a > b) return a; - return b; -} - -int min(int a, int b) { - if (a < b) return a; - return b; -} - -int getch(void) { - char chbuf[1]; - struct termio oldstate, newstate; - ioctl(0,TCGETA,&oldstate); - newstate = oldstate; - newstate.c_iflag = 0; - newstate.c_lflag = 0; - ioctl(0,TCSETA,&newstate); - read(0, &chbuf, 1); - ioctl(0,TCSETA,&oldstate); -} -