diff options
author | Tim Janik <timj@gtk.org> | 1998-08-16 21:14:11 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-08-16 21:14:11 +0000 |
commit | d5803865b40fbdf2ebec2dafbf9974bd590ebf40 (patch) | |
tree | d37c300e9b3aa003c6b0475e6a5c650a63920294 /gnode.c | |
parent | ab385b6f0590028ea9479aa26b0e97683e560215 (diff) |
version bump to 1.1.3, binary age 0, interface age 0.
Sun Aug 16 20:28:27 1998 Tim Janik <timj@gtk.org>
* version bump to 1.1.3, binary age 0, interface age 0.
* glib.h: be nice to platforms that don't have gint64 and don't
issue #warning on every compilation. since glib doesn't require
gint64 itself, packages that need gint64 should test for this
themselves.
* glib.h:
* gutils.c: added a new function g_vsnprintf().
Fri Aug 14 16:41:53 1998 Tim Janik <timj@gtk.org>
* glib.h: added static inline functions for bit mask tests:
g_bit_nth_lsf, g_bit_nth_msf and g_bit_storage.
Fri Aug 13 14:23:37 1998 Tim Janik <timj@gtk.org>
* glib.h:
* gmessages.c:
revised the message handling system, which is now based on a new
mechanism g_log*. most of the assertment macros got adapted to
feature the new g_log() call with an additional specification of
the log level in a preprocessor macro G_LOG_DOMAIN. if G_LOG_DOMAIN
is undefined upon the includion of glib.h, it'll be defined with a
value of (NULL) and thus preserves the original bahaviour for
warning and error messages. the message handler setting functions
for g_warning, g_error and g_message are only provided for backwards
compatibility and might get removed somewhen.
* Makefile.am: feature the G_LOG_DOMAIN macro to set the log domain
to "GLib" upon compilation. we currently have to add this definition
to the DEFS variable.
* testglib.c: we need an ugly #undef G_LOG_DOMAIN at the start
of this file currently, since automake doesn't support per target
_CFLAGS yet.
* glib.h: changed some gints to gbooleans, made a few const corrections,
removed some superfluous G_STMT_START{}G_STMT_END wrappers, added some
in other required places.
* gnode.c:
(g_node_prepend):
(g_node_insert_before):
(g_node_insert):
(g_node_append_data):
(g_node_prepend_data):
(g_node_insert_data_before):
(g_node_insert_data):
(g_node_append):
return (node), so these macros/functions can be usefully chained with
g_node_new().
[GModule]
Fri Aug 14 02:24:39 1998 Tim Janik <timj@gtk.org>
* Makefile.am: feature the G_LOG_DOMAIN macro to set the log domain
to "GModule" upon compilation. we currently have to add this definition
to the DEFS variable.
* testgmodule.c: we need an ugly #undef G_LOG_DOMAIN at the start
of this file currently, since automake doesn't support per target
_CFLAGS yet.
Diffstat (limited to 'gnode.c')
-rw-r--r-- | gnode.c | 38 |
1 files changed, 20 insertions, 18 deletions
@@ -113,35 +113,35 @@ g_node_unlink (GNode *node) node->prev = NULL; } -void +GNode* g_node_insert (GNode *parent, gint position, GNode *node) { - g_return_if_fail (parent != NULL); - g_return_if_fail (node != NULL); - g_return_if_fail (G_NODE_IS_ROOT (node)); + g_return_val_if_fail (parent != NULL, node); + g_return_val_if_fail (node != NULL, node); + g_return_val_if_fail (G_NODE_IS_ROOT (node), node); if (position > 0) - g_node_insert_before (parent, - g_node_nth_child (parent, position), - node); + return g_node_insert_before (parent, + g_node_nth_child (parent, position), + node); else if (position == 0) - g_node_prepend (parent, node); - else if (position < 0) - g_node_append (parent, node); + return g_node_prepend (parent, node); + else /* if (position < 0) */ + return g_node_append (parent, node); } -void +GNode* g_node_insert_before (GNode *parent, GNode *sibling, GNode *node) { - g_return_if_fail (parent != NULL); - g_return_if_fail (node != NULL); - g_return_if_fail (G_NODE_IS_ROOT (node)); + g_return_val_if_fail (parent != NULL, node); + g_return_val_if_fail (node != NULL, node); + g_return_val_if_fail (G_NODE_IS_ROOT (node), node); if (sibling) - g_return_if_fail (sibling->parent == parent); + g_return_val_if_fail (sibling->parent == parent, node); node->parent = parent; @@ -174,15 +174,17 @@ g_node_insert_before (GNode *parent, else node->parent->children = node; } + + return node; } -void +GNode* g_node_prepend (GNode *parent, GNode *node) { - g_return_if_fail (parent != NULL); + g_return_val_if_fail (parent != NULL, node); - g_node_insert_before (parent, parent->children, node); + return g_node_insert_before (parent, parent->children, node); } GNode* |