X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=os2.c;h=1670895bbe5e753e80ef0b9bd2c0c5ed98646541;hb=54681963a8c78e9587e72af03772dcb4ca6b30e5;hp=c6a7835d36a926aaf02b1209da66add44b6cb8b3;hpb=b0629033955fcfdcd93a4a2cf3ab29e8adc56200;p=super-star-trek.git diff --git a/os2.c b/os2.c index c6a7835..1670895 100644 --- a/os2.c +++ b/os2.c @@ -1,31 +1,6 @@ #include #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); -} \ No newline at end of file