]> granicus.if.org Git - nethack/commitdiff
More hypothetical type mismatches
authorPasi Kallinen <paxed@alt.org>
Sun, 15 Nov 2020 11:51:47 +0000 (13:51 +0200)
committerPasi Kallinen <paxed@alt.org>
Sun, 15 Nov 2020 11:51:47 +0000 (13:51 +0200)
include/extern.h
include/patchlevel.h
include/rm.h
src/nhlsel.c
src/sp_lev.c

index 74de4f1e79afba60f927af71e7ee3bd31a559dca..43e81cf25558f69d581fcd9571474d9203ed8070 100644 (file)
@@ -2502,12 +2502,12 @@ E void FDECL(get_location_coord, (xchar *, xchar *, int, struct mkroom *,
 E void FDECL(selection_setpoint, (int, int, struct selectionvar *, XCHAR_P));
 E struct selectionvar * FDECL(selection_not, (struct selectionvar *));
 E void FDECL(selection_filter_percent, (struct selectionvar *, int));
-E int FDECL(selection_rndcoord, (struct selectionvar *, schar *, schar *,
+E int FDECL(selection_rndcoord, (struct selectionvar *, xchar *, xchar *,
                                  BOOLEAN_P));
 E void FDECL(selection_do_grow, (struct selectionvar *, int));
-E void FDECL(selection_do_line, (SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P,
+E void FDECL(selection_do_line, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
                                  struct selectionvar *));
-E void FDECL(selection_do_randline, (SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P,
+E void FDECL(selection_do_randline, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
                                      SCHAR_P, SCHAR_P, struct selectionvar *));
 E struct selectionvar *FDECL(selection_filter_mapchar, (struct selectionvar *,
                                                         XCHAR_P, int));
index 5e1557d7921c74b21afd660c4eb39cf26d14804a..a6d3fba0055d582bc860ee021e34f0136680b345 100644 (file)
@@ -17,7 +17,7 @@
  * Incrementing EDITLEVEL can be used to force invalidation of old bones
  * and save files.
  */
-#define EDITLEVEL 26
+#define EDITLEVEL 27
 
 /*
  * Development status possibilities.
index b555124394b93773c2ca931f90b92146cb689fa7..3d303a5c42171413344fd9f7b26b2d12eba4f306 100644 (file)
@@ -544,7 +544,7 @@ struct cemetery {
     /* date+time in string of digits rather than binary */
     char when[4 + 2 + 2 + 2 + 2 + 2 + 1]; /* "YYYYMMDDhhmmss\0" */
     /* final resting place spot */
-    schar frpx, frpy;
+    xchar frpx, frpy;
     boolean bonesknown;
 };
 
index 953b7c241e61863b090c990ec37c75ba7eff3599..bfe09db3efa58ef97b54929677db7f1376873955 100644 (file)
@@ -318,7 +318,7 @@ lua_State *L;
 {
     struct selectionvar *sel = l_selection_check(L, 1);
     int removeit = (int) luaL_optinteger(L, 2, 0);
-    schar x, y;
+    xchar x, y;
     selection_rndcoord(sel, &x, &y, removeit);
     update_croom();
     if (g.coder && g.coder->croom) {
@@ -739,7 +739,7 @@ lua_State *L;
     struct selectionvar *sel = (struct selectionvar *) 0;
     /* if x2 and y2 aren't set, the gradient has a single center point of x,y;
      * if they are set, the gradient is centered on a (x,y) to (x2,y2) line */
-    schar x = 0, y = 0, x2 = -1, y2 = -1;
+    xchar x = 0, y = 0, x2 = -1, y2 = -1;
     /* points will not be added within mindist of the center; the chance for a
      * point between mindist and maxdist to be added to the selection starts at
      * 0% at mindist and increases linearly to 100% at maxdist */
@@ -758,10 +758,10 @@ lua_State *L;
     if (argc == 1 && lua_type(L, 1) == LUA_TTABLE) {
         lcheck_param_table(L);
         type = gradtypes2i[get_table_option(L, "type", "radial", gradtypes)];
-        x = (schar) get_table_int(L, "x");
-        y = (schar) get_table_int(L, "y");
-        x2 = (schar) get_table_int_opt(L, "x2", -1);
-        y2 = (schar) get_table_int_opt(L, "y2", -1);
+        x = (xchar) get_table_int(L, "x");
+        y = (xchar) get_table_int(L, "y");
+        x2 = (xchar) get_table_int_opt(L, "x2", -1);
+        y2 = (xchar) get_table_int_opt(L, "y2", -1);
         /* maxdist is required because there's no obvious default value for it,
          * whereas mindist has an obvious defalt of 0 */
         maxdist = get_table_int(L, "maxdist");
index c03d08f260ca605d75d4993dd3440d40f2fd2174..cb81076c629f8ae6b84fad0f589e0baa906ac12b 100755 (executable)
@@ -43,7 +43,7 @@ static void NDECL(link_doors_rooms);
 static int NDECL(rnddoor);
 static int NDECL(rndtrap);
 static void FDECL(get_location, (xchar *, xchar *, int, struct mkroom *));
-static boolean FDECL(is_ok_location, (SCHAR_P, SCHAR_P, int));
+static boolean FDECL(is_ok_location, (XCHAR_P, XCHAR_P, int));
 static unpacked_coord FDECL(get_unpacked_coord, (long, int));
 static void FDECL(get_room_loc, (xchar *, xchar *, struct mkroom *));
 static void FDECL(get_free_room_loc, (xchar *, xchar *,
@@ -1145,7 +1145,7 @@ struct mkroom *croom;
 
 static boolean
 is_ok_location(x, y, humidity)
-register schar x, y;
+register xchar x, y;
 register int humidity;
 {
     register int typ;
@@ -2793,7 +2793,7 @@ int humidity;
         if (--tryct < 0)
             break; /* give up */
     } while (!(x % 2) || !(y % 2) || SpLev_Map[x][y]
-             || !is_ok_location((schar) x, (schar) y, humidity));
+             || !is_ok_location((xchar) x, (xchar) y, humidity));
 
     m->x = (xchar) x, m->y = (xchar) y;
 }
@@ -4361,7 +4361,7 @@ int percent;
 int
 selection_rndcoord(ov, x, y, removeit)
 struct selectionvar *ov;
-schar *x, *y;
+xchar *x, *y;
 boolean removeit;
 {
     int idx = 0;
@@ -4712,7 +4712,7 @@ long x, y, x2, y2, gtyp, mind, maxd, limit;
 /* bresenham line algo */
 void
 selection_do_line(x1, y1, x2, y2, ov)
-schar x1, y1, x2, y2;
+xchar x1, y1, x2, y2;
 struct selectionvar *ov;
 {
     int d0, dx, dy, ai, bi, xi, yi;
@@ -4766,7 +4766,8 @@ struct selectionvar *ov;
 
 void
 selection_do_randline(x1, y1, x2, y2, rough, rec, ov)
-schar x1, y1, x2, y2, rough, rec;
+xchar x1, y1, x2, y2;
+schar rough, rec;
 struct selectionvar *ov;
 {
     int mx, my;
@@ -5208,7 +5209,7 @@ struct selectionvar *ov;
         WAN_TELEPORTATION, SCR_TELEPORTATION, RIN_TELEPORTATION
     };
     struct selectionvar *ov2 = selection_new(), *ov3;
-    schar x, y;
+    xchar x, y;
     boolean res = TRUE;
 
     selection_floodfill(ov2, nx, ny, TRUE);