From b49703ea3d1e5dba7412ffe277e66b4610a2d43b Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 13 May 2005 10:19:27 +0000 Subject: Fix WIN32 compile errors. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4348 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_File_Chooser2.cxx | 1 + src/filename_absolute.cxx | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index aa8bf6a58..51ac31271 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -160,6 +160,7 @@ Fl_File_Chooser::directory(const char *d)// I - Directory to change to #ifdef WIN32 // See if the filename contains backslashes... + char *slash; // Pointer to slashes char fixpath[1024]; // Path with slashes converted if (strchr(d, '\\')) { // Convert backslashes to slashes... diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx index 6ffc6df39..abec59127 100644 --- a/src/filename_absolute.cxx +++ b/src/filename_absolute.cxx @@ -112,7 +112,7 @@ int // O - 0 if no change, 1 if changed fl_filename_relative(char *to, // O - Relative filename int tolen, // I - Size of "to" buffer const char *from) {// I - Absolute filename - const char *newslash; // Directory separator + char *newslash; // Directory separator const char *slash; // Directory separator char cwd[1024]; // Current directory @@ -134,8 +134,8 @@ fl_filename_relative(char *to, // O - Relative filename } #if defined(WIN32) || defined(__EMX__) - for (slash = strchr(cwd, '\\'); slash; slash = strchr(slash + 1, '\\')) - *slash = '/'; + for (newslash = strchr(cwd, '\\'); newslash; newslash = strchr(newslash + 1, '\\')) + *newslash = '/'; if (!strcasecmp(from, cwd)) { strlcpy(to, ".", tolen); -- cgit v1.2.3