Re: [gtk-list] ANSI C fixes for GTK 1.1.1
- From: Tim Janik <timj gtk org>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] ANSI C fixes for GTK 1.1.1
- Date: Mon, 17 Aug 1998 16:52:48 +0200 (CEST)
On Mon, 17 Aug 1998, Winfred van Kuijk wrote:
> The following fixes helped me to get GTK 1.1.1
> compile correctly with an ANSI C compiler
> (MipsPro C version 7.2.1 on my Silicon Graphics Indy).
>
> It deals with:
> - lvalue issues
> - inconsistent definitions (e.g. for gtk_accelerator_valid)
> - ...
hm, i just went through the code and made similar fixes...
> No guarantees it will work for everyone, but all
> tests in testgtk app seem to run fine.
>
> -Winfred
>
>
> diff -rc orig/gtk+-1.1.1/gtk/gtkctree.h gtk+-1.1.1/gtk/gtkctree.h
> *** orig/gtk+-1.1.1/gtk/gtkctree.h Wed Aug 5 04:19:01 1998
> --- gtk+-1.1.1/gtk/gtkctree.h Mon Aug 17 09:39:06 1998
> ***************
> *** 38,47 ****
> #define GTK_IS_CTREE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CTREE))
> #define GTK_IS_CTREE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CTREE))
>
> #define GTK_CTREE_ROW(_node_) ((GtkCTreeRow *)(((GList *)(_node_))->data))
> #define GTK_CTREE_NODE(_node_) ((GtkCTreeNode *)((_node_)))
> ! #define GTK_CTREE_NODE_NEXT(_nnode_) ((GtkCTreeNode *)(((GList *)(_nnode_))->next))
> ! #define GTK_CTREE_NODE_PREV(_pnode_) ((GtkCTreeNode *)(((GList *)(_pnode_))->prev))
> #define GTK_CTREE_TREE(_ctree_, _glist_) \
> ((GtkCellTree *) &(((GtkCTreeRow *)((_glist_)->data))->cell[(_ctree_)->tree_col]))
>
> --- 38,49 ----
> #define GTK_IS_CTREE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CTREE))
> #define GTK_IS_CTREE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CTREE))
>
> + #define LGTK_CTREE_ROW(_node_) (*(GtkCTreeRow **)(&((GList *)(_node_))->data))
> #define GTK_CTREE_ROW(_node_) ((GtkCTreeRow *)(((GList *)(_node_))->data))
> + #define LGTK_CTREE_NODE(_node_) (*(GtkCTreeNode **)(&(_node_)))
> #define GTK_CTREE_NODE(_node_) ((GtkCTreeNode *)((_node_)))
> ! #define GTK_CTREE_NODE_NEXT(_nnode_) (*(GtkCTreeNode **)(&((GList *)(_nnode_))->next))
> ! #define GTK_CTREE_NODE_PREV(_pnode_) (*(GtkCTreeNode **)(&((GList *)(_pnode_))->prev))
> #define GTK_CTREE_TREE(_ctree_, _glist_) \
> ((GtkCellTree *) &(((GtkCTreeRow *)((_glist_)->data))->cell[(_ctree_)->tree_col]))
this one gives me:
invalid lvalue for unary operator `&'.
>
> diff -rc orig/gtk+-1.1.1/gtk/gtkeditable.c gtk+-1.1.1/gtk/gtkeditable.c
> *** orig/gtk+-1.1.1/gtk/gtkeditable.c Fri Jul 24 04:23:59 1998
> --- gtk+-1.1.1/gtk/gtkeditable.c Mon Aug 17 09:43:23 1998
> ***************
> *** 533,539 ****
>
> klass = GTK_EDITABLE_CLASS (GTK_OBJECT (editable)->klass);
>
> ! return klass->set_position (editable, position);
> }
>
> gint
> --- 533,539 ----
>
> klass = GTK_EDITABLE_CLASS (GTK_OBJECT (editable)->klass);
>
> ! /* return klass->set_position (editable, position); */
this needs to be plain
klass->set_position (editable, position);
> }
>
> gint
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]