Fix WIN32 compile errors.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4348 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2005-05-13 10:19:27 +00:00
parent 79de1e070d
commit b49703ea3d
2 changed files with 4 additions and 3 deletions

View File

@ -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...

View File

@ -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);