mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-02 22:03:07 +02:00
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:
parent
18466ba2ef
commit
9cde2ffe5f
@ -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>
|
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
|
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to
|
||||||
|
@ -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>
|
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
|
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to
|
||||||
|
@ -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>
|
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
|
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to
|
||||||
|
@ -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>
|
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
|
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to
|
||||||
|
@ -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>
|
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
|
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to
|
||||||
|
@ -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>
|
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
|
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to
|
||||||
|
@ -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>
|
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
|
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to
|
||||||
|
@ -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>
|
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
|
* gmodule/Makefile.am: added gmodule-dl.c and gmodule-dld.c to
|
||||||
|
8
glib.h
8
glib.h
@ -672,7 +672,7 @@ GList* g_list_concat (GList *list1,
|
|||||||
GList* g_list_remove (GList *list,
|
GList* g_list_remove (GList *list,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
GList* g_list_remove_link (GList *list,
|
GList* g_list_remove_link (GList *list,
|
||||||
GList *link);
|
GList *llink);
|
||||||
GList* g_list_reverse (GList *list);
|
GList* g_list_reverse (GList *list);
|
||||||
GList* g_list_nth (GList *list,
|
GList* g_list_nth (GList *list,
|
||||||
guint n);
|
guint n);
|
||||||
@ -682,7 +682,7 @@ GList* g_list_find_custom (GList *list,
|
|||||||
gpointer data,
|
gpointer data,
|
||||||
GCompareFunc func);
|
GCompareFunc func);
|
||||||
gint g_list_position (GList *list,
|
gint g_list_position (GList *list,
|
||||||
GList *link);
|
GList *llink);
|
||||||
gint g_list_index (GList *list,
|
gint g_list_index (GList *list,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
GList* g_list_last (GList *list);
|
GList* g_list_last (GList *list);
|
||||||
@ -717,7 +717,7 @@ GSList* g_slist_concat (GSList *list1,
|
|||||||
GSList* g_slist_remove (GSList *list,
|
GSList* g_slist_remove (GSList *list,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
GSList* g_slist_remove_link (GSList *list,
|
GSList* g_slist_remove_link (GSList *list,
|
||||||
GSList *link);
|
GSList *llink);
|
||||||
GSList* g_slist_reverse (GSList *list);
|
GSList* g_slist_reverse (GSList *list);
|
||||||
GSList* g_slist_nth (GSList *list,
|
GSList* g_slist_nth (GSList *list,
|
||||||
guint n);
|
guint n);
|
||||||
@ -727,7 +727,7 @@ GSList* g_slist_find_custom (GSList *list,
|
|||||||
gpointer data,
|
gpointer data,
|
||||||
GCompareFunc func);
|
GCompareFunc func);
|
||||||
gint g_slist_position (GSList *list,
|
gint g_slist_position (GSList *list,
|
||||||
GSList *link);
|
GSList *llink);
|
||||||
gint g_slist_index (GSList *list,
|
gint g_slist_index (GSList *list,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
GSList* g_slist_last (GSList *list);
|
GSList* g_slist_last (GSList *list);
|
||||||
|
@ -672,7 +672,7 @@ GList* g_list_concat (GList *list1,
|
|||||||
GList* g_list_remove (GList *list,
|
GList* g_list_remove (GList *list,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
GList* g_list_remove_link (GList *list,
|
GList* g_list_remove_link (GList *list,
|
||||||
GList *link);
|
GList *llink);
|
||||||
GList* g_list_reverse (GList *list);
|
GList* g_list_reverse (GList *list);
|
||||||
GList* g_list_nth (GList *list,
|
GList* g_list_nth (GList *list,
|
||||||
guint n);
|
guint n);
|
||||||
@ -682,7 +682,7 @@ GList* g_list_find_custom (GList *list,
|
|||||||
gpointer data,
|
gpointer data,
|
||||||
GCompareFunc func);
|
GCompareFunc func);
|
||||||
gint g_list_position (GList *list,
|
gint g_list_position (GList *list,
|
||||||
GList *link);
|
GList *llink);
|
||||||
gint g_list_index (GList *list,
|
gint g_list_index (GList *list,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
GList* g_list_last (GList *list);
|
GList* g_list_last (GList *list);
|
||||||
@ -717,7 +717,7 @@ GSList* g_slist_concat (GSList *list1,
|
|||||||
GSList* g_slist_remove (GSList *list,
|
GSList* g_slist_remove (GSList *list,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
GSList* g_slist_remove_link (GSList *list,
|
GSList* g_slist_remove_link (GSList *list,
|
||||||
GSList *link);
|
GSList *llink);
|
||||||
GSList* g_slist_reverse (GSList *list);
|
GSList* g_slist_reverse (GSList *list);
|
||||||
GSList* g_slist_nth (GSList *list,
|
GSList* g_slist_nth (GSList *list,
|
||||||
guint n);
|
guint n);
|
||||||
@ -727,7 +727,7 @@ GSList* g_slist_find_custom (GSList *list,
|
|||||||
gpointer data,
|
gpointer data,
|
||||||
GCompareFunc func);
|
GCompareFunc func);
|
||||||
gint g_slist_position (GSList *list,
|
gint g_slist_position (GSList *list,
|
||||||
GSList *link);
|
GSList *llink);
|
||||||
gint g_slist_index (GSList *list,
|
gint g_slist_index (GSList *list,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
GSList* g_slist_last (GSList *list);
|
GSList* g_slist_last (GSList *list);
|
||||||
|
23
glib/grel.c
23
glib/grel.c
@ -41,8 +41,9 @@ struct _GRealTuples
|
|||||||
gpointer *data;
|
gpointer *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
tuple_equal_2 (gconstpointer v_a, gconstpointer v_b)
|
tuple_equal_2 (gconstpointer v_a,
|
||||||
|
gconstpointer v_b)
|
||||||
{
|
{
|
||||||
gpointer* a = (gpointer*) v_a;
|
gpointer* a = (gpointer*) v_a;
|
||||||
gpointer* b = (gpointer*) v_b;
|
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];
|
return a[0] == b[0] && a[1] == b[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
guint
|
static guint
|
||||||
tuple_hash_2 (gconstpointer v_a)
|
tuple_hash_2 (gconstpointer v_a)
|
||||||
{
|
{
|
||||||
gpointer* a = (gpointer*) v_a;
|
gpointer* a = (gpointer*) v_a;
|
||||||
@ -58,7 +59,7 @@ tuple_hash_2 (gconstpointer v_a)
|
|||||||
return (gulong)a[0] ^ (gulong)a[1];
|
return (gulong)a[0] ^ (gulong)a[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
GHashFunc
|
static GHashFunc
|
||||||
tuple_hash (gint fields)
|
tuple_hash (gint fields)
|
||||||
{
|
{
|
||||||
switch (fields)
|
switch (fields)
|
||||||
@ -72,7 +73,7 @@ tuple_hash (gint fields)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
GCompareFunc
|
static GCompareFunc
|
||||||
tuple_equal (gint fields)
|
tuple_equal (gint fields)
|
||||||
{
|
{
|
||||||
switch (fields)
|
switch (fields)
|
||||||
@ -369,8 +370,10 @@ g_tuples_index (GTuples *tuples0,
|
|||||||
/* Print
|
/* Print
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
static void
|
||||||
g_relation_print_one (gpointer tuple_key, gpointer tuple_value, gpointer user_data)
|
g_relation_print_one (gpointer tuple_key,
|
||||||
|
gpointer tuple_value,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
GRealRelation* rel = (GRealRelation*) user_data;
|
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");
|
g_print ("]\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
g_relation_print_index (gpointer tuple_key, gpointer tuple_value, gpointer user_data)
|
g_relation_print_index (gpointer tuple_key,
|
||||||
|
gpointer tuple_value,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GRealRelation* rel = (GRealRelation*) user_data;
|
GRealRelation* rel = (GRealRelation*) user_data;
|
||||||
GHashTable* table = (GHashTable*) tuple_value;
|
GHashTable* table = (GHashTable*) tuple_value;
|
||||||
|
@ -578,24 +578,26 @@ get_length_upper_bound (const gchar* fmt, va_list *args)
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
extern gchar* g_vsprintf (const gchar *fmt, va_list *args, va_list *args2);
|
||||||
|
gchar*
|
||||||
g_vsprintf (const gchar *fmt,
|
g_vsprintf (const gchar *fmt,
|
||||||
va_list *args,
|
va_list *args,
|
||||||
va_list *args2)
|
va_list *args2)
|
||||||
{
|
{
|
||||||
static gchar *buf = NULL;
|
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 (len >= alloc)
|
||||||
{
|
{
|
||||||
if (buf)
|
if (buf)
|
||||||
g_free (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);
|
vsprintf (buf, fmt, *args2);
|
||||||
|
23
grel.c
23
grel.c
@ -41,8 +41,9 @@ struct _GRealTuples
|
|||||||
gpointer *data;
|
gpointer *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
tuple_equal_2 (gconstpointer v_a, gconstpointer v_b)
|
tuple_equal_2 (gconstpointer v_a,
|
||||||
|
gconstpointer v_b)
|
||||||
{
|
{
|
||||||
gpointer* a = (gpointer*) v_a;
|
gpointer* a = (gpointer*) v_a;
|
||||||
gpointer* b = (gpointer*) v_b;
|
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];
|
return a[0] == b[0] && a[1] == b[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
guint
|
static guint
|
||||||
tuple_hash_2 (gconstpointer v_a)
|
tuple_hash_2 (gconstpointer v_a)
|
||||||
{
|
{
|
||||||
gpointer* a = (gpointer*) v_a;
|
gpointer* a = (gpointer*) v_a;
|
||||||
@ -58,7 +59,7 @@ tuple_hash_2 (gconstpointer v_a)
|
|||||||
return (gulong)a[0] ^ (gulong)a[1];
|
return (gulong)a[0] ^ (gulong)a[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
GHashFunc
|
static GHashFunc
|
||||||
tuple_hash (gint fields)
|
tuple_hash (gint fields)
|
||||||
{
|
{
|
||||||
switch (fields)
|
switch (fields)
|
||||||
@ -72,7 +73,7 @@ tuple_hash (gint fields)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
GCompareFunc
|
static GCompareFunc
|
||||||
tuple_equal (gint fields)
|
tuple_equal (gint fields)
|
||||||
{
|
{
|
||||||
switch (fields)
|
switch (fields)
|
||||||
@ -369,8 +370,10 @@ g_tuples_index (GTuples *tuples0,
|
|||||||
/* Print
|
/* Print
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
static void
|
||||||
g_relation_print_one (gpointer tuple_key, gpointer tuple_value, gpointer user_data)
|
g_relation_print_one (gpointer tuple_key,
|
||||||
|
gpointer tuple_value,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
GRealRelation* rel = (GRealRelation*) user_data;
|
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");
|
g_print ("]\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
g_relation_print_index (gpointer tuple_key, gpointer tuple_value, gpointer user_data)
|
g_relation_print_index (gpointer tuple_key,
|
||||||
|
gpointer tuple_value,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GRealRelation* rel = (GRealRelation*) user_data;
|
GRealRelation* rel = (GRealRelation*) user_data;
|
||||||
GHashTable* table = (GHashTable*) tuple_value;
|
GHashTable* table = (GHashTable*) tuple_value;
|
||||||
|
16
gstring.c
16
gstring.c
@ -578,24 +578,26 @@ get_length_upper_bound (const gchar* fmt, va_list *args)
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
extern gchar* g_vsprintf (const gchar *fmt, va_list *args, va_list *args2);
|
||||||
|
gchar*
|
||||||
g_vsprintf (const gchar *fmt,
|
g_vsprintf (const gchar *fmt,
|
||||||
va_list *args,
|
va_list *args,
|
||||||
va_list *args2)
|
va_list *args2)
|
||||||
{
|
{
|
||||||
static gchar *buf = NULL;
|
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 (len >= alloc)
|
||||||
{
|
{
|
||||||
if (buf)
|
if (buf)
|
||||||
g_free (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);
|
vsprintf (buf, fmt, *args2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user