]> git.street.me.uk Git - andy/viking.git/blame - test/test_babel.c
Fix crashing on invoking the Customize Toolbar from the preferences dialog.
[andy/viking.git] / test / test_babel.c
CommitLineData
6ea34309
RN
1// Decide the Babel file types capability you wish to list
2// e.g. for read support of waypoints, tracks and routes:
3// run like: ./test_babel 1 0 1 0 1 0
4#include <stdlib.h>
b666a8ba
GB
5#include <babel.h>
6
6ea34309 7static void print_file_format (gpointer data, gpointer user_data)
b666a8ba 8{
6ea34309 9 BabelFile *file = (BabelFile*)data;
b666a8ba
GB
10 printf("%s : %d%d%d%d%d%d\n",
11 file->label,
12 file->mode.waypointsRead, file->mode.waypointsWrite,
13 file->mode.tracksRead, file->mode.tracksWrite,
14 file->mode.routesRead, file->mode.routesWrite);
15}
16
17int main(int argc, char*argv[])
18{
19 a_babel_init();
20
21 if (argc != 7) return 1;
22 BabelMode mode = { atoi(argv[1]),atoi(argv[2]),atoi(argv[3]),atoi(argv[4]),atoi(argv[5]),atoi(argv[6]) };
23 a_babel_foreach_file_with_mode(mode, print_file_format, NULL);
24
25 a_babel_uninit();
26
27 return 0;
28}
29