summaryrefslogtreecommitdiff
path: root/src/filename_absolute.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2008-09-10 23:56:49 +0000
committerMatthias Melcher <fltk@matthiasm.com>2008-09-10 23:56:49 +0000
commitb6bde2e4569aa617c8a6af64947c688c624ed7f8 (patch)
tree010d15843eb7d4faf7cd1b0cd44d5b9c00462a83 /src/filename_absolute.cxx
parentdfb50e85292687561927610e689eb5ab30d0ba26 (diff)
Merging the UTF8 patch, consisting of O'ksi'd s original 1.1.6 patch and additions by Ian. PLEASE BE AWARE that the patch in its current incarnation is a regression in many aspects and further work is required before we can announce Unicode support.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/filename_absolute.cxx')
-rw-r--r--src/filename_absolute.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx
index 58fbb6a66..820fcf2cf 100644
--- a/src/filename_absolute.cxx
+++ b/src/filename_absolute.cxx
@@ -32,6 +32,7 @@
*/
#include <FL/filename.H>
+#include <FL/fl_utf8.H>
#include <stdlib.h>
#include "flstring.h"
#include <ctype.h>
@@ -67,7 +68,7 @@ int fl_filename_absolute(char *to, int tolen, const char *from) {
char *temp = new char[tolen];
const char *start = from;
- a = getcwd(temp, tolen);
+ a = fl_getcwd(temp, tolen);
if (!a) {
strlcpy(to, from, tolen);
delete[] temp;
@@ -133,7 +134,7 @@ fl_filename_relative(char *to, // O - Relative filename
}
// get the current directory and return if we can't
- if (!getcwd(cwd_buf, sizeof(cwd_buf))) {
+ if (!fl_getcwd(cwd_buf, sizeof(cwd_buf))) {
strlcpy(to, from, tolen);
return 0;
}
@@ -151,6 +152,7 @@ fl_filename_relative(char *to, // O - Relative filename
// test for the same drive. Return the absolute path if not
if (tolower(*from & 255) != tolower(*cwd & 255)) {
+ // Not the same drive...
strlcpy(to, from, tolen);
return 0;
}