Commit d6890b72 authored by Jeff Garzik's avatar Jeff Garzik

Removed features.h test.

        * configure.in, config.h.in, gdk/gdkimage.c:
        Removed features.h test.

        * gdk/gdkdnd.c:
        Guard public functions against NULL pointer derefs.
parent a6da2cf9
1999-01-02 Jeff Garzik <jgarzik@pobox.com>
* configure.in, config.h.in, gdk/gdkimage.c:
Removed features.h test.
* gdk/gdkdnd.c:
Guard public functions against NULL pointer derefs.
Fri Jan 1 18:41:09 PST 1999 Manish Singh <yosh@gimp.org> Fri Jan 1 18:41:09 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c * gdk/gdk.c
......
1999-01-02 Jeff Garzik <jgarzik@pobox.com>
* configure.in, config.h.in, gdk/gdkimage.c:
Removed features.h test.
* gdk/gdkdnd.c:
Guard public functions against NULL pointer derefs.
Fri Jan 1 18:41:09 PST 1999 Manish Singh <yosh@gimp.org> Fri Jan 1 18:41:09 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c * gdk/gdk.c
......
1999-01-02 Jeff Garzik <jgarzik@pobox.com>
* configure.in, config.h.in, gdk/gdkimage.c:
Removed features.h test.
* gdk/gdkdnd.c:
Guard public functions against NULL pointer derefs.
Fri Jan 1 18:41:09 PST 1999 Manish Singh <yosh@gimp.org> Fri Jan 1 18:41:09 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c * gdk/gdk.c
......
1999-01-02 Jeff Garzik <jgarzik@pobox.com>
* configure.in, config.h.in, gdk/gdkimage.c:
Removed features.h test.
* gdk/gdkdnd.c:
Guard public functions against NULL pointer derefs.
Fri Jan 1 18:41:09 PST 1999 Manish Singh <yosh@gimp.org> Fri Jan 1 18:41:09 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c * gdk/gdk.c
......
1999-01-02 Jeff Garzik <jgarzik@pobox.com>
* configure.in, config.h.in, gdk/gdkimage.c:
Removed features.h test.
* gdk/gdkdnd.c:
Guard public functions against NULL pointer derefs.
Fri Jan 1 18:41:09 PST 1999 Manish Singh <yosh@gimp.org> Fri Jan 1 18:41:09 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c * gdk/gdk.c
......
1999-01-02 Jeff Garzik <jgarzik@pobox.com>
* configure.in, config.h.in, gdk/gdkimage.c:
Removed features.h test.
* gdk/gdkdnd.c:
Guard public functions against NULL pointer derefs.
Fri Jan 1 18:41:09 PST 1999 Manish Singh <yosh@gimp.org> Fri Jan 1 18:41:09 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c * gdk/gdk.c
......
1999-01-02 Jeff Garzik <jgarzik@pobox.com>
* configure.in, config.h.in, gdk/gdkimage.c:
Removed features.h test.
* gdk/gdkdnd.c:
Guard public functions against NULL pointer derefs.
Fri Jan 1 18:41:09 PST 1999 Manish Singh <yosh@gimp.org> Fri Jan 1 18:41:09 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c * gdk/gdk.c
......
...@@ -121,9 +121,6 @@ ...@@ -121,9 +121,6 @@
/* Define if you have the <argz.h> header file. */ /* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H #undef HAVE_ARGZ_H
/* Define if you have the <features.h> header file. */
#undef HAVE_FEATURES_H
/* Define if you have the <limits.h> header file. */ /* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H #undef HAVE_LIMITS_H
......
...@@ -315,8 +315,6 @@ AC_SUBST(x_ldflags) ...@@ -315,8 +315,6 @@ AC_SUBST(x_ldflags)
AC_SUBST(x_libs) AC_SUBST(x_libs)
AC_SUBST(xinput_progs) AC_SUBST(xinput_progs)
AC_CHECK_HEADERS(features.h)
if test "x$enable_shm" = "xyes"; then if test "x$enable_shm" = "xyes"; then
# Check for shared memory # Check for shared memory
AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes) AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
......
...@@ -122,6 +122,8 @@ gdk_drag_context_new (void) ...@@ -122,6 +122,8 @@ gdk_drag_context_new (void)
void void
gdk_drag_context_ref (GdkDragContext *context) gdk_drag_context_ref (GdkDragContext *context)
{ {
g_return_if_fail (context != NULL);
((GdkDragContextPrivate *)context)->ref_count++; ((GdkDragContextPrivate *)context)->ref_count++;
} }
...@@ -131,6 +133,8 @@ gdk_drag_context_unref (GdkDragContext *context) ...@@ -131,6 +133,8 @@ gdk_drag_context_unref (GdkDragContext *context)
GdkDragContextPrivate *private = (GdkDragContextPrivate *)context; GdkDragContextPrivate *private = (GdkDragContextPrivate *)context;
private->ref_count--; private->ref_count--;
g_return_if_fail (context != NULL);
if (private->ref_count == 0) if (private->ref_count == 0)
{ {
g_dataset_destroy (private); g_dataset_destroy (private);
...@@ -157,10 +161,11 @@ gdk_drag_context_find (gboolean is_source, ...@@ -157,10 +161,11 @@ gdk_drag_context_find (gboolean is_source,
Window dest_xid) Window dest_xid)
{ {
GList *tmp_list = contexts; GList *tmp_list = contexts;
GdkDragContext *context;
while (tmp_list) while (tmp_list)
{ {
GdkDragContext *context = (GdkDragContext *)tmp_list->data; context = (GdkDragContext *)tmp_list->data;
if ((!context->is_source == !is_source) && if ((!context->is_source == !is_source) &&
((source_xid == None) || (context->source_window && ((source_xid == None) || (context->source_window &&
...@@ -458,7 +463,7 @@ get_client_window_at_coords_recurse (Window win, ...@@ -458,7 +463,7 @@ get_client_window_at_coords_recurse (Window win,
return None; return None;
} }
Window static Window
get_client_window_at_coords (GdkWindowCache *cache, get_client_window_at_coords (GdkWindowCache *cache,
Window ignore, Window ignore,
gint x_root, gint x_root,
...@@ -550,7 +555,7 @@ get_client_window_at_coords_recurse (Window win, ...@@ -550,7 +555,7 @@ get_client_window_at_coords_recurse (Window win,
return None; return None;
} }
Window static Window
get_client_window_at_coords (Window ignore, get_client_window_at_coords (Window ignore,
gint x_root, gint x_root,
gint y_root) gint y_root)
...@@ -2550,6 +2555,8 @@ gdk_drag_find_window (GdkDragContext *context, ...@@ -2550,6 +2555,8 @@ gdk_drag_find_window (GdkDragContext *context,
GdkDragContextPrivate *private = (GdkDragContextPrivate *)context; GdkDragContextPrivate *private = (GdkDragContextPrivate *)context;
Window dest; Window dest;
g_return_if_fail (context != NULL);
if (!private->window_cache) if (!private->window_cache)
private->window_cache = gdk_window_cache_new(); private->window_cache = gdk_window_cache_new();
...@@ -2596,6 +2603,8 @@ gdk_drag_motion (GdkDragContext *context, ...@@ -2596,6 +2603,8 @@ gdk_drag_motion (GdkDragContext *context,
{ {
GdkDragContextPrivate *private = (GdkDragContextPrivate *)context; GdkDragContextPrivate *private = (GdkDragContextPrivate *)context;
g_return_val_if_fail (context != NULL, FALSE);
if (context->dest_window != dest_window) if (context->dest_window != dest_window)
{ {
GdkEvent temp_event; GdkEvent temp_event;
...@@ -2707,6 +2716,8 @@ void ...@@ -2707,6 +2716,8 @@ void
gdk_drag_drop (GdkDragContext *context, gdk_drag_drop (GdkDragContext *context,
guint32 time) guint32 time)
{ {
g_return_if_fail (context != NULL);
if (context->dest_window) if (context->dest_window)
{ {
switch (context->protocol) switch (context->protocol)
...@@ -2731,6 +2742,8 @@ void ...@@ -2731,6 +2742,8 @@ void
gdk_drag_abort (GdkDragContext *context, gdk_drag_abort (GdkDragContext *context,
guint32 time) guint32 time)
{ {
g_return_if_fail (context != NULL);
gdk_drag_do_leave (context, time); gdk_drag_do_leave (context, time);
} }
...@@ -2744,7 +2757,7 @@ gdk_drag_status (GdkDragContext *context, ...@@ -2744,7 +2757,7 @@ gdk_drag_status (GdkDragContext *context,
GdkDragContextPrivate *private; GdkDragContextPrivate *private;
XEvent xev; XEvent xev;
g_return_if_fail (context != 0); g_return_if_fail (context != NULL);
private = (GdkDragContextPrivate *)context; private = (GdkDragContextPrivate *)context;
...@@ -2837,7 +2850,7 @@ gdk_drop_reply (GdkDragContext *context, ...@@ -2837,7 +2850,7 @@ gdk_drop_reply (GdkDragContext *context,
{ {
GdkDragContextPrivate *private; GdkDragContextPrivate *private;
g_return_if_fail (context != 0); g_return_if_fail (context != NULL);
private = (GdkDragContextPrivate *)context; private = (GdkDragContextPrivate *)context;
...@@ -2874,6 +2887,8 @@ gdk_drop_finish (GdkDragContext *context, ...@@ -2874,6 +2887,8 @@ gdk_drop_finish (GdkDragContext *context,
gboolean success, gboolean success,
guint32 time) guint32 time)
{ {
g_return_if_fail (context != NULL);
if (context->protocol == GDK_DRAG_PROTO_XDND) if (context->protocol == GDK_DRAG_PROTO_XDND)
{ {
XEvent xev; XEvent xev;
...@@ -2902,9 +2917,10 @@ void ...@@ -2902,9 +2917,10 @@ void
gdk_window_register_dnd (GdkWindow *window) gdk_window_register_dnd (GdkWindow *window)
{ {
static guint32 xdnd_version = 3; static guint32 xdnd_version = 3;
MotifDragReceiverInfo info; MotifDragReceiverInfo info;
g_return_if_fail (window != NULL);
/* Set Motif drag receiver information property */ /* Set Motif drag receiver information property */
if (!motif_drag_receiver_info_atom) if (!motif_drag_receiver_info_atom)
......
...@@ -25,9 +25,6 @@ ...@@ -25,9 +25,6 @@
#ifndef _XOPEN_SOURCE #ifndef _XOPEN_SOURCE
# define _XOPEN_SOURCE 1 # define _XOPEN_SOURCE 1
#endif #endif
#ifdef HAVE_FEATURES_H
# include <features.h>
#endif
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
......
...@@ -122,6 +122,8 @@ gdk_drag_context_new (void) ...@@ -122,6 +122,8 @@ gdk_drag_context_new (void)
void void
gdk_drag_context_ref (GdkDragContext *context) gdk_drag_context_ref (GdkDragContext *context)
{ {
g_return_if_fail (context != NULL);
((GdkDragContextPrivate *)context)->ref_count++; ((GdkDragContextPrivate *)context)->ref_count++;
} }
...@@ -131,6 +133,8 @@ gdk_drag_context_unref (GdkDragContext *context) ...@@ -131,6 +133,8 @@ gdk_drag_context_unref (GdkDragContext *context)
GdkDragContextPrivate *private = (GdkDragContextPrivate *)context; GdkDragContextPrivate *private = (GdkDragContextPrivate *)context;
private->ref_count--; private->ref_count--;
g_return_if_fail (context != NULL);
if (private->ref_count == 0) if (private->ref_count == 0)
{ {
g_dataset_destroy (private); g_dataset_destroy (private);
...@@ -157,10 +161,11 @@ gdk_drag_context_find (gboolean is_source, ...@@ -157,10 +161,11 @@ gdk_drag_context_find (gboolean is_source,
Window dest_xid) Window dest_xid)
{ {
GList *tmp_list = contexts; GList *tmp_list = contexts;
GdkDragContext *context;
while (tmp_list) while (tmp_list)
{ {
GdkDragContext *context = (GdkDragContext *)tmp_list->data; context = (GdkDragContext *)tmp_list->data;
if ((!context->is_source == !is_source) && if ((!context->is_source == !is_source) &&
((source_xid == None) || (context->source_window && ((source_xid == None) || (context->source_window &&
...@@ -458,7 +463,7 @@ get_client_window_at_coords_recurse (Window win, ...@@ -458,7 +463,7 @@ get_client_window_at_coords_recurse (Window win,
return None; return None;
} }
Window static Window
get_client_window_at_coords (GdkWindowCache *cache, get_client_window_at_coords (GdkWindowCache *cache,
Window ignore, Window ignore,
gint x_root, gint x_root,
...@@ -550,7 +555,7 @@ get_client_window_at_coords_recurse (Window win, ...@@ -550,7 +555,7 @@ get_client_window_at_coords_recurse (Window win,
return None; return None;
} }
Window static Window
get_client_window_at_coords (Window ignore, get_client_window_at_coords (Window ignore,
gint x_root, gint x_root,
gint y_root) gint y_root)
...@@ -2550,6 +2555,8 @@ gdk_drag_find_window (GdkDragContext *context, ...@@ -2550,6 +2555,8 @@ gdk_drag_find_window (GdkDragContext *context,
GdkDragContextPrivate *private = (GdkDragContextPrivate *)context; GdkDragContextPrivate *private = (GdkDragContextPrivate *)context;
Window dest; Window dest;
g_return_if_fail (context != NULL);
if (!private->window_cache) if (!private->window_cache)
private->window_cache = gdk_window_cache_new(); private->window_cache = gdk_window_cache_new();
...@@ -2596,6 +2603,8 @@ gdk_drag_motion (GdkDragContext *context, ...@@ -2596,6 +2603,8 @@ gdk_drag_motion (GdkDragContext *context,
{ {
GdkDragContextPrivate *private = (GdkDragContextPrivate *)context; GdkDragContextPrivate *private = (GdkDragContextPrivate *)context;
g_return_val_if_fail (context != NULL, FALSE);
if (context->dest_window != dest_window) if (context->dest_window != dest_window)
{ {
GdkEvent temp_event; GdkEvent temp_event;
...@@ -2707,6 +2716,8 @@ void ...@@ -2707,6 +2716,8 @@ void
gdk_drag_drop (GdkDragContext *context, gdk_drag_drop (GdkDragContext *context,
guint32 time) guint32 time)
{ {
g_return_if_fail (context != NULL);
if (context->dest_window) if (context->dest_window)
{ {
switch (context->protocol) switch (context->protocol)
...@@ -2731,6 +2742,8 @@ void ...@@ -2731,6 +2742,8 @@ void
gdk_drag_abort (GdkDragContext *context, gdk_drag_abort (GdkDragContext *context,
guint32 time) guint32 time)
{ {
g_return_if_fail (context != NULL);
gdk_drag_do_leave (context, time); gdk_drag_do_leave (context, time);
} }
...@@ -2744,7 +2757,7 @@ gdk_drag_status (GdkDragContext *context, ...@@ -2744,7 +2757,7 @@ gdk_drag_status (GdkDragContext *context,
GdkDragContextPrivate *private; GdkDragContextPrivate *private;
XEvent xev; XEvent xev;
g_return_if_fail (context != 0); g_return_if_fail (context != NULL);
private = (GdkDragContextPrivate *)context; private = (GdkDragContextPrivate *)context;
...@@ -2837,7 +2850,7 @@ gdk_drop_reply (GdkDragContext *context, ...@@ -2837,7 +2850,7 @@ gdk_drop_reply (GdkDragContext *context,
{ {
GdkDragContextPrivate *private; GdkDragContextPrivate *private;
g_return_if_fail (context != 0); g_return_if_fail (context != NULL);
private = (GdkDragContextPrivate *)context; private = (GdkDragContextPrivate *)context;
...@@ -2874,6 +2887,8 @@ gdk_drop_finish (GdkDragContext *context, ...@@ -2874,6 +2887,8 @@ gdk_drop_finish (GdkDragContext *context,
gboolean success, gboolean success,
guint32 time) guint32 time)
{ {
g_return_if_fail (context != NULL);
if (context->protocol == GDK_DRAG_PROTO_XDND) if (context->protocol == GDK_DRAG_PROTO_XDND)
{ {
XEvent xev; XEvent xev;
...@@ -2902,9 +2917,10 @@ void ...@@ -2902,9 +2917,10 @@ void
gdk_window_register_dnd (GdkWindow *window) gdk_window_register_dnd (GdkWindow *window)
{ {
static guint32 xdnd_version = 3; static guint32 xdnd_version = 3;
MotifDragReceiverInfo info; MotifDragReceiverInfo info;
g_return_if_fail (window != NULL);
/* Set Motif drag receiver information property */ /* Set Motif drag receiver information property */
if (!motif_drag_receiver_info_atom) if (!motif_drag_receiver_info_atom)
......
...@@ -25,9 +25,6 @@ ...@@ -25,9 +25,6 @@
#ifndef _XOPEN_SOURCE #ifndef _XOPEN_SOURCE
# define _XOPEN_SOURCE 1 # define _XOPEN_SOURCE 1
#endif #endif
#ifdef HAVE_FEATURES_H
# include <features.h>
#endif
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment