+Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
+
+ * gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
+ ENABLE_MEM_CHECK, from Art Haas <ahaas@neosoft.com>.
+
+ * gslist.c (g_slist_reverse): shut up compiler.
+
+ * gscanner.c (g_scanner_get_token_ll): removed inline assignment.
+
+ * garray.c: remove index>=0 checks for unsigned indices.
+
+ * gmain.c (g_idle_prepare): timeout assignment fix.
+
+ * gtree.c (g_tree_node_rotate_right): shut up compiler.
+
2000-05-13 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in
+Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
+
+ * gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
+ ENABLE_MEM_CHECK, from Art Haas <ahaas@neosoft.com>.
+
+ * gslist.c (g_slist_reverse): shut up compiler.
+
+ * gscanner.c (g_scanner_get_token_ll): removed inline assignment.
+
+ * garray.c: remove index>=0 checks for unsigned indices.
+
+ * gmain.c (g_idle_prepare): timeout assignment fix.
+
+ * gtree.c (g_tree_node_rotate_right): shut up compiler.
+
2000-05-13 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in
+Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
+
+ * gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
+ ENABLE_MEM_CHECK, from Art Haas <ahaas@neosoft.com>.
+
+ * gslist.c (g_slist_reverse): shut up compiler.
+
+ * gscanner.c (g_scanner_get_token_ll): removed inline assignment.
+
+ * garray.c: remove index>=0 checks for unsigned indices.
+
+ * gmain.c (g_idle_prepare): timeout assignment fix.
+
+ * gtree.c (g_tree_node_rotate_right): shut up compiler.
+
2000-05-13 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in
+Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
+
+ * gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
+ ENABLE_MEM_CHECK, from Art Haas <ahaas@neosoft.com>.
+
+ * gslist.c (g_slist_reverse): shut up compiler.
+
+ * gscanner.c (g_scanner_get_token_ll): removed inline assignment.
+
+ * garray.c: remove index>=0 checks for unsigned indices.
+
+ * gmain.c (g_idle_prepare): timeout assignment fix.
+
+ * gtree.c (g_tree_node_rotate_right): shut up compiler.
+
2000-05-13 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in
+Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
+
+ * gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
+ ENABLE_MEM_CHECK, from Art Haas <ahaas@neosoft.com>.
+
+ * gslist.c (g_slist_reverse): shut up compiler.
+
+ * gscanner.c (g_scanner_get_token_ll): removed inline assignment.
+
+ * garray.c: remove index>=0 checks for unsigned indices.
+
+ * gmain.c (g_idle_prepare): timeout assignment fix.
+
+ * gtree.c (g_tree_node_rotate_right): shut up compiler.
+
2000-05-13 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in
+Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
+
+ * gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
+ ENABLE_MEM_CHECK, from Art Haas <ahaas@neosoft.com>.
+
+ * gslist.c (g_slist_reverse): shut up compiler.
+
+ * gscanner.c (g_scanner_get_token_ll): removed inline assignment.
+
+ * garray.c: remove index>=0 checks for unsigned indices.
+
+ * gmain.c (g_idle_prepare): timeout assignment fix.
+
+ * gtree.c (g_tree_node_rotate_right): shut up compiler.
+
2000-05-13 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in
+Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
+
+ * gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
+ ENABLE_MEM_CHECK, from Art Haas <ahaas@neosoft.com>.
+
+ * gslist.c (g_slist_reverse): shut up compiler.
+
+ * gscanner.c (g_scanner_get_token_ll): removed inline assignment.
+
+ * garray.c: remove index>=0 checks for unsigned indices.
+
+ * gmain.c (g_idle_prepare): timeout assignment fix.
+
+ * gtree.c (g_tree_node_rotate_right): shut up compiler.
+
2000-05-13 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in
+Fri May 19 09:00:44 2000 Tim Janik <timj@gtk.org>
+
+ * gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
+ ENABLE_MEM_CHECK, from Art Haas <ahaas@neosoft.com>.
+
+ * gslist.c (g_slist_reverse): shut up compiler.
+
+ * gscanner.c (g_scanner_get_token_ll): removed inline assignment.
+
+ * garray.c: remove index>=0 checks for unsigned indices.
+
+ * gmain.c (g_idle_prepare): timeout assignment fix.
+
+ * gtree.c (g_tree_node_rotate_right): shut up compiler.
+
2000-05-13 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in
g_return_val_if_fail (array, NULL);
- g_return_val_if_fail (index >= 0 && index < array->len, NULL);
+ g_return_val_if_fail (index < array->len, NULL);
if (index != array->len - 1)
g_memmove (g_array_elt_pos (array, index),
GArray*
g_array_remove_index_fast (GArray* farray,
- guint index)
+ guint index)
{
GRealArray* array = (GRealArray*) farray;
g_return_val_if_fail (array, NULL);
- g_return_val_if_fail (index >= 0 && index < array->len, NULL);
+ g_return_val_if_fail (index < array->len, NULL);
if (index != array->len - 1)
g_memmove (g_array_elt_pos (array, index),
gpointer
g_ptr_array_remove_index (GPtrArray* farray,
- guint index)
+ guint index)
{
GRealPtrArray* array = (GRealPtrArray*) farray;
gpointer result;
g_return_val_if_fail (array, NULL);
- g_return_val_if_fail (index >= 0 && index < array->len, NULL);
+ g_return_val_if_fail (index < array->len, NULL);
result = array->pdata[index];
gpointer
g_ptr_array_remove_index_fast (GPtrArray* farray,
- guint index)
+ guint index)
{
GRealPtrArray* array = (GRealPtrArray*) farray;
gpointer result;
g_return_val_if_fail (array, NULL);
- g_return_val_if_fail (index >= 0 && index < array->len, NULL);
+ g_return_val_if_fail (index < array->len, NULL);
result = array->pdata[index];
register gint len;
register gint i;
register gint plen;
- gchar* postfix=NULL;
+ gchar* postfix;
gchar* s;
if (!new_prefix)
g_return_val_if_fail (array, NULL);
- g_return_val_if_fail (index >= 0 && index < array->len, NULL);
+ g_return_val_if_fail (index < array->len, NULL);
if (index != array->len - 1)
g_memmove (g_array_elt_pos (array, index),
GArray*
g_array_remove_index_fast (GArray* farray,
- guint index)
+ guint index)
{
GRealArray* array = (GRealArray*) farray;
g_return_val_if_fail (array, NULL);
- g_return_val_if_fail (index >= 0 && index < array->len, NULL);
+ g_return_val_if_fail (index < array->len, NULL);
if (index != array->len - 1)
g_memmove (g_array_elt_pos (array, index),
gpointer
g_ptr_array_remove_index (GPtrArray* farray,
- guint index)
+ guint index)
{
GRealPtrArray* array = (GRealPtrArray*) farray;
gpointer result;
g_return_val_if_fail (array, NULL);
- g_return_val_if_fail (index >= 0 && index < array->len, NULL);
+ g_return_val_if_fail (index < array->len, NULL);
result = array->pdata[index];
gpointer
g_ptr_array_remove_index_fast (GPtrArray* farray,
- guint index)
+ guint index)
{
GRealPtrArray* array = (GRealPtrArray*) farray;
gpointer result;
g_return_val_if_fail (array, NULL);
- g_return_val_if_fail (index >= 0 && index < array->len, NULL);
+ g_return_val_if_fail (index < array->len, NULL);
result = array->pdata[index];
register gint len;
register gint i;
register gint plen;
- gchar* postfix=NULL;
+ gchar* postfix;
gchar* s;
if (!new_prefix)
gint *timeout,
gpointer user_data)
{
- timeout = 0;
+ *timeout = 0;
+
return TRUE;
}
#ifdef ENABLE_MEM_CHECK
t = (gulong*) ((guchar*) mem - SIZEOF_LONG);
if (*t >= 1)
- g_warning ("freeing previously freed memory\n");
+ g_warning ("freeing previously freed (%lu times) memory\n", *t);
*t += 1;
mem = t;
- memset ((guchar*) mem + 8, 0, size);
+ memset ((guchar*) mem + 2 * SIZEOF_LONG, 0, size);
#else /* ENABLE_MEM_CHECK */
free (mem);
#endif /* ENABLE_MEM_CHECK */
t = (gulong*) ((guchar*) mem - SIZEOF_LONG - SIZEOF_LONG);
if (*t >= 1)
- g_warning ("mem: 0x%08x has been freed %lu times\n", (gulong) mem, *t);
+ g_warning ("mem: 0x%08lx has been freed %lu times\n", (gulong) mem, *t);
#endif /* ENABLE_MEM_CHECK */
}
token = G_TOKEN_COMMENT_SINGLE;
in_comment_single = TRUE;
gstring = g_string_new ("");
- while ((ch = g_scanner_get_char (scanner,
- line_p,
- position_p)) != 0)
+ ch = g_scanner_get_char (scanner, line_p, position_p);
+ while (ch != 0)
{
if (ch == config->cpair_comment_single[1])
{
}
gstring = g_string_append_c (gstring, ch);
- ch = 0;
+ ch = g_scanner_get_char (scanner, line_p, position_p);
}
}
else if (config->scan_identifier && ch &&
g_slist_reverse (GSList *list)
{
GSList *prev = NULL;
- GSList *next = NULL;
while (list)
{
- next = list->next;
+ GSList *next = list->next;
+
list->next = prev;
prev = list;
g_tree_node_rotate_right (GTreeNode *node)
{
GTreeNode *left;
- GTreeNode *right;
gint a_bal;
gint b_bal;
left = node->left;
- right = node->right;
node->left = left->right;
left->right = node;
gint *timeout,
gpointer user_data)
{
- timeout = 0;
+ *timeout = 0;
+
return TRUE;
}
#ifdef ENABLE_MEM_CHECK
t = (gulong*) ((guchar*) mem - SIZEOF_LONG);
if (*t >= 1)
- g_warning ("freeing previously freed memory\n");
+ g_warning ("freeing previously freed (%lu times) memory\n", *t);
*t += 1;
mem = t;
- memset ((guchar*) mem + 8, 0, size);
+ memset ((guchar*) mem + 2 * SIZEOF_LONG, 0, size);
#else /* ENABLE_MEM_CHECK */
free (mem);
#endif /* ENABLE_MEM_CHECK */
t = (gulong*) ((guchar*) mem - SIZEOF_LONG - SIZEOF_LONG);
if (*t >= 1)
- g_warning ("mem: 0x%08x has been freed %lu times\n", (gulong) mem, *t);
+ g_warning ("mem: 0x%08lx has been freed %lu times\n", (gulong) mem, *t);
#endif /* ENABLE_MEM_CHECK */
}
token = G_TOKEN_COMMENT_SINGLE;
in_comment_single = TRUE;
gstring = g_string_new ("");
- while ((ch = g_scanner_get_char (scanner,
- line_p,
- position_p)) != 0)
+ ch = g_scanner_get_char (scanner, line_p, position_p);
+ while (ch != 0)
{
if (ch == config->cpair_comment_single[1])
{
}
gstring = g_string_append_c (gstring, ch);
- ch = 0;
+ ch = g_scanner_get_char (scanner, line_p, position_p);
}
}
else if (config->scan_identifier && ch &&
g_slist_reverse (GSList *list)
{
GSList *prev = NULL;
- GSList *next = NULL;
while (list)
{
- next = list->next;
+ GSList *next = list->next;
+
list->next = prev;
prev = list;
g_tree_node_rotate_right (GTreeNode *node)
{
GTreeNode *left;
- GTreeNode *right;
gint a_bal;
gint b_bal;
left = node->left;
- right = node->right;
node->left = left->right;
left->right = node;
GDateDay day;
gchar buf[101];
gchar* loc;
-
/* Try to get all the leap year cases. */
GDateYear check_years[] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
3000, 3001, 3002, 3998, 3999, 4000, 4001, 4002, 4003
};
-
guint n_check_years = sizeof(check_years)/sizeof(GDateYear);
-
- guint i = 0;
- gboolean discontinuity = FALSE;
+ guint i;
+ gboolean discontinuity;
g_print("checking GDate...");
GDateDay day;
gchar buf[101];
gchar* loc;
-
/* Try to get all the leap year cases. */
GDateYear check_years[] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
3000, 3001, 3002, 3998, 3999, 4000, 4001, 4002, 4003
};
-
guint n_check_years = sizeof(check_years)/sizeof(GDateYear);
-
- guint i = 0;
- gboolean discontinuity = FALSE;
+ guint i;
+ gboolean discontinuity;
g_print("checking GDate...");