mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 16:12:13 +08:00
Cygwin fixes...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1666 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -23,6 +23,7 @@ CHANGES IN FLTK 1.1.0b5
|
|||||||
- The symbols demo didn't show the strings needed to
|
- The symbols demo didn't show the strings needed to
|
||||||
show the corresponding symbol (the label string was
|
show the corresponding symbol (the label string was
|
||||||
not quoted...)
|
not quoted...)
|
||||||
|
- FLTK should now compile with Cygwin cleanly.
|
||||||
|
|
||||||
|
|
||||||
CHANGES IN FLTK 1.1.0b4
|
CHANGES IN FLTK 1.1.0b4
|
||||||
|
|||||||
+4
-4
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fluid.cxx,v 1.15.2.13.2.8 2001/09/30 17:37:06 easysw Exp $"
|
// "$Id: fluid.cxx,v 1.15.2.13.2.9 2001/10/29 21:59:14 easysw Exp $"
|
||||||
//
|
//
|
||||||
// FLUID main entry for the Fast Light Tool Kit (FLTK).
|
// FLUID main entry for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -268,7 +268,7 @@ extern int pasteoffset;
|
|||||||
static int ipasteoffset;
|
static int ipasteoffset;
|
||||||
|
|
||||||
static char* cutfname() {
|
static char* cutfname() {
|
||||||
#ifdef WIN32
|
#if defined WIN32 && ! defined(__CYGWIN__)
|
||||||
# ifndef MAX_PATH
|
# ifndef MAX_PATH
|
||||||
# define MAX_PATH 256
|
# define MAX_PATH 256
|
||||||
# endif // !MAX_PATH
|
# endif // !MAX_PATH
|
||||||
@@ -463,7 +463,7 @@ static int arg(int argc, char** argv, int& i) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WIN32
|
#if ! (defined(WIN32) && !defined (__CYGWIN__))
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#ifdef _sigargs
|
#ifdef _sigargs
|
||||||
@@ -521,5 +521,5 @@ int main(int argc,char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fluid.cxx,v 1.15.2.13.2.8 2001/09/30 17:37:06 easysw Exp $".
|
// End of "$Id: fluid.cxx,v 1.15.2.13.2.9 2001/10/29 21:59:14 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_File_Browser.cxx,v 1.1.2.2 2001/10/29 03:44:32 easysw Exp $"
|
// "$Id: Fl_File_Browser.cxx,v 1.1.2.3 2001/10/29 21:59:14 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Fl_File_Browser routines.
|
// Fl_File_Browser routines.
|
||||||
//
|
//
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32) && ! defined(__CYGWIN__)
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <direct.h>
|
# include <direct.h>
|
||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
@@ -416,7 +416,7 @@ Fl_File_Browser::load(const char *directory)// I - Directory to load
|
|||||||
if ((icon = Fl_File_Icon::find("any", Fl_File_Icon::DEVICE)) == NULL)
|
if ((icon = Fl_File_Icon::find("any", Fl_File_Icon::DEVICE)) == NULL)
|
||||||
icon = Fl_File_Icon::find("any", Fl_File_Icon::DIRECTORY);
|
icon = Fl_File_Icon::find("any", Fl_File_Icon::DIRECTORY);
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32) && ! defined (__CYGWIN__)
|
||||||
DWORD drives; // Drive available bits
|
DWORD drives; // Drive available bits
|
||||||
|
|
||||||
|
|
||||||
@@ -496,7 +496,7 @@ Fl_File_Browser::load(const char *directory)// I - Directory to load
|
|||||||
// Build the file list...
|
// Build the file list...
|
||||||
//
|
//
|
||||||
|
|
||||||
#if defined(WIN32) || defined(__EMX__)
|
#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
|
||||||
strncpy(filename, directory_, sizeof(filename) - 1);
|
strncpy(filename, directory_, sizeof(filename) - 1);
|
||||||
filename[sizeof(filename) - 1] = '\0';
|
filename[sizeof(filename) - 1] = '\0';
|
||||||
i = strlen(filename) - 1;
|
i = strlen(filename) - 1;
|
||||||
@@ -566,5 +566,5 @@ Fl_File_Browser::filter(const char *pattern) // I - Pattern string
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_File_Browser.cxx,v 1.1.2.2 2001/10/29 03:44:32 easysw Exp $".
|
// End of "$Id: Fl_File_Browser.cxx,v 1.1.2.3 2001/10/29 21:59:14 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+12
-12
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.2 2001/09/29 22:59:45 easysw Exp $"
|
// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.3 2001/10/29 21:59:14 easysw Exp $"
|
||||||
//
|
//
|
||||||
// More Fl_File_Chooser routines.
|
// More Fl_File_Chooser routines.
|
||||||
//
|
//
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32) && ! defined (__CYGWIN__)
|
||||||
# include <direct.h>
|
# include <direct.h>
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
#else
|
#else
|
||||||
@@ -84,7 +84,7 @@ Fl_File_Chooser::directory(const char *d) // I - Directory to change to
|
|||||||
if (d[0] != '\0')
|
if (d[0] != '\0')
|
||||||
{
|
{
|
||||||
// Make the directory absolute...
|
// Make the directory absolute...
|
||||||
#if defined(WIN32) || defined(__EMX__)
|
#if (defined(WIN32) && ! defined(__CYGWIN__))|| defined(__EMX__)
|
||||||
if (d[0] != '/' && d[0] != '\\' && d[1] != ':')
|
if (d[0] != '/' && d[0] != '\\' && d[1] != ':')
|
||||||
#else
|
#else
|
||||||
if (d[0] != '/' && d[0] != '\\')
|
if (d[0] != '/' && d[0] != '\\')
|
||||||
@@ -108,7 +108,7 @@ Fl_File_Chooser::directory(const char *d) // I - Directory to change to
|
|||||||
|
|
||||||
// Clear the directory menu and fill it as needed...
|
// Clear the directory menu and fill it as needed...
|
||||||
dirMenu->clear();
|
dirMenu->clear();
|
||||||
#if defined(WIN32) || defined(__EMX__)
|
#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
|
||||||
dirMenu->add("My Computer");
|
dirMenu->add("My Computer");
|
||||||
#else
|
#else
|
||||||
dirMenu->add("File Systems");
|
dirMenu->add("File Systems");
|
||||||
@@ -353,7 +353,7 @@ Fl_File_Chooser::newdir()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Make it relative to the current directory as needed...
|
// Make it relative to the current directory as needed...
|
||||||
#if defined(WIN32) || defined(__EMX__)
|
#if (defined(WIN32) && ! defined (__CYGWIN__)) || defined(__EMX__)
|
||||||
if (dir[0] != '/' && dir[0] != '\\' && dir[1] != ':')
|
if (dir[0] != '/' && dir[0] != '\\' && dir[1] != ':')
|
||||||
#else
|
#else
|
||||||
if (dir[0] != '/' && dir[0] != '\\')
|
if (dir[0] != '/' && dir[0] != '\\')
|
||||||
@@ -366,7 +366,7 @@ Fl_File_Chooser::newdir()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create the directory; ignore EEXIST errors...
|
// Create the directory; ignore EEXIST errors...
|
||||||
#if defined(WIN32)
|
#if defined(WIN32) && ! defined (__CYGWIN__)
|
||||||
if (mkdir(pathname))
|
if (mkdir(pathname))
|
||||||
#else
|
#else
|
||||||
if (mkdir(pathname, 0777))
|
if (mkdir(pathname, 0777))
|
||||||
@@ -423,7 +423,7 @@ Fl_File_Chooser::fileListCB()
|
|||||||
|
|
||||||
if (Fl::event_clicks())
|
if (Fl::event_clicks())
|
||||||
{
|
{
|
||||||
#if defined(WIN32) || defined(__EMX__)
|
#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
|
||||||
if ((strlen(pathname) == 2 && pathname[1] == ':') ||
|
if ((strlen(pathname) == 2 && pathname[1] == ':') ||
|
||||||
filename_isdir(pathname))
|
filename_isdir(pathname))
|
||||||
#else
|
#else
|
||||||
@@ -480,7 +480,7 @@ Fl_File_Chooser::fileNameCB()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WIN32) || defined(__EMX__)
|
#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
|
||||||
if (directory_[0] != '\0' &&
|
if (directory_[0] != '\0' &&
|
||||||
filename[0] != '/' &&
|
filename[0] != '/' &&
|
||||||
filename[0] != '\\' &&
|
filename[0] != '\\' &&
|
||||||
@@ -538,7 +538,7 @@ Fl_File_Chooser::fileNameCB()
|
|||||||
{
|
{
|
||||||
// Enter pressed - select or change directory...
|
// Enter pressed - select or change directory...
|
||||||
|
|
||||||
#if defined(WIN32) || defined(__EMX__)
|
#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
|
||||||
if ((strlen(pathname) == 2 && pathname[1] == ':') ||
|
if ((strlen(pathname) == 2 && pathname[1] == ':') ||
|
||||||
filename_isdir(pathname))
|
filename_isdir(pathname))
|
||||||
#else
|
#else
|
||||||
@@ -607,7 +607,7 @@ Fl_File_Chooser::fileNameCB()
|
|||||||
{
|
{
|
||||||
file = fileList->text(i);
|
file = fileList->text(i);
|
||||||
|
|
||||||
#if defined(WIN32) || defined(__EMX__)
|
#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
|
||||||
if (strnicmp(filename, file, min_match) == 0)
|
if (strnicmp(filename, file, min_match) == 0)
|
||||||
#else
|
#else
|
||||||
if (strncmp(filename, file, min_match) == 0)
|
if (strncmp(filename, file, min_match) == 0)
|
||||||
@@ -636,7 +636,7 @@ Fl_File_Chooser::fileNameCB()
|
|||||||
{
|
{
|
||||||
// Succeeding match; compare to find maximum string match...
|
// Succeeding match; compare to find maximum string match...
|
||||||
while (max_match > min_match)
|
while (max_match > min_match)
|
||||||
#if defined(WIN32) || defined(__EMX__)
|
#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
|
||||||
if (strnicmp(file, pathname, max_match) == 0)
|
if (strnicmp(file, pathname, max_match) == 0)
|
||||||
#else
|
#else
|
||||||
if (strncmp(file, pathname, max_match) == 0)
|
if (strncmp(file, pathname, max_match) == 0)
|
||||||
@@ -687,5 +687,5 @@ Fl_File_Chooser::fileNameCB()
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.2 2001/09/29 22:59:45 easysw Exp $".
|
// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.3 2001/10/29 21:59:14 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_File_Icon.cxx,v 1.1.2.3 2001/10/29 15:40:49 easysw Exp $"
|
// "$Id: Fl_File_Icon.cxx,v 1.1.2.4 2001/10/29 21:59:14 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Fl_File_Icon routines.
|
// Fl_File_Icon routines.
|
||||||
//
|
//
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#if defined(WIN32) || defined(__EMX__)
|
#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
# define F_OK 0
|
# define F_OK 0
|
||||||
# define strcasecmp stricmp
|
# define strcasecmp stricmp
|
||||||
@@ -1234,5 +1234,5 @@ get_kde_val(char *str,
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.3 2001/10/29 15:40:49 easysw Exp $".
|
// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.4 2001/10/29 21:59:14 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Help_View.cxx,v 1.1.2.8 2001/10/27 03:29:25 easysw Exp $"
|
// "$Id: Fl_Help_View.cxx,v 1.1.2.9 2001/10/29 21:59:15 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Fl_Help_View widget routines.
|
// Fl_Help_View widget routines.
|
||||||
//
|
//
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
#include <FL/Fl_Image.H>
|
#include <FL/Fl_Image.H>
|
||||||
#include <FL/Fl_Pixmap.H>
|
#include <FL/Fl_Pixmap.H>
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32) && ! defined(__CYGWIN__)
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
# include <direct.h>
|
# include <direct.h>
|
||||||
# define strcasecmp(s,t) stricmp((s), (t))
|
# define strcasecmp(s,t) stricmp((s), (t))
|
||||||
@@ -3584,5 +3584,5 @@ scrollbar_callback(Fl_Widget *s, void *)
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Help_View.cxx,v 1.1.2.8 2001/10/27 03:29:25 easysw Exp $".
|
// End of "$Id: Fl_Help_View.cxx,v 1.1.2.9 2001/10/29 21:59:15 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+7
-2
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_win32.cxx,v 1.33.2.37.2.5 2001/10/27 03:45:29 easysw Exp $"
|
// "$Id: Fl_win32.cxx,v 1.33.2.37.2.6 2001/10/29 21:59:15 easysw Exp $"
|
||||||
//
|
//
|
||||||
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
|
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -36,7 +36,12 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#if defined(__CYGWIN__)
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#else
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
|
#endif
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -1001,5 +1006,5 @@ void Fl_Window::make_current() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.5 2001/10/27 03:45:29 easysw Exp $".
|
// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.6 2001/10/29 21:59:15 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user