summaryrefslogtreecommitdiff
path: root/gdk/x11/gdkcc-x11.c
diff options
context:
space:
mode:
authorOwen Taylor <owt1@cornell.edu>1998-03-17 19:03:52 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-03-17 19:03:52 +0000
commit70b3b3e6e17331f34748528d71eeebec9101cde0 (patch)
treeec24fdb9dc06a5e45a2db12f4f76bcbbeb6da4cf /gdk/x11/gdkcc-x11.c
parenta783d668f17a08fbdf88c22aa6c07b05b4e8de34 (diff)
downloadgdk-pixbuf-70b3b3e6e17331f34748528d71eeebec9101cde0.tar.gz
Try to guess if we can use the mb* functions safely. (For glibc, they do
Tue Mar 17 01:55:00 1998 Owen Taylor <owt1@cornell.edu> * gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can use the mb* functions safely. (For glibc, they do UTF-8). Heuristic is (X_LOCALE && locale != C/POSIX) || (mblen("\xc0", MB_CUR_MAX) == 1). (From: "Richard Lloyd" <rkl@csc.liv.ac.uk>) * gdk/gdk.c (gdk_ic_get_attr): Use an intermediate variable to avoid taking the address of the result of va_arg. * gtk/gtkentry.c gtk/gtkeditable.c gtkobject.c gtk/testselection.c: signedness fixups * gtk/gtkcontainer.c: Fixed implicit cast between gpointer and func pointer by changing. * gtk/gtkcombo.c, gtk/gtkentry.c, gtk/gtktext.c: static void forward declaration vs. void actual fixed * gtk/testgtk.c: Limit total number of tree items to 10,000
Diffstat (limited to 'gdk/x11/gdkcc-x11.c')
-rw-r--r--gdk/x11/gdkcc-x11.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/gdk/x11/gdkcc-x11.c b/gdk/x11/gdkcc-x11.c
index 28ecad7fe..d55756874 100644
--- a/gdk/x11/gdkcc-x11.c
+++ b/gdk/x11/gdkcc-x11.c
@@ -851,8 +851,9 @@ gdk_color_context_get_pixels (GdkColorContext *cc,
gint bad_alloc = FALSE;
gint failed[MAX_IMAGE_COLORS], allocated[MAX_IMAGE_COLORS];
GdkColor defs[MAX_IMAGE_COLORS], cmap[MAX_IMAGE_COLORS];
+#ifdef G_ENABLE_DEBUG
gint exact_col = 0, subst_col = 0, close_col = 0, black_col = 0;
-
+#endif
g_assert (cc != NULL);
g_assert (reds != NULL);
g_assert (greens != NULL);
@@ -934,7 +935,7 @@ gdk_color_context_get_pixels (GdkColorContext *cc,
return;
}
-#ifdef DEBUG
+#ifdef G_ENABLE_DEBUG
exact_col = ncols;
#endif
@@ -1012,7 +1013,7 @@ gdk_color_context_get_pixels (GdkColorContext *cc,
defs[i] = cmap[close];
defs[i].pixel = colors[i];
allocated[ncols++] = colors[i];
-#ifdef DEBUG
+#ifdef G_ENABLE_DEBUG
close_col++;
#endif
} else
@@ -1086,14 +1087,14 @@ gdk_color_context_get_pixels (GdkColorContext *cc,
defs[i].pixel = cc->black_pixel;
defs[i].red = defs[i].green = defs[i].blue = 0;
-#ifdef DEBUG
+#ifdef G_ENABLE_DEBUG
black_col++;
#endif
}
else
{
defs[i] = defs[close];
-#ifdef DEBUG
+#ifdef G_ENABLE_DEBUG
subst_col++;
#endif
}
@@ -1123,7 +1124,9 @@ gdk_color_context_get_pixels_incremental (GdkColorContext *cc,
gint bad_alloc = FALSE;
gint failed[MAX_IMAGE_COLORS], allocated[MAX_IMAGE_COLORS];
GdkColor defs[MAX_IMAGE_COLORS], cmap[MAX_IMAGE_COLORS];
+#ifdef G_ENABLE_DEBUG
gint exact_col = 0, subst_col = 0, close_col = 0, black_col = 0;
+#endif
g_assert (cc != NULL);
g_assert (reds != NULL);
@@ -1204,7 +1207,7 @@ gdk_color_context_get_pixels_incremental (GdkColorContext *cc,
return;
}
-#ifdef DEBUG
+#ifdef G_ENABLE_DEBUG
exact_col = ncols;
#endif
@@ -1276,7 +1279,7 @@ gdk_color_context_get_pixels_incremental (GdkColorContext *cc,
defs[i] = cmap[close];
defs[i].pixel = colors[i];
allocated[ncols++] = colors[i];
-#ifdef DEBUG
+#ifdef G_ENABLE_DEBUG
close_col++;
#endif
}
@@ -1348,14 +1351,14 @@ gdk_color_context_get_pixels_incremental (GdkColorContext *cc,
defs[i].pixel = cc->black_pixel;
defs[i].red = defs[i].green = defs[i].blue = 0;
-#ifdef DEBUG
+#ifdef G_ENABLE_DEBUG
black_col++;
#endif
}
else
{
defs[i] = defs[close];
-#ifdef DEBUG
+#ifdef G_ENABLE_DEBUG
subst_col++;
#endif
}