Commit 4628759d authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

renamed g_string_equal => g_str_equal renamed g_string_hash => g_str_hash

Sat Jan 17 23:52:40 1998  Owen Taylor  <owt1@cornell.edu>

	* gstring.{c,h} gscanner.c:
	   renamed g_string_equal => g_str_equal
	   renamed g_string_hash => g_str_hash
	  And const corrected. Old functions left in for now.
parent 11d37c50
Sun Jan 18 09:57:00 1998 Owen Taylor <owt1@cornell.edu>
* gtkbutton.c gtkclist.c gtkdrawingarea.c gtkentry.c gtkeventbox.c
gtkfixed.c gtkhandlebox.c gtkhscale.c gtkhscrollbar.c gtkitem.c
gtklist.c gtkmenushell.c gtkmisc.c gtknotebook.c gtkpaned.c
gtkpreview.c gtkprogressbar.c gtkruler.c gtktext.c gtktree.c
gtkviewport.c gtkvscale.c gtkvscrollbar.c gtkwidget.{c,h}
Added gtk_widget_set_parent and gtk_widget_get_parent. All
widgets should use:
gtk_widget_get_parent() instead of widget->parent->window.
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkdrawingarea.c
gtk/gtkentry.c gtk/gtkeventbox.c gtk/gtkfixed.c
gtk/gtkhandlebox.c gtk/gtkhscale.c gtk/gtkhscrollbar.c
gtk/gtkitem.c gtk/gtklist.c gtk/gtkmenushell.c gtk/gtkmisc.c
gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtkpreview.c
gtk/gtkprogressbar.c gtk/gtkruler.c gtk/gtktext.c gtk/gtktree.c
gtk/gtkviewport.c gtk/gtkvscale.c gtk/gtkvscrollbar.c
gtk/gtkwidget.{c,h}
Added gtk_widget_set_parent_window() and
gtk_widget_get_parent_window(). All widgets should use:
gtk_widget_get_parent_window() instead of widget->parent->window.
Any widget that wants to have children not in the parent window,
should use gtk_widget_set_parent () in their realize() and
add () routines.
should use gtk_widget_set_parent() in their realize() and
add() routines.
CList and Viewport widgets changed to do this. (Viewport
widget using code from gtk-fortier-980117-0.patch.)
Sat Jan 17 23:56:02 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkobject.c:
renamed g_string_equal => g_str_equal
renamed g_string_hash => g_str_hash
......
Sun Jan 18 09:57:00 1998 Owen Taylor <owt1@cornell.edu>
* gtkbutton.c gtkclist.c gtkdrawingarea.c gtkentry.c gtkeventbox.c
gtkfixed.c gtkhandlebox.c gtkhscale.c gtkhscrollbar.c gtkitem.c
gtklist.c gtkmenushell.c gtkmisc.c gtknotebook.c gtkpaned.c
gtkpreview.c gtkprogressbar.c gtkruler.c gtktext.c gtktree.c
gtkviewport.c gtkvscale.c gtkvscrollbar.c gtkwidget.{c,h}
Added gtk_widget_set_parent and gtk_widget_get_parent. All
widgets should use:
gtk_widget_get_parent() instead of widget->parent->window.
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkdrawingarea.c
gtk/gtkentry.c gtk/gtkeventbox.c gtk/gtkfixed.c
gtk/gtkhandlebox.c gtk/gtkhscale.c gtk/gtkhscrollbar.c
gtk/gtkitem.c gtk/gtklist.c gtk/gtkmenushell.c gtk/gtkmisc.c
gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtkpreview.c
gtk/gtkprogressbar.c gtk/gtkruler.c gtk/gtktext.c gtk/gtktree.c
gtk/gtkviewport.c gtk/gtkvscale.c gtk/gtkvscrollbar.c
gtk/gtkwidget.{c,h}
Added gtk_widget_set_parent_window() and
gtk_widget_get_parent_window(). All widgets should use:
gtk_widget_get_parent_window() instead of widget->parent->window.
Any widget that wants to have children not in the parent window,
should use gtk_widget_set_parent () in their realize() and
add () routines.
should use gtk_widget_set_parent() in their realize() and
add() routines.
CList and Viewport widgets changed to do this. (Viewport
widget using code from gtk-fortier-980117-0.patch.)
Sat Jan 17 23:56:02 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkobject.c:
renamed g_string_equal => g_str_equal
renamed g_string_hash => g_str_hash
......
Sun Jan 18 09:57:00 1998 Owen Taylor <owt1@cornell.edu>
* gtkbutton.c gtkclist.c gtkdrawingarea.c gtkentry.c gtkeventbox.c
gtkfixed.c gtkhandlebox.c gtkhscale.c gtkhscrollbar.c gtkitem.c
gtklist.c gtkmenushell.c gtkmisc.c gtknotebook.c gtkpaned.c
gtkpreview.c gtkprogressbar.c gtkruler.c gtktext.c gtktree.c
gtkviewport.c gtkvscale.c gtkvscrollbar.c gtkwidget.{c,h}
Added gtk_widget_set_parent and gtk_widget_get_parent. All
widgets should use:
gtk_widget_get_parent() instead of widget->parent->window.
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkdrawingarea.c
gtk/gtkentry.c gtk/gtkeventbox.c gtk/gtkfixed.c
gtk/gtkhandlebox.c gtk/gtkhscale.c gtk/gtkhscrollbar.c
gtk/gtkitem.c gtk/gtklist.c gtk/gtkmenushell.c gtk/gtkmisc.c
gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtkpreview.c
gtk/gtkprogressbar.c gtk/gtkruler.c gtk/gtktext.c gtk/gtktree.c
gtk/gtkviewport.c gtk/gtkvscale.c gtk/gtkvscrollbar.c
gtk/gtkwidget.{c,h}
Added gtk_widget_set_parent_window() and
gtk_widget_get_parent_window(). All widgets should use:
gtk_widget_get_parent_window() instead of widget->parent->window.
Any widget that wants to have children not in the parent window,
should use gtk_widget_set_parent () in their realize() and
add () routines.
should use gtk_widget_set_parent() in their realize() and
add() routines.
CList and Viewport widgets changed to do this. (Viewport
widget using code from gtk-fortier-980117-0.patch.)
Sat Jan 17 23:56:02 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkobject.c:
renamed g_string_equal => g_str_equal
renamed g_string_hash => g_str_hash
......
Sun Jan 18 09:57:00 1998 Owen Taylor <owt1@cornell.edu>
* gtkbutton.c gtkclist.c gtkdrawingarea.c gtkentry.c gtkeventbox.c
gtkfixed.c gtkhandlebox.c gtkhscale.c gtkhscrollbar.c gtkitem.c
gtklist.c gtkmenushell.c gtkmisc.c gtknotebook.c gtkpaned.c
gtkpreview.c gtkprogressbar.c gtkruler.c gtktext.c gtktree.c
gtkviewport.c gtkvscale.c gtkvscrollbar.c gtkwidget.{c,h}
Added gtk_widget_set_parent and gtk_widget_get_parent. All
widgets should use:
gtk_widget_get_parent() instead of widget->parent->window.
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkdrawingarea.c
gtk/gtkentry.c gtk/gtkeventbox.c gtk/gtkfixed.c
gtk/gtkhandlebox.c gtk/gtkhscale.c gtk/gtkhscrollbar.c
gtk/gtkitem.c gtk/gtklist.c gtk/gtkmenushell.c gtk/gtkmisc.c
gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtkpreview.c
gtk/gtkprogressbar.c gtk/gtkruler.c gtk/gtktext.c gtk/gtktree.c
gtk/gtkviewport.c gtk/gtkvscale.c gtk/gtkvscrollbar.c
gtk/gtkwidget.{c,h}
Added gtk_widget_set_parent_window() and
gtk_widget_get_parent_window(). All widgets should use:
gtk_widget_get_parent_window() instead of widget->parent->window.
Any widget that wants to have children not in the parent window,
should use gtk_widget_set_parent () in their realize() and
add () routines.
should use gtk_widget_set_parent() in their realize() and
add() routines.
CList and Viewport widgets changed to do this. (Viewport
widget using code from gtk-fortier-980117-0.patch.)
Sat Jan 17 23:56:02 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkobject.c:
renamed g_string_equal => g_str_equal
renamed g_string_hash => g_str_hash
......
Sun Jan 18 09:57:00 1998 Owen Taylor <owt1@cornell.edu>
* gtkbutton.c gtkclist.c gtkdrawingarea.c gtkentry.c gtkeventbox.c
gtkfixed.c gtkhandlebox.c gtkhscale.c gtkhscrollbar.c gtkitem.c
gtklist.c gtkmenushell.c gtkmisc.c gtknotebook.c gtkpaned.c
gtkpreview.c gtkprogressbar.c gtkruler.c gtktext.c gtktree.c
gtkviewport.c gtkvscale.c gtkvscrollbar.c gtkwidget.{c,h}
Added gtk_widget_set_parent and gtk_widget_get_parent. All
widgets should use:
gtk_widget_get_parent() instead of widget->parent->window.
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkdrawingarea.c
gtk/gtkentry.c gtk/gtkeventbox.c gtk/gtkfixed.c
gtk/gtkhandlebox.c gtk/gtkhscale.c gtk/gtkhscrollbar.c
gtk/gtkitem.c gtk/gtklist.c gtk/gtkmenushell.c gtk/gtkmisc.c
gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtkpreview.c
gtk/gtkprogressbar.c gtk/gtkruler.c gtk/gtktext.c gtk/gtktree.c
gtk/gtkviewport.c gtk/gtkvscale.c gtk/gtkvscrollbar.c
gtk/gtkwidget.{c,h}
Added gtk_widget_set_parent_window() and
gtk_widget_get_parent_window(). All widgets should use:
gtk_widget_get_parent_window() instead of widget->parent->window.
Any widget that wants to have children not in the parent window,
should use gtk_widget_set_parent () in their realize() and
add () routines.
should use gtk_widget_set_parent() in their realize() and
add() routines.
CList and Viewport widgets changed to do this. (Viewport
widget using code from gtk-fortier-980117-0.patch.)
Sat Jan 17 23:56:02 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkobject.c:
renamed g_string_equal => g_str_equal
renamed g_string_hash => g_str_hash
......
Sun Jan 18 09:57:00 1998 Owen Taylor <owt1@cornell.edu>
* gtkbutton.c gtkclist.c gtkdrawingarea.c gtkentry.c gtkeventbox.c
gtkfixed.c gtkhandlebox.c gtkhscale.c gtkhscrollbar.c gtkitem.c
gtklist.c gtkmenushell.c gtkmisc.c gtknotebook.c gtkpaned.c
gtkpreview.c gtkprogressbar.c gtkruler.c gtktext.c gtktree.c
gtkviewport.c gtkvscale.c gtkvscrollbar.c gtkwidget.{c,h}
Added gtk_widget_set_parent and gtk_widget_get_parent. All
widgets should use:
gtk_widget_get_parent() instead of widget->parent->window.
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkdrawingarea.c
gtk/gtkentry.c gtk/gtkeventbox.c gtk/gtkfixed.c
gtk/gtkhandlebox.c gtk/gtkhscale.c gtk/gtkhscrollbar.c
gtk/gtkitem.c gtk/gtklist.c gtk/gtkmenushell.c gtk/gtkmisc.c
gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtkpreview.c
gtk/gtkprogressbar.c gtk/gtkruler.c gtk/gtktext.c gtk/gtktree.c
gtk/gtkviewport.c gtk/gtkvscale.c gtk/gtkvscrollbar.c
gtk/gtkwidget.{c,h}
Added gtk_widget_set_parent_window() and
gtk_widget_get_parent_window(). All widgets should use:
gtk_widget_get_parent_window() instead of widget->parent->window.
Any widget that wants to have children not in the parent window,
should use gtk_widget_set_parent () in their realize() and
add () routines.
should use gtk_widget_set_parent() in their realize() and
add() routines.
CList and Viewport widgets changed to do this. (Viewport
widget using code from gtk-fortier-980117-0.patch.)
Sat Jan 17 23:56:02 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkobject.c:
renamed g_string_equal => g_str_equal
renamed g_string_hash => g_str_hash
......
Sun Jan 18 09:57:00 1998 Owen Taylor <owt1@cornell.edu>
* gtkbutton.c gtkclist.c gtkdrawingarea.c gtkentry.c gtkeventbox.c
gtkfixed.c gtkhandlebox.c gtkhscale.c gtkhscrollbar.c gtkitem.c
gtklist.c gtkmenushell.c gtkmisc.c gtknotebook.c gtkpaned.c
gtkpreview.c gtkprogressbar.c gtkruler.c gtktext.c gtktree.c
gtkviewport.c gtkvscale.c gtkvscrollbar.c gtkwidget.{c,h}
Added gtk_widget_set_parent and gtk_widget_get_parent. All
widgets should use:
gtk_widget_get_parent() instead of widget->parent->window.
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkdrawingarea.c
gtk/gtkentry.c gtk/gtkeventbox.c gtk/gtkfixed.c
gtk/gtkhandlebox.c gtk/gtkhscale.c gtk/gtkhscrollbar.c
gtk/gtkitem.c gtk/gtklist.c gtk/gtkmenushell.c gtk/gtkmisc.c
gtk/gtknotebook.c gtk/gtkpaned.c gtk/gtkpreview.c
gtk/gtkprogressbar.c gtk/gtkruler.c gtk/gtktext.c gtk/gtktree.c
gtk/gtkviewport.c gtk/gtkvscale.c gtk/gtkvscrollbar.c
gtk/gtkwidget.{c,h}
Added gtk_widget_set_parent_window() and
gtk_widget_get_parent_window(). All widgets should use:
gtk_widget_get_parent_window() instead of widget->parent->window.
Any widget that wants to have children not in the parent window,
should use gtk_widget_set_parent () in their realize() and
add () routines.
should use gtk_widget_set_parent() in their realize() and
add() routines.
CList and Viewport widgets changed to do this. (Viewport
widget using code from gtk-fortier-980117-0.patch.)
Sat Jan 17 23:56:02 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkobject.c:
renamed g_string_equal => g_str_equal
renamed g_string_hash => g_str_hash
......
Sat Jan 17 23:52:40 1998 Owen Taylor <owt1@cornell.edu>
* gstring.{c,h} gscanner.c:
renamed g_string_equal => g_str_equal
renamed g_string_hash => g_str_hash
And const corrected. Old functions left in for now.
Fri Jan 9 20:03:46 1998 Tim Janik <timj@psynet.net>
* gutils.c (g_strerror): changed message for EAGAIN from
......
......@@ -191,7 +191,7 @@ g_scanner_new (GScannerConfig *config_templ)
scanner->next_line = 1;
scanner->next_position = 0;
scanner->symbol_table = g_hash_table_new (g_string_hash, g_string_equal);
scanner->symbol_table = g_hash_table_new (g_str_hash, g_str_equal);
scanner->text = NULL;
scanner->text_len = 0;
scanner->input_fd = -1;
......
......@@ -47,16 +47,42 @@ static GMemChunk *string_mem_chunk = NULL;
/* Hash Functions.
*/
/* Pete, you may have these elsewhere. */
gint
g_string_equal(gpointer v, gpointer v2)
g_str_equal (const gpointer v, const gpointer v2)
{
return strcmp ((gchar*) v, (gchar*)v2) == 0;
}
/* a char* hash function from ASU */
guint
g_string_hash(gpointer v)
g_str_hash (const gpointer v)
{
char *s = (char*)v;
char *p;
guint h=0, g;
for(p = s; *p != '\0'; p += 1) {
h = ( h << 4 ) + *p;
if ( ( g = h & 0xf0000000 ) ) {
h = h ^ (g >> 24);
h = h ^ g;
}
}
return h /* % M */;
}
/* Deprecated, use g_str_* ... */
gint
g_string_equal (gpointer v, gpointer v2)
{
return strcmp ((gchar*) v, (gchar*)v2) == 0;
}
/* a char* hash function from ASU */
guint
g_string_hash (gpointer v)
{
char *s = (char*)v;
char *p;
......@@ -161,7 +187,7 @@ g_string_chunk_insert_const (GStringChunk *fchunk,
char* lookup;
if (!chunk->const_table)
chunk->const_table = g_hash_table_new (g_string_hash, g_string_equal);
chunk->const_table = g_hash_table_new (g_str_hash, g_str_equal);
lookup = (char*) g_hash_table_lookup (chunk->const_table, string);
......
......@@ -632,7 +632,7 @@ gtk_object_add_arg_type (const char *arg_name,
info->arg_id = arg_id;
if (!arg_info_ht)
arg_info_ht = g_hash_table_new (g_string_hash, g_string_equal);
arg_info_ht = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_insert (arg_info_ht, info->name, info);
}
......@@ -966,7 +966,7 @@ gtk_object_data_init ()
{
object_data_init = FALSE;
object_data_ht = g_hash_table_new (g_string_hash, g_string_equal);
object_data_ht = g_hash_table_new (g_str_hash, g_str_equal);
}
}
......
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