made private functions static.
authorTim Janik <timj@gtk.org>
Mon, 17 Aug 1998 14:47:49 +0000 (14:47 +0000)
committerTim Janik <timj@src.gnome.org>
Mon, 17 Aug 1998 14:47:49 +0000 (14:47 +0000)
Mon Aug 17 15:21:42 1998  Tim Janik  <timj@gtk.org>

        * grel.c: made private functions static.

14 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib.h
glib/glib.h
glib/grel.c
glib/gstring.c
grel.c
gstring.c

index b7b816f..e0f3a64 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index b7b816f..e0f3a64 100644 (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
index b7b816f..e0f3a64 100644 (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
index b7b816f..e0f3a64 100644 (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
index b7b816f..e0f3a64 100644 (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
index b7b816f..e0f3a64 100644 (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
index b7b816f..e0f3a64 100644 (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
index b7b816f..e0f3a64 100644 (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
diff --git a/glib.h b/glib.h
index a00194f..ab4dc84 100644 (file)
--- a/glib.h
+++ b/glib.h
@@ -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);
index a00194f..ab4dc84 100644 (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);
index e4c1f6e..979a7d1 100644 (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;
index eee63ba..3454e8f 100644 (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);
diff --git a/grel.c b/grel.c
index e4c1f6e..979a7d1 100644 (file)
--- a/grel.c
+++ b/grel.c
@@ -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;
index eee63ba..3454e8f 100644 (file)
--- a/gstring.c
+++ b/gstring.c
@@ -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);