]> git.street.me.uk Git - andy/viking.git/blobdiff - test/gpx2gpx.c
Fix excluding own self track when creating lists of other tracks.
[andy/viking.git] / test / gpx2gpx.c
index 4799dca176bf1c2420e77d3222f07a88cb5bb499..db0e76785204a631320421c025e2392d6b31dce8 100644 (file)
@@ -1,13 +1,15 @@
 #include <stdio.h>
 #include <gpx.h>
+#include <viklayer.h>
 
 int main(int argc, char *argv[])
 {
-  VikTrwLayer *trw = NULL;
   g_type_init ();
-  trw = vik_trw_layer_new(0);
+  VikLayer *vl = vik_layer_create (VIK_LAYER_TRW, NULL, NULL, 0);
+  VikTrwLayer *trw = VIK_TRW_LAYER (vl);
   a_gpx_read_file(trw, stdin);
-  a_gpx_write_file(trw, stdout);
-  vik_trw_layer_free (trw);
+  a_gpx_write_file(trw, stdout, NULL);
+  // NB no layer_free functions directly visible anymore
+  //  automatically called by layers_panel_finalize cleanup in full Viking program
   return 0;
 }