version 1.4.58b
[polyglot.git] / util.c
diff --git a/util.c b/util.c
index a3fb3ba..c2dec6b 100644 (file)
--- a/util.c
+++ b/util.c
@@ -202,7 +202,7 @@ void my_fatal(const char format[], ...) {
     // This should be gui_send but this does not work.\r
     // Why?\r
 \r
-    fprintf(stderr,"tellusererror POLYGLOT: %s",string);\r
+    printf("tellusererror POLYGLOT: %s",string);\r
 \r
     if (Error) { // recursive error\r
         my_log("POLYGLOT *** RECURSIVE ERROR ***\n");\r
@@ -514,3 +514,13 @@ void my_quote(char *out, const char *in, const char *special){
 }\r
 \r
 \r
+void my_sleep(int msec){\r
+#ifndef _WIN32\r
+  struct timespec tm;\r
+  tm.tv_sec=msec/1000;\r
+  tm.tv_nsec=1000000*(msec%1000);\r
+  nanosleep(&tm,NULL);\r
+#else\r
+  Sleep(msec);\r
+#endif\r
+}\r