diff options
| author | Manolo Gouy <Manolo> | 2016-04-27 17:02:57 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-04-27 17:02:57 +0000 |
| commit | b870641f34b6244c9e45770f045960b9d749caad (patch) | |
| tree | 3b49ae6f72e45d4c349d998709bd02440b544f99 | |
| parent | 9b186420fffed1c3c804b868a67189cb548446e6 (diff) | |
Begin to remove platform-specific code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11705 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | fluid/fluid.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 437475169..86eef5c12 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -37,10 +37,10 @@ #include <FL/filename.H> #include <FL/Fl_Native_File_Chooser.H> #include <FL/Fl_Printer.H> +#include <FL/fl_utf8.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> -#include <sys/stat.h> #include <time.h> // time(), localtime(), etc. #include "../src/flstring.h" @@ -125,7 +125,7 @@ void goto_source_dir() { if (p <= filename) return; // it is in the current directory char buffer[FL_PATH_MAX]; strlcpy(buffer, filename, sizeof(buffer)); - int n = p-filename; if (n>1) n--; buffer[n] = 0; + int n = (int)(p-filename); if (n>1) n--; buffer[n] = 0; if (!pwd) { pwd = getcwd(0,FL_PATH_MAX); if (!pwd) {fprintf(stderr,"getwd : %s\n",strerror(errno)); return;} @@ -265,11 +265,7 @@ void save_template_cb(Fl_Widget *, void *) { fluid_prefs.getUserdataPath(filename, sizeof(filename)); strlcat(filename, "templates", sizeof(filename)); -#if defined(WIN32) && !defined(__CYGWIN__) - if (access(filename, 0)) mkdir(filename); -#else - if (access(filename, 0)) mkdir(filename, 0777); -#endif // WIN32 && !__CYGWIN__ + if (fl_access(filename, 0)) fl_mkdir(filename, 0777); strlcat(filename, "/", sizeof(filename)); strlcat(filename, safename, sizeof(filename)); @@ -1713,7 +1709,7 @@ int main(int argc,char **argv) { " -cs : write .cxx and .h and strings and exit\n" " -o <name> : .cxx output filename, or extension if <name> starts with '.'\n" " -h <name> : .h output filename, or extension if <name> starts with '.'\n"; - int len = strlen(msg) + strlen(argv[0]) + strlen(Fl::help); + int len = (int)(strlen(msg) + strlen(argv[0]) + strlen(Fl::help)); Fl_Plugin_Manager pm("commandline"); int i, n = pm.plugins(); for (i=0; i<n; i++) { |
