diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2005-08-15 11:20:07 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2005-08-15 11:20:07 +0100 |
commit | b01abf3aabb09639349351c3a9c64eb136a35842 (patch) | |
tree | 0841b9e05a1d01ad0d8fe2a75628a916f2031398 /src/gipfel.cxx | |
parent | e7a2566a7a4d6b52d64536737bb4bca5fd08c605 (diff) |
add support for default datafile
Diffstat (limited to 'src/gipfel.cxx')
-rw-r--r-- | src/gipfel.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
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); |