X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=c%2Fdreammachine%2Fstrobe.c;h=42dfece47ad4d62c2bd56773d92a8abf0fa3f537;hb=e7456ecee20cb11a084fbc7f64c1469bc1355fdc;hp=172130960e1a47789c5238d182684f42719ef1b4;hpb=1375f65d6d332f228e3e62831d42895bdff67423;p=mirrors%2FPrograms.git diff --git a/c/dreammachine/strobe.c b/c/dreammachine/strobe.c index 1721309..42dfece 100644 --- a/c/dreammachine/strobe.c +++ b/c/dreammachine/strobe.c @@ -9,9 +9,9 @@ #include #include #ifndef __WIN32__ - #include + #include #else - #include + #include #endif void signal_handler(int signo) { @@ -54,14 +54,16 @@ int main(int argc, char *argv[]) { fputs(state_a, stdout); fflush(stdout); usleep(half_interval); - #ifndef __WIN32__ - int fflags = fcntl(fileno(stdin), F_GETFL, 0); - fcntl(fileno(stdin), F_SETFL, fflags | O_NONBLOCK); +/* + #ifndef __WIN32__ + int fflags = fcntl(fileno(stdin), F_GETFL, 0); + fcntl(fileno(stdin), F_SETFL, fflags | O_NONBLOCK); while(getchar()) puts("."); - fcntl(fileno(stdin), F_SETFL, fflags); - #else - //WARNING! Somehow implement FILE_FLAG_OVERLAPPED & FILE_FLAG_NO_BUFFERING support on windows + fcntl(fileno(stdin), F_SETFL, fflags); + #else + //WARNING! Somehow implement FILE_FLAG_OVERLAPPED & FILE_FLAG_NO_BUFFERING support on windows #endif +*/ if(argc > 2) getchar(); //interactive strobe fputs(state_b, stdout); fflush(stdout);