OSDN Git Service

[Refactor] #40413 Removed type definition 'sint'
authorHourier <hourier@users.sourceforge.jp>
Sun, 14 Jun 2020 02:43:19 +0000 (11:43 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 14 Jun 2020 02:43:19 +0000 (11:43 +0900)
src/cmd-io/macro-util.c
src/cmd-io/macro-util.h
src/floor/floor.c
src/floor/floor.h
src/object/object-flavor.c
src/system/h-type.h
src/view/display-main-window.c

index 09d867e..dc5e35f 100644 (file)
@@ -23,7 +23,7 @@ static bool macro__use[256];
 /*
  * Find the macro (if any) which exactly matches the given pattern
  */
-sint macro_find_exact(concptr pat)
+int macro_find_exact(concptr pat)
 {
     if (!macro__use[(byte)(pat[0])]) {
         return -1;
@@ -42,7 +42,7 @@ sint macro_find_exact(concptr pat)
 /*
  * Find the first macro (if any) which contains the given pattern
  */
-sint macro_find_check(concptr pat)
+int macro_find_check(concptr pat)
 {
     if (!macro__use[(byte)(pat[0])]) {
         return -1;
@@ -61,7 +61,7 @@ sint macro_find_check(concptr pat)
 /*
  * Find the first macro (if any) which contains the given pattern and more
  */
-sint macro_find_maybe(concptr pat)
+int macro_find_maybe(concptr pat)
 {
     if (!macro__use[(byte)(pat[0])]) {
         return -1;
@@ -82,7 +82,7 @@ sint macro_find_maybe(concptr pat)
 /*
  * Find the longest macro (if any) which starts with the given pattern
  */
-sint macro_find_ready(concptr pat)
+int macro_find_ready(concptr pat)
 {
     int t, n = -1, s = -1;
 
index 01dcea9..63057b9 100644 (file)
@@ -6,8 +6,8 @@ extern concptr *macro__pat;
 extern concptr *macro__act;
 extern s16b macro__num;
 
-sint macro_find_exact(concptr pat);
-sint macro_find_check(concptr pat);
+int macro_find_exact(concptr pat);
+int macro_find_check(concptr pat);
 errr macro_add(concptr pat, concptr act);
-sint macro_find_maybe(concptr pat);
-sint macro_find_ready(concptr pat);
+int macro_find_maybe(concptr pat);
+int macro_find_ready(concptr pat);
index aba4ff3..1a9c5a3 100644 (file)
@@ -1145,7 +1145,7 @@ void vault_objects(player_type *player_ptr, POSITION y, POSITION x, int num)
  * by "update_view_los()", and very different from the one used by "los()".
  * </pre>
  */
-sint project_path(player_type *player_ptr, u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flg)
+int project_path(player_type *player_ptr, u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flg)
 {
        if ((x1 == x2) && (y1 == y2)) return 0;
 
index 9d655ba..25eb30f 100644 (file)
@@ -365,7 +365,7 @@ extern void try_door(player_type *player_ptr, POSITION y, POSITION x);
 extern FEAT_IDX conv_dungeon_feat(floor_type *floor_ptr, FEAT_IDX newfeat);
 extern void vault_objects(player_type *player_ptr, POSITION y, POSITION x, int num);
 
-extern sint project_path(player_type *player_ptr, u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flg);
+extern int project_path(player_type *player_ptr, u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flg);
 
 extern void set_floor(player_type *player_ptr, POSITION x, POSITION y);
 extern void place_object(player_type *owner_ptr, POSITION y, POSITION x, BIT_FLAGS mode);
index f1a3672..0edb63e 100644 (file)
@@ -595,7 +595,7 @@ char *object_desc_kosuu(char *t, object_type *o_ptr)
  * sprintf(t, "%+d", n), and return a pointer to the terminator.
  * Note that we always print a sign, either "+" or "-".
  */
-static char *object_desc_int(char *t, sint v)
+static char *object_desc_int(char *t, int v)
 {
        uint p, n;
 
index 9633e4f..f0270f2 100644 (file)
@@ -19,7 +19,6 @@
  * It must be true that char/byte takes exactly 1 byte
  * It must be true that sind/uind takes exactly 2 bytes
  * It must be true that sbig/ubig takes exactly 4 bytes
- * On Sparc's, a sint takes 4 bytes (2 is legal)
  * On Sparc's, a uint takes 4 bytes (2 is legal)
  * On Sparc's, a long takes 4 bytes (8 is legal)
  * On Sparc's, a huge takes 4 bytes (8 is legal)
@@ -64,7 +63,6 @@ typedef int errr;
 /* typedef signed char syte; */
 typedef unsigned char byte; /*!< byte型をunsighned charとして定義 / Note that unsigned values can cause math problems / An unsigned byte of memory */
 typedef char bool; /*!< bool型をcharとして定義 / Note that a bool is smaller than a full "int" / Simple True/False type */
-typedef int sint; /*!< sint型をintとして定義 / A signed, standard integer (at least 2 bytes) */
 typedef unsigned int uint; /* uint型をintとして定義 /  An unsigned, "standard" integer (often pre-defined) */
 
 /* The largest possible unsigned integer */
@@ -235,7 +233,6 @@ typedef s16b FEAT_PRIORITY; /*!< 地形の縮小表示優先順位 */
 /*** Pointers to all the basic types defined above ***/
 typedef char *char_ptr;
 typedef byte *byte_ptr;
-typedef sint *sint_ptr;
 
 /*** Pointers to Functions of special types (for various purposes) ***/
 /* A generic function takes a user data and a special data */
@@ -244,9 +241,6 @@ typedef errr        (*func_gen)(vptr, vptr);
 /* An equality testing function takes two things to compare (bool) */
 typedef bool   (*func_eql)(vptr, vptr);
 
-/* A comparison function takes two things and to compare (-1,0,+1) */
-typedef sint   (*func_cmp)(vptr, vptr);
-
 /* A hasher takes a thing (and a max hash size) to hash (0 to siz - 1) */
 typedef uint   (*func_hsh)(vptr, uint);
 
index 661167a..bc7aa84 100644 (file)
@@ -3427,7 +3427,7 @@ void display_map(player_type *player_ptr, int *cy, int *cx)
        C_MAKE(ma, (hgt + 2), TERM_COLOR *);
        C_MAKE(mc, (hgt + 2), char_ptr);
        C_MAKE(mp, (hgt + 2), byte_ptr);
-       C_MAKE(match_autopick_yx, (hgt + 2), sint_ptr);
+       C_MAKE(match_autopick_yx, (hgt + 2), int*);
        C_MAKE(object_autopick_yx, (hgt + 2), object_type **);
 
        /* Allocate and wipe each line map */