+static int str_end(const char *);
+static int score(struct ship *, struct ship *, char *, int);
+static void move_ship(struct ship *, const char *, unsigned char *, short *, short *, char *);
+static void try(struct ship *, struct ship *, char *, char *, int, int, int, int, int, int *, int);
+static void rmend(char *);
+
+const int dtab[] = {0,1,1,2,3,4,4,5}; /* diagonal distances in x==y */
+