Commit 85a8bdb1 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Fixes for #78258

Thu May 16 14:51:14 2002  Owen Taylor  <otaylor@redhat.com>

        Fixes for #78258

        * gtk/gtkrbtree.c demos/gtk-demo/editable-cells.c:
        Fix some 64-bit warning problems. (Patch from Matthias
        Clasen.)

        * gtk/gtkrbtree.c (_gtk_rbtree_debug_spew_helper): Surround
        a bunch of debug code with G_ENABLE_DEBUG.

        * configure.in demos/gtk-demo/main.c: Replace
        #ifndef G_OS_WIN32 with proper #ifdef HAVE_FLOCKFILE.
parent ce5029df
Thu May 16 14:51:14 2002 Owen Taylor <otaylor@redhat.com>
Fixes for #78258
* gtk/gtkrbtree.c demos/gtk-demo/editable-cells.c:
Fix some 64-bit warning problems. (Patch from Matthias
Clasen.)
* gtk/gtkrbtree.c (_gtk_rbtree_debug_spew_helper): Surround
a bunch of debug code with G_ENABLE_DEBUG.
* configure.in demos/gtk-demo/main.c: Replace
#ifndef G_OS_WIN32 with proper #ifdef HAVE_FLOCKFILE.
Thu May 16 12:56:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrange.c (gtk_range_calc_layout): Fix a missed
......
Thu May 16 14:51:14 2002 Owen Taylor <otaylor@redhat.com>
Fixes for #78258
* gtk/gtkrbtree.c demos/gtk-demo/editable-cells.c:
Fix some 64-bit warning problems. (Patch from Matthias
Clasen.)
* gtk/gtkrbtree.c (_gtk_rbtree_debug_spew_helper): Surround
a bunch of debug code with G_ENABLE_DEBUG.
* configure.in demos/gtk-demo/main.c: Replace
#ifndef G_OS_WIN32 with proper #ifdef HAVE_FLOCKFILE.
Thu May 16 12:56:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrange.c (gtk_range_calc_layout): Fix a missed
......
Thu May 16 14:51:14 2002 Owen Taylor <otaylor@redhat.com>
Fixes for #78258
* gtk/gtkrbtree.c demos/gtk-demo/editable-cells.c:
Fix some 64-bit warning problems. (Patch from Matthias
Clasen.)
* gtk/gtkrbtree.c (_gtk_rbtree_debug_spew_helper): Surround
a bunch of debug code with G_ENABLE_DEBUG.
* configure.in demos/gtk-demo/main.c: Replace
#ifndef G_OS_WIN32 with proper #ifdef HAVE_FLOCKFILE.
Thu May 16 12:56:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrange.c (gtk_range_calc_layout): Fix a missed
......
Thu May 16 14:51:14 2002 Owen Taylor <otaylor@redhat.com>
Fixes for #78258
* gtk/gtkrbtree.c demos/gtk-demo/editable-cells.c:
Fix some 64-bit warning problems. (Patch from Matthias
Clasen.)
* gtk/gtkrbtree.c (_gtk_rbtree_debug_spew_helper): Surround
a bunch of debug code with G_ENABLE_DEBUG.
* configure.in demos/gtk-demo/main.c: Replace
#ifndef G_OS_WIN32 with proper #ifdef HAVE_FLOCKFILE.
Thu May 16 12:56:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrange.c (gtk_range_calc_layout): Fix a missed
......
Thu May 16 14:51:14 2002 Owen Taylor <otaylor@redhat.com>
Fixes for #78258
* gtk/gtkrbtree.c demos/gtk-demo/editable-cells.c:
Fix some 64-bit warning problems. (Patch from Matthias
Clasen.)
* gtk/gtkrbtree.c (_gtk_rbtree_debug_spew_helper): Surround
a bunch of debug code with G_ENABLE_DEBUG.
* configure.in demos/gtk-demo/main.c: Replace
#ifndef G_OS_WIN32 with proper #ifdef HAVE_FLOCKFILE.
Thu May 16 12:56:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrange.c (gtk_range_calc_layout): Fix a missed
......
Thu May 16 14:51:14 2002 Owen Taylor <otaylor@redhat.com>
Fixes for #78258
* gtk/gtkrbtree.c demos/gtk-demo/editable-cells.c:
Fix some 64-bit warning problems. (Patch from Matthias
Clasen.)
* gtk/gtkrbtree.c (_gtk_rbtree_debug_spew_helper): Surround
a bunch of debug code with G_ENABLE_DEBUG.
* configure.in demos/gtk-demo/main.c: Replace
#ifndef G_OS_WIN32 with proper #ifdef HAVE_FLOCKFILE.
Thu May 16 12:56:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrange.c (gtk_range_calc_layout): Fix a missed
......
......@@ -331,7 +331,7 @@ if test "x$enable_rebuilds" = "xyes" && \
fi
AC_SUBST(REBUILD)
AC_CHECK_FUNCS(lstat mkstemp)
AC_CHECK_FUNCS(lstat mkstemp flockfile)
# sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
AC_MSG_CHECKING(for sigsetjmp)
......
......@@ -158,7 +158,7 @@ cell_edited (GtkCellRendererText *cell,
gtk_tree_model_get_iter (model, &iter, path);
switch ((gint) column)
switch (G_POINTER_TO_INT (column))
{
case COLUMN_NUMBER:
{
......
......@@ -86,7 +86,7 @@ read_line (FILE *stream, GString *str)
{
int n_read = 0;
#ifndef G_OS_WIN32
#ifdef HAVE_FLOCKFILE
flockfile (stream);
#endif
......@@ -112,7 +112,7 @@ read_line (FILE *stream, GString *str)
case '\r':
case '\n':
{
#ifndef G_OS_WIN32
#ifdef HAVE_FLOCKFILE
int next_c = getc_unlocked (stream);
#else
int next_c = getc (stream);
......@@ -132,7 +132,7 @@ read_line (FILE *stream, GString *str)
done:
#ifndef G_OS_WIN32
#ifdef HAVE_FLOCKFILE
funlockfile (stream);
#endif
......
Thu May 16 15:02:46 2002 Owen Taylor <otaylor@redhat.com>
* gdk-pixdata.c (gdk_pixdata_to_csource): Fix 64-bit warning.
(#78258)
2002-05-07 Michael Natterer <mitch@gimp.org>
* gdk-pixbuf/Makefile.am: build the static pixbuf loaders
......
......@@ -707,9 +707,9 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
cdata.static_prefix, cdata.const_prefix, name);
APPEND (gstring, " 0x%x, /* Pixbuf magic: 'GdkP' */\n",
GDK_PIXBUF_MAGIC_NUMBER);
APPEND (gstring, " %u + %u, /* header length + pixel_data length */\n",
APPEND (gstring, " %u + %lu, /* header length + pixel_data length */\n",
GDK_PIXDATA_HEADER_LENGTH,
rle_encoded ? img_buffer_end - img_buffer : rowstride * height);
rle_encoded ? (glong)(img_buffer_end - img_buffer) : (glong)rowstride * height);
APPEND (gstring, " 0x%x, /* pixdata_type */\n",
pixdata->pixdata_type);
APPEND (gstring, " %u, /* rowstride */\n",
......
......@@ -529,12 +529,14 @@ _gtk_rbtree_insert_after (GtkRBTree *tree,
GtkRBNode *tmp_node;
GtkRBTree *tmp_tree;
#ifdef G_ENABLE_DEBUG
if (gtk_debug_flags & GTK_DEBUG_TREE)
{
g_print ("\n\n_gtk_rbtree_insert_after: 0x%x\n", (gint) current);
g_print ("\n\n_gtk_rbtree_insert_after: %p\n", current);
_gtk_rbtree_debug_spew (tree);
_gtk_rbtree_test (G_STRLOC, tree);
}
#endif /* G_ENABLE_DEBUG */
if (current != NULL && current->right != tree->nil)
{
......@@ -588,6 +590,7 @@ _gtk_rbtree_insert_after (GtkRBTree *tree,
_gtk_rbtree_insert_fixup (tree, node);
#ifdef G_ENABLE_DEBUG
if (gtk_debug_flags & GTK_DEBUG_TREE)
{
g_print ("_gtk_rbtree_insert_after finished...\n");
......@@ -595,6 +598,7 @@ _gtk_rbtree_insert_after (GtkRBTree *tree,
g_print ("\n\n");
_gtk_rbtree_test (G_STRLOC, tree);
}
#endif /* G_ENABLE_DEBUG */
return node;
}
......@@ -609,14 +613,16 @@ _gtk_rbtree_insert_before (GtkRBTree *tree,
gboolean left = TRUE;
GtkRBNode *tmp_node;
GtkRBTree *tmp_tree;
#ifdef G_ENABLE_DEBUG
if (gtk_debug_flags & GTK_DEBUG_TREE)
{
g_print ("\n\n_gtk_rbtree_insert_before: 0x%x\n", (gint) current);
g_print ("\n\n_gtk_rbtree_insert_before: %p\n", current);
_gtk_rbtree_debug_spew (tree);
_gtk_rbtree_test (G_STRLOC, tree);
}
#endif /* G_ENABLE_DEBUG */
if (current != NULL && current->left != tree->nil)
{
current = current->left;
......@@ -670,6 +676,7 @@ _gtk_rbtree_insert_before (GtkRBTree *tree,
_gtk_rbtree_insert_fixup (tree, node);
#ifdef G_ENABLE_DEBUG
if (gtk_debug_flags & GTK_DEBUG_TREE)
{
g_print ("_gtk_rbtree_insert_before finished...\n");
......@@ -677,7 +684,8 @@ _gtk_rbtree_insert_before (GtkRBTree *tree,
g_print ("\n\n");
_gtk_rbtree_test (G_STRLOC, tree);
}
#endif /* G_ENABLE_DEBUG */
return node;
}
......@@ -1196,12 +1204,16 @@ _gtk_rbtree_remove_node (GtkRBTree *tree,
g_return_if_fail (tree != NULL);
g_return_if_fail (node != NULL);
#ifdef G_ENABLE_DEBUG
if (gtk_debug_flags & GTK_DEBUG_TREE)
{
g_print ("\n\n_gtk_rbtree_remove_node: 0x%x\n", (gint) node);
g_print ("\n\n_gtk_rbtree_remove_node: %p\n", node);
_gtk_rbtree_debug_spew (tree);
_gtk_rbtree_test (G_STRLOC, tree);
}
#endif /* G_ENABLE_DEBUG */
/* make sure we're deleting a node that's actually in the tree */
for (x = node; x->parent != tree->nil; x = x->parent)
;
......@@ -1335,6 +1347,7 @@ _gtk_rbtree_remove_node (GtkRBTree *tree,
_gtk_rbtree_remove_node_fixup (tree, x);
_gtk_rbnode_free (y);
#ifdef G_ENABLE_DEBUG
if (gtk_debug_flags & GTK_DEBUG_TREE)
{
g_print ("_gtk_rbtree_remove_node finished...\n");
......@@ -1342,6 +1355,7 @@ _gtk_rbtree_remove_node (GtkRBTree *tree,
g_print ("\n\n");
_gtk_rbtree_test (G_STRLOC, tree);
}
#endif /* G_ENABLE_DEBUG */
}
GtkRBNode *
......@@ -1585,6 +1599,7 @@ void _fixup_parity (GtkRBTree *tree,
((node->right != tree->nil) ? node->right->parity : 0);
}
#ifdef G_ENABLE_DEBUG
static guint
get_parity (GtkRBNode *node)
{
......@@ -1785,8 +1800,8 @@ _gtk_rbtree_debug_spew_helper (GtkRBTree *tree,
for (i = 0; i < depth; i++)
g_print ("\t");
g_print ("(0x%x - %s) (Offset %d) (Parity %d) (Validity %d%d%d)\n",
(gint) node,
g_print ("(%p - %s) (Offset %d) (Parity %d) (Validity %d%d%d)\n",
node,
(GTK_RBNODE_GET_COLOR (node) == GTK_RBNODE_BLACK)?"BLACK":" RED ",
node->offset,
node->parity?1:0,
......@@ -1819,3 +1834,4 @@ _gtk_rbtree_debug_spew (GtkRBTree *tree)
else
_gtk_rbtree_debug_spew_helper (tree, tree->root, 0);
}
#endif /* G_ENABLE_DEBUG */
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