aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-10-13 11:59:51 -0700
committerH. Peter Anvin <hpa@zytor.com>2018-10-13 11:59:51 -0700
commit26528487d997e0e8a707b22ad2e9e30326dcf189 (patch)
treef336850da04b6f612bb3db50687811156919ca54
parent54b65c2bb63335142a28cdb65196566d25711d82 (diff)
downloadgrv-26528487d997e0e8a707b22ad2e9e30326dcf189.tar.gz
grv-26528487d997e0e8a707b22ad2e9e30326dcf189.tar.xz
grv-26528487d997e0e8a707b22ad2e9e30326dcf189.zip
Windows fixes: min/max already defined; hyper is a macro
-rw-r--r--drawlevel.c4
-rw-r--r--grv.h8
2 files changed, 8 insertions, 4 deletions
diff --git a/drawlevel.c b/drawlevel.c
index 07968b9..30699ef 100644
--- a/drawlevel.c
+++ b/drawlevel.c
@@ -607,7 +607,7 @@ static void level_finale(void)
static void draw_hyper(void)
{
int i, j, e, z;
- static const char *hyper[] = {"H","Y","P","E","R"};
+ static const char *hyperspace[] = {"H","Y","P","E","R"};
/* Never skip the last level */
z = min((ELev-2)-gp.Level,5);
@@ -616,7 +616,7 @@ static void draw_hyper(void)
unbusy(i,j);
color(15,bg(i,j));
- lprint(i,j,hyper[e]);
+ lprint(i,j,hyperspace[e]);
}
}
diff --git a/grv.h b/grv.h
index 8583ed9..5c09b55 100644
--- a/grv.h
+++ b/grv.h
@@ -15,8 +15,12 @@
#include "graphics.h"
-#define min(x,y) ((x)<(y)?(x):(y))
-#define max(x,y) ((x)>(y)?(x):(y))
+#ifndef min
+# define min(x,y) ((x)<(y)?(x):(y))
+#endif
+#ifndef max
+# define max(x,y) ((x)>(y)?(x):(y))
+#endif
/* Get random bytes from the system */
int get_random_bytes(void *, int);