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
7 static void print_file_format (gpointer data, gpointer user_data)
9 BabelFile *file = (BabelFile*)data;
10 printf("%s : %d%d%d%d%d%d\n",
12 file->mode.waypointsRead, file->mode.waypointsWrite,
13 file->mode.tracksRead, file->mode.tracksWrite,
14 file->mode.routesRead, file->mode.routesWrite);
17 int main(int argc, char*argv[])
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);