From 320322cda9e1c76be8a89ef4329044a6a3f6a6ed Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 5 Dec 2005 22:13:35 +0000 Subject: [PATCH] (oops): Move declaration to misc.h, to make CANT_HAPPEN() usable with just misc.h included. --- include/misc.h | 1 + include/prototypes.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/misc.h b/include/misc.h index b0ccc0f2..418c1884 100644 --- a/include/misc.h +++ b/include/misc.h @@ -125,6 +125,7 @@ extern int daemonize; * Usage: if (CANT_HAPPEN(...)) recovery_code(); */ #define CANT_HAPPEN(expr) ((expr) ? oops(#expr, __FILE__, __LINE__) : 0) +extern int oops(char *, char *, int); /* return codes from command routines */ #define RET_OK 0 /* command completed sucessfully */ diff --git a/include/prototypes.h b/include/prototypes.h index d6dcedc1..d27ca584 100644 --- a/include/prototypes.h +++ b/include/prototypes.h @@ -307,7 +307,7 @@ extern int has_helpful_engineer(coord x, coord y, natid cn); /* log.c */ extern void loginit(char *); extern void logerror(char *, ...) ATTRIBUTE((format (printf, 1, 2))); -extern int oops(char *, char *, int); +/* more in misc.h */ /* maps.c */ extern int draw_map(int, s_char, int, struct nstr_sect *); extern int unit_map(int, int, struct nstr_sect *, s_char *);