[SCM] Packaging for sauerbraten game engine branch, master, updated. debian/0.0.20100728.dfsg-5-4-g0aaf4e5
Bruno Kleinert
fuddl at tauware.de
Tue Jun 21 15:36:29 UTC 2011
The following commit has been merged in the master branch:
commit 4ef767ecef5082b5eb295a101f87aa8a7edd665a
Author: Bruno Kleinert <fuddl at tauware.de>
Date: Fri Jun 10 16:04:56 2011 +0200
Imported Upstream version 0.0.20100728.dfsg+repack
diff --git a/include/wincompat.h b/include/wincompat.h
deleted file mode 100644
index 3bdbc4f..0000000
--- a/include/wincompat.h
+++ /dev/null
@@ -1,81 +0,0 @@
-#if !defined(WINCOMPAT_INCLUDED) && !defined(PLATFORM_WINDOWS) && !defined(WIN32) && !defined(WINDOWS) && !defined(__WIN32__)
-#define WINCOMPAT_INCLUDED
-
-/**
- *
- * Author: Magnus Naeslund (mag at fbab.net, mag at bahnhof.se)
- * (c) 2000 Magnus Naeslund, all rights reserved
- *
- */
-
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <termios.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifndef TRUE
- #define TRUE 1
-#endif
-#ifndef FALSE
- #define FALSE 0
-#endif
-
-#define _kbhit kbhit
-#define stricmp strcasecmp
-#define strnicmp strncasecmp
-
-#define Sleep(x) usleep((x)*1000)
-
-static int inited=0;
-static struct termios ori;
-
-static void tcatexit(){
- tcsetattr(0,0,&ori);
-}
-
-static void init_terminal(){
- struct termios t;
- tcgetattr(0,&t);
- tcgetattr(0,&ori);
- t.c_lflag &= ~(ICANON);
- tcsetattr(0,0,&t);
- atexit(tcatexit);
-}
-
-static inline int kbhit(){
- fd_set rfds;
- struct timeval tv;
-
- if (!inited){
- inited=1;
- init_terminal();
- }
-
- FD_ZERO(&rfds);
- FD_SET(0, &rfds);
- tv.tv_sec = 0;
- tv.tv_usec = 10*1000;
- return select(1, &rfds, NULL, NULL, &tv)>0;
-}
-
-static inline int getch(){
- fd_set rfds;
-
- if (!inited){
- inited=1;
- init_terminal();
- }
-
- FD_ZERO(&rfds);
- FD_SET(0, &rfds);
- if (select(1, &rfds, NULL, NULL, NULL)>0)
- return getchar();
- else{
- printf("wincompat.h: select() on fd 0 failed\n");
- return 0xDeadBeef;
- }
-}
-
-#endif
--
Packaging for sauerbraten game engine
More information about the Pkg-games-commits
mailing list