diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-11-27 14:45:48 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-11-27 14:45:48 +0000 |
| commit | e321cb37bfe0379f54010eb42a36573ca561e71f (patch) | |
| tree | 8859d1296934461dc33abddc49701f5bbdc53124 /src | |
| parent | f9f2de35726988a6fd9d3b226dc683c394c1d65c (diff) | |
VC++ 2005 Support, drop old files, add icons for Sudoku
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4660 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/.cvsignore | 6 | ||||
| -rw-r--r-- | src/Fl_File_Chooser2.cxx | 10 | ||||
| -rw-r--r-- | src/Fl_File_Icon2.cxx | 5 | ||||
| -rw-r--r-- | src/Fl_Help_View.cxx | 3 | ||||
| -rw-r--r-- | src/Fl_Preferences.cxx | 4 | ||||
| -rw-r--r-- | src/Fl_get_system_colors.cxx | 5 | ||||
| -rw-r--r-- | src/filename_absolute.cxx | 12 | ||||
| -rw-r--r-- | src/fl_arc.cxx | 6 | ||||
| -rw-r--r-- | src/flstring.h | 10 |
9 files changed, 44 insertions, 17 deletions
diff --git a/src/.cvsignore b/src/.cvsignore deleted file mode 100644 index f654a4eaa..000000000 --- a/src/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.so* -*.sl* -*.a -*.bck -*.sav -*.dylib diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index a761e52f6..648d8a7ab 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -62,6 +62,10 @@ #if defined(WIN32) && ! defined (__CYGWIN__) # include <direct.h> # include <io.h> +// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs +// on Windows, which is supposed to be POSIX compliant... +# define access _access +# define mkdir _mkdir // Apparently Borland C++ defines DIRECTORY in <direct.h>, which // interfers with the Fl_File_Icon enumeration of the same name. # ifdef DIRECTORY @@ -608,7 +612,7 @@ Fl_File_Chooser::fileNameCB() file = fileList->text(i); #if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__) - if (strnicmp(filename, file, min_match) == 0) { + if (strncasecmp(filename, file, min_match) == 0) { #else if (strncmp(filename, file, min_match) == 0) { #endif // WIN32 || __EMX__ @@ -631,7 +635,7 @@ Fl_File_Chooser::fileNameCB() // Succeeding match; compare to find maximum string match... while (max_match > min_match) #if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__) - if (strnicmp(file, matchname, max_match) == 0) + if (strncasecmp(file, matchname, max_match) == 0) #else if (strncmp(file, matchname, max_match) == 0) #endif // WIN32 || __EMX__ @@ -1187,7 +1191,7 @@ compare_dirnames(const char *a, const char *b) { // Do a comparison of the first N chars (alen == blen at this point)... #ifdef WIN32 - return strnicmp(a, b, alen); + return strncasecmp(a, b, alen); #else return strncmp(a, b, alen); #endif // WIN32 diff --git a/src/Fl_File_Icon2.cxx b/src/Fl_File_Icon2.cxx index b7a23ac7e..29ab50191 100644 --- a/src/Fl_File_Icon2.cxx +++ b/src/Fl_File_Icon2.cxx @@ -50,9 +50,12 @@ #include <FL/math.h> #include <sys/types.h> #include <sys/stat.h> -#if defined(WIN32) && ! defined(__CYGWIN__) +#if defined(WIN32) && !defined(__CYGWIN__) # include <io.h> # define F_OK 0 +// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs +// on Windows, which is supposed to be POSIX compliant... +# define access _access #else # include <unistd.h> #endif // WIN32 diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx index 86e45fd3a..3b930116f 100644 --- a/src/Fl_Help_View.cxx +++ b/src/Fl_Help_View.cxx @@ -66,6 +66,9 @@ #if defined(WIN32) && ! defined(__CYGWIN__) # include <io.h> # include <direct.h> +// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs +// on Windows, which is supposed to be POSIX compliant... +# define getcwd _getcwd #else # include <unistd.h> #endif // WIN32 diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx index c116ae2a5..98321d28a 100644 --- a/src/Fl_Preferences.cxx +++ b/src/Fl_Preferences.cxx @@ -39,6 +39,10 @@ #if defined(WIN32) && !defined(__CYGWIN__) # include <direct.h> # include <io.h> +// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs +// on Windows, which is supposed to be POSIX compliant... +# define access _access +# define mkdir _mkdir #elif defined (__APPLE__) # include <Carbon/Carbon.h> # include <unistd.h> diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx index bac2c7c94..f2e5746fa 100644 --- a/src/Fl_get_system_colors.cxx +++ b/src/Fl_get_system_colors.cxx @@ -40,6 +40,11 @@ extern "C" int putenv(const char*); #endif // __APPLE__ && __MWERKS__ +#ifdef WIN32 +// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs +// on Windows, which is supposed to be POSIX compliant... +# define putenv _putenv +#endif // WIN32 static char fl_bg_set = 0; static char fl_bg2_set = 0; diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx index abec59127..d4101cfec 100644 --- a/src/filename_absolute.cxx +++ b/src/filename_absolute.cxx @@ -37,12 +37,14 @@ #include <ctype.h> #if defined(WIN32) && !defined(__CYGWIN__) # include <direct.h> -//# define getcwd(a,b) _getdcwd(0,a,b) +// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs +// on Windows, which is supposed to be POSIX compliant... +# define getcwd _getcwd #else -# include <unistd.h> -# ifdef __EMX__ -# define getcwd _getcwd2 -# endif +# include <unistd.h> +# ifdef __EMX__ +# define getcwd _getcwd2 +# endif #endif #if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__) diff --git a/src/fl_arc.cxx b/src/fl_arc.cxx index 8e16c2c02..3b50a32e2 100644 --- a/src/fl_arc.cxx +++ b/src/fl_arc.cxx @@ -32,6 +32,12 @@ #include <FL/fl_draw.H> #include <FL/math.h> +#ifdef WIN32 +// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs +// on Windows, which is supposed to be POSIX compliant... +# define hypot _hypot +#endif // WIN32 + void fl_arc(double x, double y, double r, double start, double end) { // draw start point accurately: diff --git a/src/flstring.h b/src/flstring.h index db9f97038..eb6d18ea3 100644 --- a/src/flstring.h +++ b/src/flstring.h @@ -30,6 +30,7 @@ # include <FL/Fl_Export.H> # include <config.h> +# include <stdio.h> # include <stdarg.h> # include <string.h> # ifdef HAVE_STRINGS_H @@ -48,8 +49,13 @@ # endif /* index */ # if defined(WIN32) && !defined(__CYGWIN__) -# define strcasecmp(s,t) stricmp((s), (t)) -# define strncasecmp(s,t,n) strnicmp((s), (t), (n)) +# define strcasecmp(s,t) _stricmp((s), (t)) +# define strncasecmp(s,t,n) _strnicmp((s), (t), (n)) +// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs +// on Windows, which is supposed to be POSIX compliant... Some of these functions +// are also defined in ISO C99... +# define strdup _strdup +# define unlink _unlink # elif defined(__EMX__) # define strcasecmp(s,t) stricmp((s), (t)) # define strncasecmp(s,t,n) strnicmp((s), (t), (n)) |
