]> git.street.me.uk Git - andy/viking.git/blob - test/gpx2gpx.c
Some spelling fixes in a comment
[andy/viking.git] / test / gpx2gpx.c
1 #include <stdio.h>
2 #include "gpx.h"
3 #include "viklayer.h"
4 #include "viklayer_defaults.h"
5 #include "settings.h"
6 #include "preferences.h"
7 #include "globals.h"
8
9 int main(int argc, char *argv[])
10 {
11 #if !GLIB_CHECK_VERSION (2, 36, 0)
12   g_type_init();
13 #endif
14   // Some stuff must be initialized as it gets auto used
15   a_settings_init ();
16   a_preferences_init ();
17   a_vik_preferences_init ();
18   a_layer_defaults_init ();
19
20   VikLayer *vl = vik_layer_create (VIK_LAYER_TRW, NULL, FALSE);
21   VikTrwLayer *trw = VIK_TRW_LAYER (vl);
22
23   a_gpx_read_file(trw, stdin);
24   a_gpx_write_file(trw, stdout, NULL);
25   // NB no layer_free functions directly visible anymore
26   //  automatically called by layers_panel_finalize cleanup in full Viking program
27
28   a_layer_defaults_uninit ();
29   a_preferences_uninit ();
30   a_settings_uninit ();
31
32   return 0;
33 }