/*========== basic types etc. ==========*/
-typedef unsigned short TrainNum;
-typedef unsigned short SegmentNum;
-typedef unsigned short MovPosComb;
-typedef unsigned short BoardObject;
-
-typedef unsigned char Small;
-
-typedef short Distance;
-typedef char Speed;
- /* for units, see safety.h */
+typedef int TrainNum;
+typedef int SegmentNum;
+typedef long MovPosComb;
+typedef long Speed;
+typedef int BoardObject;
+typedef int Small;
+typedef int Distance;
typedef enum {
mfk_none,
BoardObject sense, invert;
} SegmentInfo;
-typedef struct {
- Speed maxspeed;
- Distance tail, detectable, head;
- const char *pname;
-} TrainInfo;
-
-/* These data arrays have no sentinel members. Use the info_nfoobars
- * constants. Alternatively, it is legal to sed out everything from
+/* This data array has no sentinel member. Use the info_nsegments
+ * constant. Alternatively, it is legal to sed out everything from
* <name-of-layout>.layout-data.c from the first #include onwards, and
- * this will give definitions of NUM_SEGMENTS and NUM_TRAINS.
+ * this will give a definition of NUM_SEGMENTS.
*/
extern const SegmentNum info_nsegments;
extern const SegmentInfo info_segments[];
-extern const TrainNum info_nsegments;
-extern const TrainInfo info_trains[];
-
extern const BoardObject info_maxreverse; /* max. reverse + 1 */
-#define NOTA(x) (~(x##Num)0)
-#define SOMEP(x) (!!~(x))
+#define NOTA(x) (-1)
+#define SOMEP(x) ((x) >= 0)
#endif /*LAYOUT_DATA_H*/