made private functions static.

Mon Aug 17 15:21:42 1998  Tim Janik  <timj@gtk.org>

        * grel.c: made private functions static.
This commit is contained in:
Tim Janik 1998-08-17 14:47:49 +00:00 committed by Tim Janik
parent 18466ba2ef
commit 9cde2ffe5f
14 changed files with 86 additions and 40 deletions

View File

@ -1,3 +1,7 @@
Mon Aug 17 15:21:42 1998 Tim Janik <timj@gtk.org>
* grel.c: made private functions static.
Sun Aug 16 23:23:46 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to

View File

@ -1,3 +1,7 @@
Mon Aug 17 15:21:42 1998 Tim Janik <timj@gtk.org>
* grel.c: made private functions static.
Sun Aug 16 23:23:46 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to

View File

@ -1,3 +1,7 @@
Mon Aug 17 15:21:42 1998 Tim Janik <timj@gtk.org>
* grel.c: made private functions static.
Sun Aug 16 23:23:46 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to

View File

@ -1,3 +1,7 @@
Mon Aug 17 15:21:42 1998 Tim Janik <timj@gtk.org>
* grel.c: made private functions static.
Sun Aug 16 23:23:46 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to

View File

@ -1,3 +1,7 @@
Mon Aug 17 15:21:42 1998 Tim Janik <timj@gtk.org>
* grel.c: made private functions static.
Sun Aug 16 23:23:46 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to

View File

@ -1,3 +1,7 @@
Mon Aug 17 15:21:42 1998 Tim Janik <timj@gtk.org>
* grel.c: made private functions static.
Sun Aug 16 23:23:46 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to

View File

@ -1,3 +1,7 @@
Mon Aug 17 15:21:42 1998 Tim Janik <timj@gtk.org>
* grel.c: made private functions static.
Sun Aug 16 23:23:46 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to

View File

@ -1,3 +1,7 @@
Mon Aug 17 15:21:42 1998 Tim Janik <timj@gtk.org>
* grel.c: made private functions static.
Sun Aug 16 23:23:46 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to

8
glib.h
View File

@ -672,7 +672,7 @@ GList* g_list_concat (GList *list1,
GList* g_list_remove (GList *list,
gpointer data);
GList* g_list_remove_link (GList *list,
GList *link);
GList *llink);
GList* g_list_reverse (GList *list);
GList* g_list_nth (GList *list,
guint n);
@ -682,7 +682,7 @@ GList* g_list_find_custom (GList *list,
gpointer data,
GCompareFunc func);
gint g_list_position (GList *list,
GList *link);
GList *llink);
gint g_list_index (GList *list,
gpointer data);
GList* g_list_last (GList *list);
@ -717,7 +717,7 @@ GSList* g_slist_concat (GSList *list1,
GSList* g_slist_remove (GSList *list,
gpointer data);
GSList* g_slist_remove_link (GSList *list,
GSList *link);
GSList *llink);
GSList* g_slist_reverse (GSList *list);
GSList* g_slist_nth (GSList *list,
guint n);
@ -727,7 +727,7 @@ GSList* g_slist_find_custom (GSList *list,
gpointer data,
GCompareFunc func);
gint g_slist_position (GSList *list,
GSList *link);
GSList *llink);
gint g_slist_index (GSList *list,
gpointer data);
GSList* g_slist_last (GSList *list);

View File

@ -672,7 +672,7 @@ GList* g_list_concat (GList *list1,
GList* g_list_remove (GList *list,
gpointer data);
GList* g_list_remove_link (GList *list,
GList *link);
GList *llink);
GList* g_list_reverse (GList *list);
GList* g_list_nth (GList *list,
guint n);
@ -682,7 +682,7 @@ GList* g_list_find_custom (GList *list,
gpointer data,
GCompareFunc func);
gint g_list_position (GList *list,
GList *link);
GList *llink);
gint g_list_index (GList *list,
gpointer data);
GList* g_list_last (GList *list);
@ -717,7 +717,7 @@ GSList* g_slist_concat (GSList *list1,
GSList* g_slist_remove (GSList *list,
gpointer data);
GSList* g_slist_remove_link (GSList *list,
GSList *link);
GSList *llink);
GSList* g_slist_reverse (GSList *list);
GSList* g_slist_nth (GSList *list,
guint n);
@ -727,7 +727,7 @@ GSList* g_slist_find_custom (GSList *list,
gpointer data,
GCompareFunc func);
gint g_slist_position (GSList *list,
GSList *link);
GSList *llink);
gint g_slist_index (GSList *list,
gpointer data);
GSList* g_slist_last (GSList *list);

View File

