+2001-07-22 Hans Breuer <hans@breuer.org>
+
+ * glib/giochannel.c (g_io_channel_get_buffer_condition) : make
+ the code actually have an effect (Use |= to set bits). Not
+ absolutely sure if is the right one.
+
+ * glib/giowin32.c (g_io_win32_<check|prepare>) : don't modify
+ watch->condition but restored the previous behaviour.
+ Now gio-test as well as The Gimp work again ...
+
2001-07-21 Hans Breuer <hans@breuer.org>
* glib/giowin32.c (g_io_channel_new_file) : set the
+2001-07-22 Hans Breuer <hans@breuer.org>
+
+ * glib/giochannel.c (g_io_channel_get_buffer_condition) : make
+ the code actually have an effect (Use |= to set bits). Not
+ absolutely sure if is the right one.
+
+ * glib/giowin32.c (g_io_win32_<check|prepare>) : don't modify
+ watch->condition but restored the previous behaviour.
+ Now gio-test as well as The Gimp work again ...
+
2001-07-21 Hans Breuer <hans@breuer.org>
* glib/giowin32.c (g_io_channel_new_file) : set the
+2001-07-22 Hans Breuer <hans@breuer.org>
+
+ * glib/giochannel.c (g_io_channel_get_buffer_condition) : make
+ the code actually have an effect (Use |= to set bits). Not
+ absolutely sure if is the right one.
+
+ * glib/giowin32.c (g_io_win32_<check|prepare>) : don't modify
+ watch->condition but restored the previous behaviour.
+ Now gio-test as well as The Gimp work again ...
+
2001-07-21 Hans Breuer <hans@breuer.org>
* glib/giowin32.c (g_io_channel_new_file) : set the
+2001-07-22 Hans Breuer <hans@breuer.org>
+
+ * glib/giochannel.c (g_io_channel_get_buffer_condition) : make
+ the code actually have an effect (Use |= to set bits). Not
+ absolutely sure if is the right one.
+
+ * glib/giowin32.c (g_io_win32_<check|prepare>) : don't modify
+ watch->condition but restored the previous behaviour.
+ Now gio-test as well as The Gimp work again ...
+
2001-07-21 Hans Breuer <hans@breuer.org>
* glib/giowin32.c (g_io_channel_new_file) : set the
+2001-07-22 Hans Breuer <hans@breuer.org>
+
+ * glib/giochannel.c (g_io_channel_get_buffer_condition) : make
+ the code actually have an effect (Use |= to set bits). Not
+ absolutely sure if is the right one.
+
+ * glib/giowin32.c (g_io_win32_<check|prepare>) : don't modify
+ watch->condition but restored the previous behaviour.
+ Now gio-test as well as The Gimp work again ...
+
2001-07-21 Hans Breuer <hans@breuer.org>
* glib/giowin32.c (g_io_channel_new_file) : set the
+2001-07-22 Hans Breuer <hans@breuer.org>
+
+ * glib/giochannel.c (g_io_channel_get_buffer_condition) : make
+ the code actually have an effect (Use |= to set bits). Not
+ absolutely sure if is the right one.
+
+ * glib/giowin32.c (g_io_win32_<check|prepare>) : don't modify
+ watch->condition but restored the previous behaviour.
+ Now gio-test as well as The Gimp work again ...
+
2001-07-21 Hans Breuer <hans@breuer.org>
* glib/giowin32.c (g_io_channel_new_file) : set the
+2001-07-22 Hans Breuer <hans@breuer.org>
+
+ * glib/giochannel.c (g_io_channel_get_buffer_condition) : make
+ the code actually have an effect (Use |= to set bits). Not
+ absolutely sure if is the right one.
+
+ * glib/giowin32.c (g_io_win32_<check|prepare>) : don't modify
+ watch->condition but restored the previous behaviour.
+ Now gio-test as well as The Gimp work again ...
+
2001-07-21 Hans Breuer <hans@breuer.org>
* glib/giowin32.c (g_io_channel_new_file) : set the
+2001-07-22 Hans Breuer <hans@breuer.org>
+
+ * glib/giochannel.c (g_io_channel_get_buffer_condition) : make
+ the code actually have an effect (Use |= to set bits). Not
+ absolutely sure if is the right one.
+
+ * glib/giowin32.c (g_io_win32_<check|prepare>) : don't modify
+ watch->condition but restored the previous behaviour.
+ Now gio-test as well as The Gimp work again ...
+
2001-07-21 Hans Breuer <hans@breuer.org>
* glib/giowin32.c (g_io_channel_new_file) : set the
if ((channel->read_buf && (channel->read_buf->len > 0)) /* FIXME full chars how? */
|| (channel->encoded_read_buf && (channel->encoded_read_buf->len > 0)))
- condition &= G_IO_IN;
+ condition |= G_IO_IN;
if (channel->write_buf && (channel->write_buf->len < channel->buf_size))
- condition &= G_IO_OUT;
+ condition |= G_IO_OUT;
return condition;
}
{
UNLOCK (channel->mutex);
*bytes_read = 0;
- return G_IO_STATUS_EOF; /* Is this correct? FIXME */
+ return G_IO_STATUS_NORMAL; /* as before, normal case ? */
}
}
channel->thread_id);
}
+ return FALSE;
+ /* XXX: why should we want to do this ? */
watch->condition = g_io_channel_get_buffer_condition (watch->channel);
return (watch->pollfd.revents & (G_IO_IN | G_IO_OUT)) == watch->condition;
MSG msg;
GIOWin32Watch *watch = (GIOWin32Watch *)source;
GIOWin32Channel *channel = (GIOWin32Channel *)watch->channel;
+ GIOCondition buffer_condition = g_io_channel_get_buffer_condition (watch->channel);
+
if (channel->debug)
g_print ("g_io_win32_check: for thread %#x:\n"
channel->thread_id);
}
- watch->condition &= g_io_channel_get_buffer_condition (watch->channel);
-
return (watch->pollfd.revents & watch->condition);
}
win32_channel->hwnd);
if (!PeekMessage (&msg, win32_channel->hwnd, 0, 0, PM_REMOVE))
return G_IO_STATUS_AGAIN;
-
+
memmove (buf, &msg, sizeof (MSG));
*bytes_read = sizeof (MSG);
*bytes_read = result;
+ return G_IO_STATUS_NORMAL; /* XXX: 0 byte read an error ?? */
return (result > 0) ? G_IO_STATUS_NORMAL : G_IO_STATUS_EOF;
}
{
*bytes_read = result;
+ return G_IO_STATUS_NORMAL; /* XXX: 0 byte read an error ?? */
return (result > 0) ? G_IO_STATUS_NORMAL : G_IO_STATUS_EOF;
}
}
mode_num = MODE_A;
break;
default:
- g_warning ("Invalid GIOFileMode %s.\n", mode);
+ g_warning (G_STRLOC ": Invalid GIOFileMode %s.\n", mode);
return NULL;
}
}
/* Fall through */
default:
- g_warning ("Invalid GIOFileMode %s.\n", mode);
+ g_warning (G_STRLOC ": Invalid GIOFileMode %s.\n", mode);
return NULL;
}