]> git.pond.sub.org Git - empserver/commitdiff
(diroff, dirch, routech): Declare with array size. Define without.
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 30 Oct 2005 16:46:46 +0000 (16:46 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 30 Oct 2005 16:46:46 +0000 (16:46 +0000)
This requires moving routech[] declaration from map.h to path.h.  Get
rid of s_char.

include/map.h
include/path.h
src/lib/global/dir.c

index c4317a834c6f61f80d839c580064a811c0d2e5ea..d4b1dcee81446caca375b2a7ce33881ec4d21035 100644 (file)
@@ -39,8 +39,6 @@
 
 #define        MAPWIDTH(persec) ((WORLD_X/2)*(persec + 1)+1)
 
-extern s_char *routech[7][2];
-
 extern void blankfill(s_char *, register struct range *, int);
 /* src/lib/subs/border.c */
 extern int map_set(natid, coord, coord, s_char, int);
index b6b339e670b6be9dd3f0559fe45d6f85d1bfd992..0c936c0730719b0a8d2a910c689a13a8d2b8a790 100644 (file)
@@ -34,8 +34,8 @@
 #ifndef _PATH_H_
 #define _PATH_H_
 
-#include "misc.h"              /* s_char coord etc. */
-#include "sect.h"              /* struct sctstr */
+#include "misc.h"
+#include "sect.h"
 #include "xy.h"
 
        /* direction indices */
@@ -52,8 +52,9 @@
 #define        DIR_LAST        6
 
 extern signed char dirindex['z'-'a'+1];
-extern int diroff[][2];
-extern s_char dirch[];
+extern int diroff[DIR_MAP+1][2];
+extern char dirch[DIR_MAP+2];
+extern char *routech[DIR_LAST+1][2];
 
 /* src/lib/subs/paths.c */
 extern char *getpath(char *, char *, coord, coord, int, int, int);
index 3c503242d2418514d61d9593cb2e91efa74be838..8f9c53bb85f621a96f923cdede3e97bebf2cacc3 100644 (file)
  *  Known contributors to this file:
  */
 
-#include "misc.h"
+#include "path.h"
 
 /* must agree with DIR_ defines */
-s_char dirch[] = {
+char dirch[] = {
     'h',                       /* stop */
     'u',                       /* up-right */
     'j',                       /* right */
@@ -61,7 +61,7 @@ signed char dirindex[] = {
 };
 
 /* must agree with dirch[] and DIR_ defines */
-s_char *routech[7][2] = {
+char *routech[][2] = {
     {"   ", "$ $"},
     {"  /", "$ /"},
     {"  >", "$ >"},