@ -41,8 +41,9 @@ struct _GRealTuples
gpointer *data;
};
gboolean
tuple_equal_2 (gconstpointer v_a, gconstpointer v_b)
static gboolean
tuple_equal_2 (gconstpointer v_a,
gconstpointer v_b)
{
gpointer* a = (gpointer*) v_a;
gpointer* b = (gpointer*) v_b;
@ -50,7 +51,7 @@ tuple_equal_2 (gconstpointer v_a, gconstpointer v_b)
return a[0] == b[0] && a[1] == b[1];
}
guint
static guint
tuple_hash_2 (gconstpointer v_a)
{
gpointer* a = (gpointer*) v_a;
@ -58,7 +59,7 @@ tuple_hash_2 (gconstpointer v_a)
return (gulong)a[0] ^ (gulong)a[1];
}
GHashFunc
static GHashFunc
tuple_hash (gint fields)
{
switch (fields)
@ -72,7 +73,7 @@ tuple_hash (gint fields)
return NULL;
}
GCompareFunc
static GCompareFunc
tuple_equal (gint fields)
{
switch (fields)
@ -369,8 +370,10 @@ g_tuples_index (GTuples *tuples0,
/* Print
*/
void
g_relation_print_one (gpointer tuple_key, gpointer tuple_value, gpointer user_data)
static void
g_relation_print_one (gpointer tuple_key,
gpointer tuple_value,
gpointer user_data)
{
gint i;
GRealRelation* rel = (GRealRelation*) user_data;
@ -389,8 +392,10 @@ g_relation_print_one (gpointer tuple_key, gpointer tuple_value, gpointer user_da
g_print ("]\n");
}
void
g_relation_print_index (gpointer tuple_key, gpointer tuple_value, gpointer user_data)
static void
g_relation_print_index (gpointer tuple_key,
gpointer tuple_value,
gpointer user_data)
{
GRealRelation* rel = (GRealRelation*) user_data;
GHashTable* table = (GHashTable*) tuple_value;

View File

@ -578,24 +578,26 @@ get_length_upper_bound (const gchar* fmt, va_list *args)
return len;
}
char*
extern gchar* g_vsprintf (const gchar *fmt, va_list *args, va_list *args2);
gchar*
g_vsprintf (const gchar *fmt,
va_list *args,
va_list *args2)
va_list *args,
va_list *args2)
{
static gchar *buf = NULL;
static gint alloc = 0;
static guint alloc = 0;
guint len;
gint len = get_length_upper_bound (fmt, args);
len = get_length_upper_bound (fmt, args);
if (len >= alloc)
{
if (buf)
g_free (buf);
alloc = nearest_pow (MAX(len + 1, 1024 + 1));
alloc = nearest_pow (MAX (len + 1, 1024 + 1));
buf = g_new (char, alloc);
buf = g_new (gchar, alloc);
}
vsprintf (buf, fmt, *args2);

23
grel.c
View File

@ -41,8 +41,9 @@ struct _GRealTuples
gpointer *data;
};
gboolean
tuple_equal_2 (gconstpointer v_a, gconstpointer v_b)
static gboolean
tuple_equal_2 (gconstpointer v_a,
gconstpointer v_b)
{
gpointer* a = (gpointer*) v_a;
gpointer* b = (gpointer*) v_b;
@ -50,7 +51,7 @@ tuple_equal_2 (gconstpointer v_a, gconstpointer v_b)
return a[0] == b[0] && a[1] == b[1];
}
guint
static guint
tuple_hash_2 (gconstpointer v_a)
{
gpointer* a = (gpointer*) v_a;
@ -58,7 +59,7 @@ tuple_hash_2 (gconstpointer v_a)
return (gulong)a[0] ^ (gulong)a[1];
}
GHashFunc
static GHashFunc
tuple_hash (gint fields)
{
switch (fields)
@ -72,7 +73,7 @@ tuple_hash (gint fields)
return NULL;
}
GCompareFunc
static GCompareFunc
tuple_equal (gint fields)
{
switch (fields)
@ -369,8 +370,10 @@ g_tuples_index (GTuples *tuples0,
/* Print
*/
void
g_relation_print_one (gpointer tuple_key, gpointer tuple_value, gpointer user_data)
static void
g_relation_print_one (gpointer tuple_key,
gpointer tuple_value,
gpointer user_data)
{
gint i;
GRealRelation* rel = (GRealRelation*) user_data;
@ -389,8 +392,10 @@ g_relation_print_one (gpointer tuple_key, gpointer tuple_value, gpointer user_da
g_print ("]\n");
}
void
g_relation_print_index (gpointer tuple_key, gpointer tuple_value, gpointer user_data)
static void
g_relation_print_index (gpointer tuple_key,
gpointer tuple_value,
gpointer user_data)
{
GRealRelation* rel = (GRealRelation*) user_data;
GHashTable* table = (GHashTable*) tuple_value;

View File

@ -578,24 +578,26 @@ get_length_upper_bound (const gchar* fmt, va_list *args)
return len;
}
char*
extern gchar* g_vsprintf (const gchar *fmt, va_list *args, va_list *args2);
gchar*
g_vsprintf (const gchar *fmt,
va_list *args,
va_list *args2)
va_list *args,
va_list *args2)
{
static gchar *buf = NULL;
static gint alloc = 0;
static guint alloc = 0;
guint len;
gint len = get_length_upper_bound (fmt, args);
len = get_length_upper_bound (fmt, args);
if (len >= alloc)
{
if (buf)
g_free (buf);
alloc = nearest_pow (MAX(len + 1, 1024 + 1));
alloc = nearest_pow (MAX (len + 1, 1024 + 1));
buf = g_new (char, alloc);
buf = g_new (gchar, alloc);
}
vsprintf (buf, fmt, *args2);