From 561bc466c7b3d0fd736f8ce7f29da07625f22e6b Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Mon, 18 Jan 2016 15:25:07 -0500 Subject: minor polishing --- src/globals.h | 4 ++-- src/room.h | 2 +- src/server.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/globals.h b/src/globals.h index 66088ed..eb04f2e 100644 --- a/src/globals.h +++ b/src/globals.h @@ -50,8 +50,8 @@ /* convenience macros */ #define ARRAYLEN(x) (sizeof(x)/sizeof(x[0])) -#define MAX(a,b) ((a>b)?(a):(b)) -#define MIN(a,b) ((a(b))?(a):(b)) +#define MIN(a,b) (((a)<(b))?(a):(b)) /* global constants */ #define USERFILE "users.dat" diff --git a/src/room.h b/src/room.h index d1cf510..68ee413 100644 --- a/src/room.h +++ b/src/room.h @@ -20,7 +20,7 @@ typedef enum room_id { ROOM_NONE = -1 } room_id; -typedef enum obj_id { OBJ_NONE = -1 } obj_id; +typedef unsigned __int128 obj_id; enum direction_t { DIR_N = 0, DIR_NE, DIR_E, DIR_SE, DIR_S, DIR_SW, DIR_W, DIR_NW, DIR_UP, DIR_DN, DIR_IN, DIR_OT, NUM_DIRECTIONS }; diff --git a/src/server.c b/src/server.c index ef82b57..c8fa8c3 100644 --- a/src/server.c +++ b/src/server.c @@ -178,7 +178,7 @@ static void load_worldfile(void) error("cannot access "WORLDFILE); else if(!world_load(WORLDFILE, netcosm_world, netcosm_world_sz, netcosm_world_name)) - error("Failed to load world from disk.\nTry removing "WORLDFILE".\n"); + error("Failed to load world from disk.\nTry removing "WORLDFILE"."); } static int server_bind(void) @@ -383,5 +383,5 @@ int main(int argc, char *argv[]) ev_loop(loop, 0); /* should never get here */ - error("unexpected termination"); + error("FIXME: unexpected termination"); } -- cgit v1.1