]> git.pond.sub.org Git - empserver/commitdiff
(att_mode, xyas, ownxy, prbuf): Get rid of s_char. Users changed.
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 28 Dec 2005 22:30:52 +0000 (22:30 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 28 Dec 2005 22:30:52 +0000 (22:30 +0000)
(ATTRIBUTE): Don't disable use of gcc __attribute__ when s_char is
signed char.  All format strings are now char *.

include/combat.h
include/misc.h
include/xy.h
src/lib/common/xy.c
src/lib/subs/attsub.c

index 078917afe3defe6e127ec1595de3cb1833aba3f5..e1d112c95f79ef8a05f8a885c408860a6dc7a942 100644 (file)
@@ -97,6 +97,6 @@ extern int att_fight(int, struct combat *, struct emp_qelem *, double,
 extern int att_free_lists(struct emp_qelem *, struct emp_qelem *);
 
 
-extern s_char *att_mode[];
+extern char *att_mode[A_LBOARD + 1];
 
 #endif /* _COMBAT_H_ */
index 241ca33110e8dde14bb03dbbd77e44b2201d55ab..332087f9475c587f2f6d6a1a22fb247bbc76a365 100644 (file)
@@ -103,9 +103,6 @@ typedef u_char natid;               /* NSC_NATID must match this */
 typedef char s_char;           /* change to signed char for aix */
 #else
 typedef signed char s_char;
-/* gcc __attribute__((format ...)) chokes on s_char * format strings */
-#undef ATTRIBUTE
-#define ATTRIBUTE(attr)
 #endif /* !aix && !sgi */
 typedef short coord;
 
@@ -141,7 +138,7 @@ extern char *getstarg(char *input, char *prompt, char buf[]);
 extern char *getstring(char *prompt, char buf[]);
 extern char *ugetstring(char *prompt, char buf[]);
              
-extern s_char *prbuf(s_char *format, ...)
+extern char *prbuf(char *format, ...)
     ATTRIBUTE((format (printf, 1, 2)));
 
 #define AGREE_FREE     0
index 88b72016a75b7411192c33a6559ca9b58e6e418b..1d87e02e7118cc63747ebb6c817ef2b4a4b18df7 100644 (file)
@@ -53,8 +53,8 @@ struct range {
     int height;
 };
 
-extern s_char *xyas(coord x, coord y, natid country);
-extern s_char *ownxy(struct sctstr *sp);
+extern char *xyas(coord x, coord y, natid country);
+extern char *ownxy(struct sctstr *sp);
 extern coord xrel(struct natstr *np, coord absx);
 extern coord yrel(struct natstr *np, coord absy);
 extern void xyrelrange(struct natstr *np, struct range *src,
index 871cc24be31d293bc44efd7388321f792bfdfa4d..e0cb2174e8eb7c260461f08b6128e13e911434e9 100644 (file)
@@ -49,7 +49,7 @@
  * return pointer to a string containing the x,y
  * coords as desired by a particular target country.
  */
-s_char *
+char *
 xyas(coord x, coord y, natid country)
 {
     struct natstr *np;
@@ -58,7 +58,7 @@ xyas(coord x, coord y, natid country)
     return prbuf("%d,%d", xrel(np, x), yrel(np, y));
 }
 
-s_char *
+char *
 ownxy(struct sctstr *sp)
 {
     return xyas(sp->sct_x, sp->sct_y, sp->sct_own);
@@ -223,11 +223,11 @@ xyinrange(coord x, coord y, struct range *rp)
 }
 
 
-s_char *
-prbuf(s_char *format, ...)
+char *
+prbuf(char *format, ...)
 {
     static int nbuf = -1;
-    static s_char buf[20][1024];
+    static char buf[20][1024];
     va_list ap;
 
     if (++nbuf > 19)
index f1eb6e7fc94b322c165f42cea279ef75f99b6566..f16f26cdf513dcdc430983e9361e601cdad6458c 100644 (file)
@@ -87,7 +87,7 @@ static int take_def(int combat_mode, struct emp_qelem *list,
 static int get_land(int combat_mode, struct combat *def, int uid,
                    struct llist *llp, int victim_land);
 
-s_char *att_mode[] = {
+char *att_mode[] = {
     /* must match combat types in combat.h */
     "defend", "attack", "assault", "paradrop", "board", "lboard"
 };