]> git.pond.sub.org Git - empserver/commitdiff
(s_char): Remove. Use signed char for small integers, plain char for
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 29 Apr 2006 16:25:17 +0000 (16:25 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 29 Apr 2006 16:25:17 +0000 (16:25 +0000)
characters.

41 files changed:
doc/coding
include/common.h
include/gen.h
include/genitem.h
include/ioqueue.h
include/land.h
include/loan.h
include/map.h
include/misc.h
include/nat.h
include/news.h
include/nuke.h
include/plane.h
include/prototypes.h
include/ship.h
include/tel.h
include/treaty.h
src/lib/commands/cens.c
src/lib/commands/cons.c
src/lib/commands/map.c
src/lib/commands/marc.c
src/lib/commands/navi.c
src/lib/commands/shar.c
src/lib/common/maps.c
src/lib/gen/io.c
src/lib/gen/ioqueue.c
src/lib/subs/aircombat.c
src/lib/subs/attsub.c
src/lib/subs/bigmap.c
src/lib/subs/lndsub.c
src/lib/subs/mission.c
src/lib/subs/plnsub.c
src/lib/subs/radmap.c
src/lib/subs/satmap.c
src/lib/subs/shpsub.c
src/lib/subs/snxtitem.c
src/lib/update/land.c
src/lib/update/mobility.c
src/lib/update/plane.c
src/scripts/indent-emp
src/server/update.c

index cbf1a63008214e5b4c6c8bea5d6bb741d1a8447a..179a96c203dc4711831f3f92bc7d2af7d8d04309 100644 (file)
@@ -334,8 +334,6 @@ FIXME reserved names
 
 FIXME conditional compilation is a last resort
 
-FIXME s_char
-
 
 Robustness
 ----------
index 1e58c910e36c0e6bec7bd95c203cc65188ee47ba..d4d42f5015fb4125e690ca30cb532bb9a4bd8d7a 100644 (file)
@@ -35,7 +35,7 @@
 #define COMMON_H
 
 #include <stdio.h>             /* FILE */
-#include "misc.h"              /* s_char coord natid */
+#include "misc.h"
 #include "sect.h"              /* struct sctstr */
 #include "ship.h"              /* struct shpstr */
 #include "land.h"              /* struct lndstr */
index 3faef5bb5bbae285d2e3be873d7303bc39f5492c..e8d2ede07f6e6841125bd0e490008089da7748c4 100644 (file)
@@ -35,7 +35,7 @@
 #define GEN_H
 
 #include <stdlib.h>            /* atoi etc. */
-#include "misc.h"              /* s_char etc */
+#include "misc.h"
 #include "xy.h"                        /* struct range */
 #include "prototypes.h"                /* must come at end, after defines and typedefs */
 
index 8022959e768faff82e6f5ad5a4dadff88497180e..7e14d960a307516a5bbbe0ff54e27b8204cd911a 100644 (file)
@@ -47,11 +47,11 @@ struct genitem {
     short uid;
     coord x;
     coord y;
-    s_char type;
-    s_char effic;
-    s_char mobil;
+    signed char type;
+    signed char effic;
+    signed char mobil;
     short tech;
-    s_char group;
+    char group;
     coord opx, opy;
     short mission;
     short radius;
index d8b78bbfe1c4981f91ffc5f39f0fde5c4331b6ad..515db71aeb473f737a6e94e2ac4926a8d048fc0d 100644 (file)
@@ -39,7 +39,7 @@ struct io {
     int size;
     int nbytes;
     int offset;
-    s_char *data;
+    char *data;
 };
 
 struct ioqueue {
index beb5d4df2cc241994d50f20597f1c4d2bc6d948f..02cd94b4a1c4389e5ee29649020725552a78cdd4 100644 (file)
@@ -54,18 +54,18 @@ struct lndstr {
     short lnd_uid;             /* unit id (land unit) */
     coord lnd_x;               /* x location in abs coords */
     coord lnd_y;               /* y location in abs coords */
-    s_char lnd_type;           /* index in lchr[] */
-    s_char lnd_effic;          /* 0% to 100% */
-    s_char lnd_mobil;          /* mobility units made int for RS/6000 */
+    signed char lnd_type;      /* index in lchr[] */
+    signed char lnd_effic;     /* 0% to 100% */
+    signed char lnd_mobil;     /* mobility units */
     short lnd_tech;            /* tech level ship was built at */
-    s_char lnd_army;           /* group membership */
+    char lnd_army;             /* group membership */
     coord lnd_opx, lnd_opy;    /* Op sector coords */
     short lnd_mission;         /* mission code */
     short lnd_radius;          /* mission radius */
     /* end of part matching struct genitem */
-    s_char lnd_flags;          /* unit flags (unused) */
+    signed char lnd_flags;     /* unit flags (unused) */
     short lnd_ship;            /* pointer to transporting ship */
-    s_char lnd_harden;         /* for missiles */
+    signed char lnd_harden;    /* fortification */
     short lnd_retreat;         /* retreat percentage */
     unsigned char lnd_fuel;    /* How much fuel do we have */
     unsigned char lnd_nxlight; /* How many xlight planes on board? */
index f2e2ff0149d61bcc163a8055357b29b0b5402e07..60949b4f5af4ee7ce739497552ecab3715b97854 100644 (file)
@@ -42,7 +42,7 @@ struct lonstr {
     natid l_loner;             /* loan shark */
     short l_uid;
     natid l_lonee;             /* sucker */
-    s_char l_status;           /* loan status */
+    signed char l_status;      /* loan status */
     short l_sell;              /* pointer to trade file (unused) */
     int l_irate;               /* interest rate */
     int l_ldur;                        /* intended duration */
index 249b8339a7e8ec151ca99f7dc20b0eb4b0be37c4..386eee125a3076d70af0f7f9ef2f627909b7e331 100644 (file)
@@ -41,7 +41,7 @@
 
 extern void blankfill(char *, struct range *, int);
 /* src/lib/subs/border.c */
-extern int map_set(natid, coord, coord, s_char, int);
+extern int map_set(natid, coord, coord, char, int);
 extern void writebmap(natid);
 extern void writemap(natid);
 /* src/lib/subs/border.c */
index d476f4d1b02a4188e8d747f0be5ccb56e11537e9..f3603ce6f8222dcc3cea3a5766bfe94936e05f9c 100644 (file)
@@ -87,16 +87,6 @@ struct mob_acc_globals {
 
 typedef unsigned char natid;   /* NSC_NATID must match this */
 
-/*
- * TODO s_char has to go.  Use plain char for characters and strings,
- * signed char for small integers.
- */
-#ifdef __CHAR_UNSIGNED__
-typedef signed char s_char;
-#else
-typedef char s_char;
-#endif
-
 typedef short coord;
 
 #ifndef bit
index ea65cb77b7e8a7d0ce2aab8df48eda0727f41d7d..7e6367acb600c80afee2c50d4bef95683730d833 100644 (file)
@@ -98,8 +98,8 @@ struct natstr {
     char nat_userid[32];       /* userid of last user, may be empty */
     coord nat_xcap, nat_ycap;  /* cap location in abs coords */
     coord nat_xorg, nat_yorg;  /* origin location in abs coords */
-    s_char nat_dayno;          /* day of the year mod 128 */
-    s_char nat_update;         /* Want an update or not. */
+    signed char nat_dayno;     /* day of the year mod 128 */
+    signed char nat_update;    /* Want an update or not. */
     unsigned char nat_missed;  /* How many updates missed */
     unsigned short nat_tgms;   /* # of telegrams to be announced */
     unsigned short nat_ann;    /* # of annos pending */
@@ -115,7 +115,7 @@ struct natstr {
     short nat_relate[MAXNOC];
     unsigned char nat_contact[MAXNOC];
     short nat_rejects[(MAXNOC + 3) / 4]; /* four bits for each country */
-    s_char nat_priorities[PRI_MAX+1]; /* budget priority */
+    signed char nat_priorities[PRI_MAX+1]; /* budget priority */
     long nat_flags;            /* nation flags */
     char nat_spare[15];
 };
index 313290d52a45077d4d6be41ff1238b01934892f4..2ad1df3b6b71fe7912d10108601175e7b5b397d4 100644 (file)
@@ -47,9 +47,9 @@ struct nwsstr {
     short ef_type;
     natid nws_ano;             /* "actor" country # */
     short nws_uid;             /* unused */
-    s_char nws_vrb;            /* action (verb) */
+    signed char nws_vrb;       /* action (verb) */
     natid nws_vno;             /* "victim" country # */
-    s_char nws_ntm;            /* number of times */
+    signed char nws_ntm;       /* number of times */
     time_t nws_when;           /* time of action */
 };
 
index 6115e9f2b06c6f79a226dbe1a66e5bfe20813d0e..054c3480bd9760a2ae38bce14b93649fe65f2cb7 100644 (file)
@@ -45,7 +45,7 @@ struct nukstr {
     coord nuk_x;               /* current loc of device */
     coord nuk_y;
     /* end of part matching struct genitem */
-    s_char nuk_n;              /* number of nukes in list */
+    signed char nuk_n;         /* number of nukes in list */
     short nuk_ship;            /* currently aboard ship (unused) */
     short nuk_trade;           /* index into trade file (unused) */
     short nuk_types[N_MAXNUKE];        /* # of nukes in sector of given type */
index 3f556c33792e358156142ff0871894e4df018e74..5b573afa4462725b7bc8761a90d7709a07334524 100644 (file)
@@ -53,11 +53,11 @@ struct plnstr {
     short pln_uid;             /* plane unit id */
     coord pln_x;               /* plane x-y */
     coord pln_y;
-    s_char pln_type;           /* index in plchr[] */
-    s_char pln_effic;          /* actually "training" */
-    s_char pln_mobil;          /* plane mobility */
+    signed char pln_type;      /* index in plchr[] */
+    signed char pln_effic;     /* actually "training" */
+    signed char pln_mobil;     /* plane mobility */
     short pln_tech;            /* plane's tech level */
-    s_char pln_wing;           /* like fleet */
+    char pln_wing;             /* like fleet */
     coord pln_opx;             /* Op sector coords */
     coord pln_opy;             /* Op sector coords */
     short pln_mission;         /* mission code */
@@ -72,9 +72,9 @@ struct plnstr {
     int pln_acc;
     int pln_load;
     int pln_fuel;              /* (unused) */
-    s_char pln_harden;         /* for missiles */
-    s_char pln_nuketype;       /* type of nuclear armament (if any) */
-    s_char pln_flags;          /* State of the plane */
+    signed char pln_harden;    /* for missiles */
+    signed char pln_nuketype;  /* type of nuclear armament (if any) */
+    signed char pln_flags;     /* State of the plane */
     time_t pln_access;         /* Last time mob was updated (MOB_ACCESS) */
     time_t pln_timestamp;      /* Last time this plane was touched */
     float pln_theta;           /* position in orbital sine wave */
index 97559e7e183075202cdd4467af1d32dcbfe641d5..f78a3b81c937da0d86c85ae3901db70c72ae933e 100644 (file)
@@ -309,8 +309,8 @@ extern void loginit(char *);
 extern void logerror(char *, ...) ATTRIBUTE((format (printf, 1, 2)));
 /* 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 *);
+extern int draw_map(int, char, int, struct nstr_sect *);
+extern int unit_map(int, int, struct nstr_sect *, char *);
 extern int bmaps_intersect(natid, natid);
 extern int share_bmap(natid, natid, struct nstr_sect *, char, char *);
 /* move.c */
@@ -340,7 +340,7 @@ extern void snxtitem_area(struct nstr_item *, int,
 extern void snxtitem_dist(struct nstr_item *, int, int, int, int);
 extern void snxtitem_xy(struct nstr_item *, int, coord, coord);
 extern void snxtitem_all(struct nstr_item *, int);
-extern void snxtitem_group(struct nstr_item *, int, s_char);
+extern void snxtitem_group(struct nstr_item *, int, char);
 extern void snxtitem_rewind(struct nstr_item *);
 extern int snxtitem_list(struct nstr_item *, int, int *, int);
 /* snxtsect_subs.c */
@@ -510,8 +510,7 @@ extern int islist(char *);
 extern char *mission_name(short);
 extern char *nameofitem(struct genitem *, int);
 extern int collateral_damage(coord, coord, int, struct emp_qelem *);
-extern int mission_pln_equip(struct plist *, struct ichrstr *, int,
-                            s_char);
+extern int mission_pln_equip(struct plist *, struct ichrstr *, int, char);
 extern int ground_interdict(coord, coord, natid, char *);
 extern int unit_interdict(coord, coord, natid, char *, int, int);
 extern int off_support(coord, coord, natid, natid);
@@ -589,7 +588,7 @@ extern void count_land_planes(struct lndstr *);
 extern int count_sect_planes(struct sctstr *);
 extern int put_plane_on_land(struct plnstr *, struct lndstr *);
 extern int pln_hitchance(struct plnstr *, int, int);
-extern int pln_damage(struct plnstr *, coord, coord, s_char, int *, int);
+extern int pln_damage(struct plnstr *, coord, coord, char, int *, int);
 extern int pln_identchance(struct plnstr *, int, int);
 extern void pln_set_tech(struct plnstr *, int);
 /* pr.c */
index 41ba7cd5948b5e13ddbe8aaea008f2e53d1e120e..feb6526abffd5931059edbf97177e1dc98b41974 100644 (file)
@@ -66,11 +66,11 @@ struct shpstr {
     short shp_uid;             /* unit id (ship #) */
     coord shp_x;               /* x location in abs coords */
     coord shp_y;               /* y location in abs coords */
-    s_char shp_type;           /* index in mchr[] */
-    s_char shp_effic;          /* 0% to 100% */
-    s_char shp_mobil;          /* mobility units */
+    signed char shp_type;      /* index in mchr[] */
+    signed char shp_effic;     /* 0% to 100% */
+    signed char shp_mobil;     /* mobility units */
     short shp_tech;            /* tech level ship was built at */
-    s_char shp_fleet;          /* group membership */
+    char shp_fleet;            /* group membership */
     coord shp_opx, shp_opy;    /* Op sector coords */
     short shp_mission;         /* mission code */
     short shp_radius;          /* mission radius */
@@ -117,7 +117,7 @@ struct fltelemstr {
 
 struct fltheadstr {
     int leader;
-    s_char real_q;
+    signed char real_q;
 /* defines for the real_q member */
 #define        LEADER_VIRTUAL  0
 #define        LEADER_REAL     1
index 4b090603e57c58c659140032d2a9bbcbd9c5f2df..130210d8d95c3223420355ce80aa60a3576dddb3 100644 (file)
@@ -46,7 +46,7 @@
 
 struct telstr {
     natid tel_from;            /* sender */
-    s_char tel_type;
+    signed char tel_type;
     long tel_length;           /* how long */
     time_t tel_date;           /* when sent */
 };
index da5be58e2e985ee06cea4587b62aea80f68424f9..d5fc59974b90ec2dfd002f9e52bf42697fae23a1 100644 (file)
@@ -39,8 +39,8 @@ struct trtstr {
     natid trt_cna;             /* proposer */
     short trt_uid;
     natid trt_cnb;             /* acceptor */
-    s_char trt_status;         /* treaty status */
-    s_char trt_fill;
+    signed char trt_status;    /* treaty status */
+    char trt_fill;
     short trt_acond;           /* conditions for proposer */
     short trt_bcond;           /* conditions for accepter */
     float trt_bond;            /* amount of bond involved (unused) */
index b0f61b319324f038a0bdf6ad5f44f41d34571d72..5366f6cc2907d784b270dafe4b00b8e7ce17025b 100644 (file)
@@ -47,7 +47,7 @@ cens(void)
     int nsect;
     int n;
     struct nstr_sect nstr;
-    s_char dirstr[20];
+    char dirstr[20];
 
     if (!snxtsct(&nstr, player->argp[1]))
        return RET_SYN;
index f20e8e890930125185abf1ba7696303ee2a1e04a..7ed3ae73557f33bd50faa026c8482ec5b8a19e34 100644 (file)
@@ -56,7 +56,7 @@ struct ltcomstr {
     natid proposer;            /* country offering */
     natid proposee;            /* country offered to */
     natid mailee;              /* who gets mail about it */
-    s_char op;                 /* 'a', 'd', or 'p' */
+    char op;                   /* 'a', 'd', or 'p' */
     union {
        struct lonstr l;        /* the loan */
        struct trtstr t;        /* the treaty */
index 7f0505b40c76e9ed91ca389652c27b508a190ca9..71977fe1e7cee694d945f67faf12866cba3bce94 100644 (file)
@@ -53,7 +53,7 @@ map(void)
     int unit_type = 0;
     int bmap = 0;
     struct nstr_sect ns;
-    s_char origin = '\0';
+    char origin = '\0';
     int map_flags = 0;
 
     if (**player->argp != 'm') {
index 41bc9fc897d302b6d1e3d846e12837a855309d64..25934c664e1dc0ab2185f3aa30e9640ae36c0a69 100644 (file)
@@ -57,7 +57,7 @@ march(void)
     char *cp = 0;
     struct lndstr *lnd = 0;    /* leader */
     struct nstr_sect ns;
-    s_char origin;
+    char origin;
     int dir;
     int stopping = 0;
     int skip = 0;
index ad7de0638abce71a40959aaae041e9df0bd2bfcd..68785283826abd55144616a94148564b0ad3e293 100644 (file)
@@ -59,7 +59,7 @@ navi(void)
     char *cp = 0;
     struct shpstr *shp = 0;    /* flagship */
     struct nstr_sect ns;
-    s_char origin;
+    char origin;
     int dir;
     int stopping = 0;
     int skip = 0;
index 9cabbaa8547e460b06e1bd43c59c21ed77f91d48..898454845a4709b8f1f12105839af16b2422d6db 100644 (file)
@@ -45,7 +45,7 @@ shar(void)
 {
     int to;
     struct nstr_sect ns;
-    s_char des = 0;
+    char des = 0;
     int n;
 
     to = natarg(player->argp[1], "Share bmap with which country? ");
index b19640dc2e8da4b40879d7c019e369952d148935..796c642f47047142119cbe1ff8d72f4e56f96ade 100644 (file)
@@ -54,7 +54,7 @@ static int bmnxtsct(struct nstr_sect *);
 static char map_char(unsigned char type, natid own, int owner_or_god);
 
 int
-draw_map(int bmap, s_char origin, int map_flags, struct nstr_sect *nsp)
+draw_map(int bmap, char origin, int map_flags, struct nstr_sect *nsp)
 {
     struct natstr *np;
     struct range range;
@@ -302,7 +302,7 @@ map_char(unsigned char type, natid own, int owner_or_god)
 }
 
 int
-unit_map(int unit_type, int uid, struct nstr_sect *nsp, s_char *originp)
+unit_map(int unit_type, int uid, struct nstr_sect *nsp, char *originp)
 {
     struct shpstr origs;
     struct lndstr origl;
@@ -339,8 +339,8 @@ unit_map(int unit_type, int uid, struct nstr_sect *nsp, s_char *originp)
 int
 bmaps_intersect(natid a, natid b)
 {
-    s_char *mapa = ef_ptr(EF_MAP, a);
-    s_char *mapb = ef_ptr(EF_MAP, b);
+    char *mapa = ef_ptr(EF_MAP, a);
+    char *mapb = ef_ptr(EF_MAP, b);
     int i;
 
     for (i = 0; i < WORLD_X * WORLD_Y / 2; ++i, ++mapa, ++mapb)
index fabeb997ce313058bf0862cc57376df096099b40..76fd102505b533539ff346d0becc50150e38bd8a 100644 (file)
@@ -194,7 +194,7 @@ io_output(struct iop *iop, int waitforoutput)
 #if !defined(_WIN32)
     struct iovec iov[16];
 #else
-    s_char buf[IO_BUFSIZE];
+    char buf[IO_BUFSIZE];
 #endif
     int cc;
     int n;
index 78d02393b985322e25a42c46556a503330089b41..adb96010a31256b6676fe0d2b45ca3c4d0b05a77 100644 (file)
@@ -225,9 +225,9 @@ ioqtobuf(struct ioqueue *ioq, char *buf, int cc)
 static int
 ioqtocbuf(struct ioqueue *ioq, char *buf, int cc, register int stopc)
 {
-    register int nbytes;
-    register s_char *p;
-    register int n;
+    int nbytes;
+    char *p;
+    int n;
     struct io *io;
     struct emp_qelem *qp;
     struct emp_qelem *head;
@@ -298,7 +298,7 @@ appendcc(struct ioqueue *ioq, char *buf, int cc)
 {
     struct io *io;
     int len;
-    s_char *ptr;
+    char *ptr;
     int avail;
 
     /* determine if any space is left */
@@ -389,7 +389,7 @@ ioq_makebuf(struct ioqueue *ioq, char *pBuf, int nBufLen)
     int nbytes;
     int nleft;
     int ncopied;
-    s_char *offset;
+    char *offset;
 
     ncopied = 0;
     nleft = nBufLen;
index aeff1584696382358ea82a334cde886ba821c5d2..c47fd354868a96f1c659cc9301eabdc5218a655a 100644 (file)
@@ -702,7 +702,6 @@ ac_planedamage(struct plist *plp, natid from, int dam, natid other,
     int eff;
     struct shpstr ship;
     struct lndstr land;
-    /* s_char *sprintf();           already in misc.h [JFW] */
     natid plane_owner;
 
     disp = 0;
index 29f39059b600a5c63fa72e23c81b560bb5157637..5ef75ca5adf2d0b8d20c71842100a2e5229b4731 100644 (file)
@@ -58,7 +58,7 @@
 
 static void ask_olist(int combat_mode, struct combat *off,
                      struct combat *def, struct emp_qelem *olist,
-                     s_char *land_answer, int *a_spyp, int *a_engineerp);
+                     char *land_answer, int *a_spyp, int *a_engineerp);
 static void take_move_in_mob(int combat_mode, struct llist *llp,
                             struct combat *off, struct combat *def);
 static void move_in_land(int combat_mode, struct combat *off,
@@ -382,7 +382,7 @@ put_combat(struct combat *com)
            if (com->mob - com->mobcost < -127)
                land.lnd_mobil = -127;
            else
-               land.lnd_mobil = (s_char)(com->mob - com->mobcost);
+               land.lnd_mobil = (signed char)(com->mob - com->mobcost);
        }
        makelost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
                 land.lnd_y);
@@ -410,7 +410,7 @@ put_combat(struct combat *com)
            if (com->mob - com->mobcost < -127)
                ship.shp_mobil = -127;
            else
-               ship.shp_mobil = (s_char)(com->mob - com->mobcost);
+               ship.shp_mobil = (signed char)(com->mob - com->mobcost);
        }
        makelost(EF_SHIP, ship.shp_own, ship.shp_uid, ship.shp_x,
                 ship.shp_y);
@@ -766,7 +766,7 @@ att_ask_offense(int combat_mode, struct combat *off, struct combat *def,
                struct emp_qelem *olist, int *a_spyp, int *a_engineerp)
 {
     int n;
-    s_char land_answer[1024];
+    char land_answer[1024];
 
     emp_initque(olist);
     if (att_abort(combat_mode, off, def))
@@ -947,7 +947,7 @@ att_prompt(char *prompt, char army)
 
 static void
 ask_olist(int combat_mode, struct combat *off, struct combat *def,
-         struct emp_qelem *olist, s_char *land_answer, int *a_spyp,
+         struct emp_qelem *olist, char *land_answer, int *a_spyp,
          int *a_engineerp)
 {
     struct nstr_item ni;
@@ -2283,8 +2283,8 @@ ask_move_in(struct combat *off, struct emp_qelem *olist,
     struct llist *llp;
     char buf[512];
     char prompt[512];
-    s_char land_answer[1024];
-    s_char *answerp;
+    char land_answer[1024];
+    char *answerp;
 
     for (n = 0; n <= off->last; ++n)
        if (off[n].type != EF_BAD && off[n].troops > 0)
index 53160972e1294f7928428a8ffa087c8b15b31c30..4c5211860f1192b746e0408516dde65d2cdc5a08 100644 (file)
  * 2 = update only bmap with force
  */
 
-static int do_map_set(s_char *map, coord x, coord y, s_char t, int force);
+static int do_map_set(char *map, coord x, coord y, char t, int force);
 
 int
-map_set(natid cnum, coord x, coord y, s_char t, int only_bmap)
+map_set(natid cnum, coord x, coord y, char t, int only_bmap)
 {
     int set = 0;
 
@@ -63,10 +63,10 @@ map_set(natid cnum, coord x, coord y, s_char t, int only_bmap)
 
 
 static int
-do_map_set(s_char *map, coord x, coord y, s_char t, int force)
+do_map_set(char *map, coord x, coord y, char t, int force)
 {
     int id;
-    s_char ot;
+    char ot;
 
     if ((id = sctoff(x, y)) < 0)
        return 0;
index 12d8c07bda7db18cd0289e539edf6b3c33ce5574..b2c3c3a5be1c83aa89cf2b7536ef95067e304ae0 100644 (file)
@@ -187,7 +187,7 @@ lnd_take_casualty(int combat_mode, struct llist *llp, int cas)
     int nowhere_to_go = 0;
     struct sctstr rsect;
     double mobcost;
-    s_char orig;
+    signed char orig;
     int mob;
 
     taken = lnd_getmil(&llp->land);
@@ -272,7 +272,7 @@ lnd_take_casualty(int combat_mode, struct llist *llp, int cas)
                if (mob < -127)
                    mob = -127;
                orig = llp->land.lnd_mobil;
-               llp->land.lnd_mobil = (s_char)mob;
+               llp->land.lnd_mobil = (signed char)mob;
                if (llp->land.lnd_mobil > orig)
                    llp->land.lnd_mobil = -127;
                sprintf(buf, "retreats at %d%% efficiency to %s!",
@@ -326,7 +326,7 @@ lnd_takemob(struct emp_qelem *list, double loss)
        new = llp->land.lnd_mobil - mcost;
        if (new < -127)
            new = -127;
-       llp->land.lnd_mobil = (s_char)new;
+       llp->land.lnd_mobil = (signed char)new;
     }
 }
 int
index 4555f257bf296113e40029bd0cc33f6910ea8505..a792415bfeec7d779cd741c825b1ff74fbcbee67 100644 (file)
@@ -1219,7 +1219,7 @@ mission_pln_arm(struct emp_qelem *list, coord x, coord y, int dist,
 
 int
 mission_pln_equip(struct plist *plp, struct ichrstr *ip, int flags,
-                 s_char mission)
+                 char mission)
 {
     struct plchrstr *pcp;
     struct plnstr *pp;
index 0248f03216efd07b82d7f28cb8c1c9e60dec0b26..1f68ac789a944a71f48a65c5dffc966a6a18f554 100644 (file)
@@ -52,7 +52,7 @@
 #include "prototypes.h"
 #include "optlist.h"
 
-static int pln_equip(struct plist *, struct ichrstr *, int, s_char);
+static int pln_equip(struct plist *, struct ichrstr *, int, char);
 
 /*
  * Get assembly point argument.
@@ -605,7 +605,7 @@ pln_arm(struct emp_qelem *list, int dist, int mission, struct ichrstr *ip,
 }
 
 static int
-pln_equip(struct plist *plp, struct ichrstr *ip, int flags, s_char mission)
+pln_equip(struct plist *plp, struct ichrstr *ip, int flags, char mission)
 {
     struct plchrstr *pcp;
     struct plnstr *pp;
@@ -1159,7 +1159,7 @@ pln_hitchance(struct plnstr *pp, int hardtarget, int type)
 /* return 0 if there was a nuclear detonation */
 
 int
-pln_damage(struct plnstr *pp, coord x, coord y, s_char type, int *nukedamp,
+pln_damage(struct plnstr *pp, coord x, coord y, char type, int *nukedamp,
           int noisy)
 {
     struct plchrstr *pcp = plchr + pp->pln_type;
index d353f17b1984266ad4c64537ed41b1025b1aa3cc..516c2386dc99690135dec85b5ceaa38481c45f24 100644 (file)
@@ -70,8 +70,8 @@ radmapupd(int own, int cx, int cy, int eff, int range, double seesub)
  * want to do this in other places too where it doesn't matter. */
 static char **rad;
 static char *radbuf;
-static s_char **vis;
-static s_char *visbuf;
+static signed char **vis;
+static signed char *visbuf;
 
 static void
 radmap2(int owner,
@@ -100,7 +100,7 @@ radmap2(int owner,
        }
     }
     if (!vis) {
-       vis = malloc(WORLD_Y * sizeof(s_char *));
+       vis = malloc(WORLD_Y * sizeof(signed char *));
        if (vis && visbuf) {
            for (x = 0; x < WORLD_Y; x++)
                vis[x] = &visbuf[(WORLD_X + 1) * x];
index 1191c0f5a9cbc62a298688dfeeda58a7b1f46c88..06bfde29c1c0f1c5dd95e30c0ef7ce422c74a568 100644 (file)
@@ -64,7 +64,7 @@ satmap(int x, int y, int eff, int range, int flags, int type)
     int n;
     int changed = 0;
     long crackle;
-    s_char noise[100];
+    signed char noise[100];
     char selection[1024];
 
     if (!eff)
index 710e482d4748ab611b54066c3913635a59aa9124..698ef8489692e3c67430972f1c7d3b4a0cfb37fe 100644 (file)
@@ -636,7 +636,7 @@ shp_fort_interdiction(struct emp_qelem *list, coord newx, coord newy,
     int shell, gun;
     int dam;
     int totdam = 0;
-    s_char notified[MAXNOC];
+    signed char notified[MAXNOC];
     int i;
 
     /* Inform neutral and worse */
index e88ff7731e67d6993d0b5d5cc4cc49cf007629ab..992a01cef54fd5795fc1ef1b572579c582e8cba1 100644 (file)
@@ -192,7 +192,7 @@ snxtitem_all(struct nstr_item *np, int type)
 }
 
 void
-snxtitem_group(struct nstr_item *np, int type, s_char group)
+snxtitem_group(struct nstr_item *np, int type, char group)
 {
     if (group == '~')
        group = ' ';
index 64af50b7acef1b8ddba84c553e9e00fd9e9256bc..ff328c41bd0fe5f38ef0d7ff54abc2f90ea680ec 100644 (file)
@@ -340,7 +340,7 @@ landrepair(struct lndstr *land, struct natstr *np,
        logerror("land unit %d building %d ! \n", land->lnd_uid, build);
     np->nat_money -= mult * lp->l_cost * build / 100.0;
     if (!player->simulation) {
-       land->lnd_effic += (s_char)build;
+       land->lnd_effic += (signed char)build;
 
        putsect(sp);
     }
index bdeed5530c70e71b91d7d602f164d3fcc4165dcc..62c52605f329402aa5f4c39855626f7779a7594e 100644 (file)
@@ -310,7 +310,7 @@ do_mob_ship(struct shpstr *sp, int etus)
        value = sp->shp_mobil + ((float)etus * ship_mob_scale);
        if (value > ship_mob_max)
            value = ship_mob_max;
-       sp->shp_mobil = (s_char)value;
+       sp->shp_mobil = (signed char)value;
     } else {
        can_add = ship_mob_max - sp->shp_mobil;
        if (can_add > ((float)etus * ship_mob_scale))
index ae414833aec567acd2feb62acdfe0d1916d333fe..520256b699d390910913cde42727ae089c4b097d 100644 (file)
@@ -257,7 +257,7 @@ prod_plane(int etus, int natnum, int *bp, int buildem)
            air_money[pp->pln_own] += np->nat_money - start_money;
 
            if (!player->simulation)
-               pp->pln_effic += (s_char)build;
+               pp->pln_effic += (signed char)build;
            else
                np->nat_money = start_money;
            k++;
index 0b3b5302027ffc94ddb4e2b4b6c8bdceba8841e6..6ee5573016fe306e6202b311fc56a09a6e3faff9 100755 (executable)
@@ -2,7 +2,7 @@
 
 # indent needs to know type names do to a proper job.
 # Type names located with grep typedef, then extracted by hand:
-types="coord empth_sem_t empth_t i_packing i_type loc_Sem_t loc_Thread_t natid ns_seltype nsc_cat nsc_flags nsc_type packed_nsc_cat packed_nsc_type s_char stkalign_t"
+types="coord empth_sem_t empth_t i_packing i_type loc_Sem_t loc_Thread_t natid ns_seltype nsc_cat nsc_flags nsc_type packed_nsc_cat packed_nsc_type stkalign_t"
 
 opts="-kr -cdw -cp8 -ncs -psl -ss"
 for t in $types
index d82bbc3078ec2a63d1e68dd34d8d846f97c1882d..e6b1246783ae9298cf7c44e5c0d6f236d6e3c969 100644 (file)
@@ -159,7 +159,7 @@ update_wait(void *unused)
        }
        stacksize = 100000 +
 /* finish_sects */ WORLD_X * WORLD_Y * (2 * sizeof(double) +
-                                       sizeof(s_char *));
+                                       sizeof(char *));
 
        empth_create(PP_UPDATE, update_main, stacksize, 0,
                     "UpdateRun", "Updates the world", dp);