summaryrefslogtreecommitdiff
path: root/src/filename_expand.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_expand.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_expand.cxx')
-rw-r--r--src/filename_expand.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/filename_expand.cxx b/src/filename_expand.cxx
index 3f040a7e3..2bd35c6b5 100644
--- a/src/filename_expand.cxx
+++ b/src/filename_expand.cxx
@@ -31,9 +31,11 @@
*/
#include <FL/filename.H>
+#include <FL/fl_utf8.H>
#include <stdlib.h>
#include "flstring.h"
#if defined(WIN32) && !defined(__CYGWIN__)
+#include <windows.h>
#else
# include <unistd.h>
# include <pwd.h>
@@ -60,7 +62,7 @@ int fl_filename_expand(char *to,int tolen, const char *from) {
switch (*a) {
case '~': // a home directory name
if (e <= a+1) { // current user's directory
- value = getenv("HOME");
+ value = fl_getenv("HOME");
#ifndef WIN32
} else { // another user's directory
struct passwd *pwd;
@@ -72,7 +74,7 @@ int fl_filename_expand(char *to,int tolen, const char *from) {
}
break;
case '$': /* an environment variable */
- {char t = *e; *(char *)e = 0; value = getenv(a+1); *(char *)e = t;}
+ {char t = *e; *(char *)e = 0; value = fl_getenv(a+1); *(char *)e = t;}
break;
}
if (value) {