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
6 #include "preferences.h"
8 static void print_file_format (gpointer data
, gpointer user_data
)
10 BabelFile
*file
= (BabelFile
*)data
;
11 printf("%s : %d%d%d%d%d%d\n",
13 file
->mode
.waypointsRead
, file
->mode
.waypointsWrite
,
14 file
->mode
.tracksRead
, file
->mode
.tracksWrite
,
15 file
->mode
.routesRead
, file
->mode
.routesWrite
);
18 int main(int argc
, char*argv
[])
20 // Preferences must be initialized as it gets auto used
21 a_preferences_init ();
26 if (argc
!= 7) return 1;
27 BabelMode mode
= { atoi(argv
[1]),atoi(argv
[2]),atoi(argv
[3]),atoi(argv
[4]),atoi(argv
[5]),atoi(argv
[6]) };
28 a_babel_foreach_file_with_mode(mode
, print_file_format
, NULL
);
32 a_preferences_uninit ();