Add missing trailing dot in sentences
[viking/guyou.git] / test / test_babel.c
blob76f8849d368aba317f1bee64a905d1bca45472ae
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>
5 #include "babel.h"
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",
12 file->label,
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 ();
23 a_babel_init();
24 a_babel_post_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);
30 a_babel_uninit();
32 a_preferences_uninit ();
34 return 0;