From: PatR Date: Wed, 18 Nov 2015 08:45:03 +0000 (-0800) Subject: fix for pre-ANSI compilers X-Git-Tag: NetHack-3.6.0_RC01~54^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3583587f1cdc0d76e62eb7283e0910f417c854bf;p=nethack fix for pre-ANSI compilers Declare a function pointer without requiring support for prototypes. Plus a couple of formatting tidbits. --- diff --git a/src/sp_lev.c b/src/sp_lev.c index c2350f9dc..6b555b66b 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 sp_lev.c $NHDT-Date: 1446887534 2015/11/07 09:12:14 $ $NHDT-Branch: master $:$NHDT-Revision: 1.70 $ */ +/* NetHack 3.6 sp_lev.c $NHDT-Date: 1447836300 2015/11/18 08:45:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.73 $ */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -18,7 +18,7 @@ #pragma warning(disable : 4244) #endif -typedef void (*select_iter_func)(int, int, genericptr_t); +typedef void FDECL((*select_iter_func), (int, int, genericptr_t)); extern void FDECL(mkmap, (lev_init *)); @@ -484,7 +484,8 @@ struct opvar *ov; while (tmp) { if (!strcmp(tmp->name, OV_s(ov))) { if ((tmp->svtyp & SPOVAR_ARRAY)) { - array_idx = opvar_var_conversion(coder, splev_stack_pop(coder->stack)); + array_idx = opvar_var_conversion(coder, + splev_stack_pop(coder->stack)); if (!array_idx || OV_typ(array_idx) != SPOVAR_INT) panic("array idx not an int"); if (tmp->array_len < 1) @@ -3797,7 +3798,7 @@ boolean diagonals; } while (0) #define SEL_FLOOD_CHKDIR(mx,my,sel) \ if (isok((mx), (my)) \ - && (*selection_flood_check_func)((mx),(my)) \ + && (*selection_flood_check_func)((mx), (my)) \ && !selection_getpoint((mx), (my), (sel))) \ SEL_FLOOD((mx), (my)) static const char floodfill_stack_overrun[] = "floodfill stack overrun";