diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 526105d..9e8c039 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -32,7 +32,7 @@ if(WIN32) win32/w32util.cpp) else() set(util_SOURCES - fltk/fltkutil.cpp) + unix/unixutil.cpp) endif() # libslvs diff --git a/src/fltk/fltkutil.cpp b/src/unix/unixutil.cpp similarity index 91% rename from src/fltk/fltkutil.cpp rename to src/unix/unixutil.cpp index 700029b..7326f30 100644 --- a/src/fltk/fltkutil.cpp +++ b/src/unix/unixutil.cpp @@ -1,5 +1,5 @@ //----------------------------------------------------------------------------- -// Utility functions used by the FLTK port. Notably, our memory allocation; +// Utility functions used by the Unix port. Notably, our memory allocation; // we use two separate allocators, one for long-lived stuff and one for // stuff that gets freed after every regeneration of the model, to save us // the trouble of freeing the latter explicitly. @@ -13,8 +13,6 @@ #include #include -#include - #include "solvespace.h" void dbp(const char *str, ...) @@ -31,9 +29,9 @@ void dbp(const char *str, ...) void GetAbsoluteFilename(char *file) { - char absoluteFile[PATH_MAX]; - fl_filename_absolute(absoluteFile, sizeof(absoluteFile), file); - strcpy(file, absoluteFile); + char expanded[MAX_PATH]; + realpath(file, expanded); + strcpy(file, expanded); } //-----------------------------------------------------------------------------