summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_File_Browser.cxx12
-rw-r--r--src/Fl_Preferences.cxx6
-rw-r--r--src/Fl_x.cxx7
-rw-r--r--src/fl_dnd_win32.cxx6
-rw-r--r--src/fl_dnd_x.cxx7
-rw-r--r--src/forms_fselect.cxx8
6 files changed, 22 insertions, 24 deletions
diff --git a/src/Fl_File_Browser.cxx b/src/Fl_File_Browser.cxx
index 6bee7a25b..6052fa99d 100644
--- a/src/Fl_File_Browser.cxx
+++ b/src/Fl_File_Browser.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_File_Browser.cxx,v 1.1.2.25 2003/01/30 21:41:41 easysw Exp $"
+// "$Id: Fl_File_Browser.cxx,v 1.1.2.26 2003/05/04 21:45:45 easysw Exp $"
//
// Fl_File_Browser routines.
//
@@ -582,12 +582,8 @@ Fl_File_Browser::load(const char *directory,// I - Directory to load
for (i = 0, num_dirs = 0; i < num_files; i ++)
{
-#if 0
- if (strcmp(files[i]->d_name, ".") != 0 &&
- strcmp(files[i]->d_name, "..") != 0)
-#else
- if (strcmp(files[i]->d_name, ".") != 0)
-#endif // 0
+ if (strcmp(files[i]->d_name, ".") &&
+ strcmp(files[i]->d_name, "./"))
{
snprintf(filename, sizeof(filename), "%s/%s", directory_,
files[i]->d_name);
@@ -643,5 +639,5 @@ Fl_File_Browser::filter(const char *pattern) // I - Pattern string
//
-// End of "$Id: Fl_File_Browser.cxx,v 1.1.2.25 2003/01/30 21:41:41 easysw Exp $".
+// End of "$Id: Fl_File_Browser.cxx,v 1.1.2.26 2003/05/04 21:45:45 easysw Exp $".
//
diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx
index 6f1d6295f..54cbbb804 100644
--- a/src/Fl_Preferences.cxx
+++ b/src/Fl_Preferences.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Preferences.cxx,v 1.1.2.24 2003/01/30 21:42:30 easysw Exp $"
+// "$Id: Fl_Preferences.cxx,v 1.1.2.25 2003/05/04 21:45:46 easysw Exp $"
//
// Preferences methods for the Fast Light Tool Kit (FLTK).
//
@@ -1097,7 +1097,7 @@ char Fl_Preferences::Node::remove()
if ( parent_ )
{
nd = parent_->child_; np = 0L;
- for ( ; nd; nd = nd->next_ )
+ for ( ; nd; np = nd, nd = nd->next_ )
{
if ( nd == this )
{
@@ -1116,5 +1116,5 @@ char Fl_Preferences::Node::remove()
//
-// End of "$Id: Fl_Preferences.cxx,v 1.1.2.24 2003/01/30 21:42:30 easysw Exp $".
+// End of "$Id: Fl_Preferences.cxx,v 1.1.2.25 2003/05/04 21:45:46 easysw Exp $".
//
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 83b23e707..6379a054f 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_x.cxx,v 1.24.2.24.2.28 2003/04/03 04:28:15 matthiaswm Exp $"
+// "$Id: Fl_x.cxx,v 1.24.2.24.2.29 2003/05/04 21:45:46 easysw Exp $"
//
// X specific code for the Fast Light Tool Kit (FLTK).
//
@@ -123,6 +123,7 @@ void Fl::add_fd(int n, void (*cb)(int, void*), void* v) {
void Fl::remove_fd(int n, int events) {
int i,j;
+ maxfd = -1; // recalculate maxfd on the fly
for (i=j=0; i<nfds; i++) {
# if USE_POLL
if (pollfds[i].fd == n) {
@@ -137,6 +138,7 @@ void Fl::remove_fd(int n, int events) {
fd[i].events = e;
}
# endif
+ if (fd[i].fd > maxfd) maxfd = fd[i].fd;
// move it down in the array if necessary:
if (j<i) {
fd[j] = fd[i];
@@ -151,7 +153,6 @@ void Fl::remove_fd(int n, int events) {
if (events & POLLIN) FD_CLR(n, &fdsets[0]);
if (events & POLLOUT) FD_CLR(n, &fdsets[1]);
if (events & POLLERR) FD_CLR(n, &fdsets[2]);
- if (n == maxfd) maxfd--;
# endif
}
@@ -1266,5 +1267,5 @@ void Fl_Window::make_current() {
#endif
//
-// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.28 2003/04/03 04:28:15 matthiaswm Exp $".
+// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.29 2003/05/04 21:45:46 easysw Exp $".
//
diff --git a/src/fl_dnd_win32.cxx b/src/fl_dnd_win32.cxx
index c2b7ca0b4..df2f705df 100644
--- a/src/fl_dnd_win32.cxx
+++ b/src/fl_dnd_win32.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_dnd_win32.cxx,v 1.5.2.14 2003/01/30 21:43:37 easysw Exp $"
+// "$Id: fl_dnd_win32.cxx,v 1.5.2.15 2003/05/04 21:45:46 easysw Exp $"
//
// Drag & Drop code for the Fast Light Tool Kit (FLTK).
//
@@ -52,7 +52,7 @@ Fl_Window *fl_dnd_target_window = 0;
#if !defined(__GNUC__) || __GNUC__ >= 3
#include <ole2.h>
-#include <ShellAPI.h>
+#include <shellapi.h>
/**
* subclass the IDropTarget to receive data from DnD operations
@@ -349,5 +349,5 @@ int Fl::dnd()
//
-// End of "$Id: fl_dnd_win32.cxx,v 1.5.2.14 2003/01/30 21:43:37 easysw Exp $".
+// End of "$Id: fl_dnd_win32.cxx,v 1.5.2.15 2003/05/04 21:45:46 easysw Exp $".
//
diff --git a/src/fl_dnd_x.cxx b/src/fl_dnd_x.cxx
index cb4b3fca0..31499bb6b 100644
--- a/src/fl_dnd_x.cxx
+++ b/src/fl_dnd_x.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_dnd_x.cxx,v 1.5.2.6 2003/01/30 21:43:38 easysw Exp $"
+// "$Id: fl_dnd_x.cxx,v 1.5.2.7 2003/05/04 21:45:46 easysw Exp $"
//
// Drag & Drop code for the Fast Light Tool Kit (FLTK).
//
@@ -81,6 +81,7 @@ static int local_handle(int event, Fl_Window* window) {
}
int Fl::dnd() {
+ Fl_Window *source_fl_win = Fl::first_window();
Fl::first_window()->cursor((Fl_Cursor)21);
Window source_window = fl_xid(Fl::first_window());
fl_local_grab = grabfunc;
@@ -161,11 +162,11 @@ int Fl::dnd() {
}
fl_local_grab = 0;
- Fl::first_window()->cursor(FL_CURSOR_DEFAULT);
+ source_fl_win->cursor(FL_CURSOR_DEFAULT);
return 1;
}
//
-// End of "$Id: fl_dnd_x.cxx,v 1.5.2.6 2003/01/30 21:43:38 easysw Exp $".
+// End of "$Id: fl_dnd_x.cxx,v 1.5.2.7 2003/05/04 21:45:46 easysw Exp $".
//
diff --git a/src/forms_fselect.cxx b/src/forms_fselect.cxx
index c23669eea..25186a774 100644
--- a/src/forms_fselect.cxx
+++ b/src/forms_fselect.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: forms_fselect.cxx,v 1.4.2.3.2.5 2003/01/30 21:44:29 easysw Exp $"
+// "$Id: forms_fselect.cxx,v 1.4.2.3.2.6 2003/05/04 21:45:46 easysw Exp $"
//
// Forms file selection routines for the Fast Light Tool Kit (FLTK).
//
@@ -30,7 +30,7 @@
static char fl_directory[1024];
static const char *fl_pattern; // assummed passed value is static
-static char fl_filename[256];
+static char fl_filename[1024];
char* fl_show_file_selector(const char *message,const char *dir,
const char *pat,const char *fname) {
@@ -48,7 +48,7 @@ char* fl_show_file_selector(const char *message,const char *dir,
if (!q) return 0;
strlcpy(fl_directory, q, sizeof(fl_directory));
p = (char *)fl_filename_name(fl_directory);
- strlcpy(fl_filename, p, sizeof(fl_directory));
+ strlcpy(fl_filename, p, sizeof(fl_filename));
if (p > fl_directory+1) p--;
*p = 0;
return (char *)q;
@@ -61,5 +61,5 @@ char* fl_get_pattern() {return (char *)fl_pattern;}
char* fl_get_filename() {return fl_filename;}
//
-// End of "$Id: forms_fselect.cxx,v 1.4.2.3.2.5 2003/01/30 21:44:29 easysw Exp $".
+// End of "$Id: forms_fselect.cxx,v 1.4.2.3.2.6 2003/05/04 21:45:46 easysw Exp $".
//