chiark / gitweb /
segment labelling work-in-progress - yet to do are labels and graph colouring
[trains.git] / hostside / record.h
1 /*
2  */
3
4 #ifndef RECORD_H
5 #define RECORD_H
6
7 #include "realtime.h"
8
9 /* record.[ch] can be used in programs using persist.c, for the full
10  * works.  Alternatively for use in some other program, just provide
11  * a persist_allocate which calls malloc:
12  */
13 void *record_allocate(int length);
14
15 #define DO_PERSIST_HEADER_ITEMS(cnst,num,ptr)   \
16   cnst("#! /dev/enoent/trains-image\n")         \
17   cnst(mapbase)                                 \
18   num(datalen)                                  \
19   ptr(trains)                                   \
20   num(n_trains)                                 \
21   ptr(segments)
22
23 #endif /*RECORD_H*/