commit - aa11eca684a663b40240f7c3a9c03dbba52b71f3
commit + 7b083439c7e85109a2af69c85c8246f9f841954c
blob - e5f8c12af2cc8ba216c95c2f06bd0051395d9913
blob + 12fb448bc1940fed94e6ce8c52d76b6f555c9837
--- input.c
+++ input.c
#include "input.h"
#include "tetris.h"
+#ifndef INFTIM
+# define INFTIM (-1)
+#endif
+
/* return true iff the given timeval is positive */
#define TV_POS(tv) \
((tv)->tv_sec > 0 || ((tv)->tv_sec == 0 && (tv)->tv_usec > 0))
blob - fa95b31e6c25c5800370bb1486a18a20d432fe7b
blob + d534524cba48817ba75d37d4ba7d12c0e947a4a2
--- scores.c
+++ scores.c
# include <sys/endian.h>
# define swap32 bswap32
# define swap64 bswap64
+#elif defined(__linux__)
+# include <sys/file.h>
+# define swap32 __builtin_bswap32
+# define swap64 __builtin_bswap64
#endif
#include "pathnames.h"
blob - 2d72aec8139ea1bec7842333eb2b6d211cf0037f
blob + 989fd9c34006a0427c83c3f6f423f2d974029987
--- scores.h
+++ scores.h
* @(#)scores.h 8.1 (Berkeley) 5/31/93
*/
+#include <stdint.h>
+
/*
* Tetris scores.
*/
blob - d3b23166dc311dd733a2b0475e594b12b069ea56
blob + 2d8f7ba65b67b7d4d84b83fc806170c2bc1c7541
--- screen.c
+++ screen.c
#ifndef sigmask
#define sigmask(s) (1 << ((s) - 1))
+#endif
+
+#ifdef __linux__
+# define OXTABS XTABS
#endif
#include "screen.h"
blob - 2a002e3a1dd99814ffc2607abb11c2d3918b2c9d
blob + 44c0df0a35e334b31885123fcc1ece0dff707656
--- tetris.c
+++ tetris.c
*/
#include <sys/cdefs.h>
-#if !defined(lint) && !defined(__OpenBSD__)
+#if !defined(lint) && !defined(__OpenBSD__) && !defined(__linux__)
__COPYRIGHT("@(#) Copyright (c) 1992, 1993\
The Regents of the University of California. All rights reserved.");
#endif /* not lint */
}
static void
-onintr(int signo __unused)
+onintr(int signo)
{
+ (void)signo;
scr_clear();
scr_end();
exit(0);
static void
usage(void)
{
- (void)fprintf(stderr, "usage: %s [-bps] [-k keys] [-l level]\n",
- getprogname());
+ (void)fprintf(stderr, "usage: tetris [-bps] [-k keys] [-l level]\n");
exit(1);
}