From b01abf3aabb09639349351c3a9c64eb136a35842 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Mon, 15 Aug 2005 11:20:07 +0100 Subject: add support for default datafile --- src/gipfel.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/gipfel.cxx') diff --git a/src/gipfel.cxx b/src/gipfel.cxx index 9db82fa..221bcec 100644 --- a/src/gipfel.cxx +++ b/src/gipfel.cxx @@ -50,9 +50,17 @@ #include "Fl_Search_Chooser.H" #include "GipfelWidget.H" #include "choose_hill.H" +#include "../config.h" + +#ifndef DATADIR +#define DATADIR "/usr/local/share" +#endif + +#define DEFAULT_DATAFILE DATADIR "/" PACKAGE_NAME "/alpinkoordinaten.dat" char *img_file; -char *data_file; +char *data_file = DEFAULT_DATAFILE; + GipfelWidget *gipf = NULL; Fl_Dial *s_center = NULL; Fl_Slider *s_nick = NULL, *s_scale = NULL, *s_tilt = NULL, *s_height_dist; @@ -321,7 +329,7 @@ int main(int argc, char** argv) { exit(1); } - +fprintf(stderr, "%s\n", data_file); control_win = create_control_window(); view_win = new Fl_Window(800, 600); -- cgit v1.2.3