[dia] database: remove unnecessary extern declarations



commit 4a5659a92d8f06829381c13d578ee9705ceed929
Author: Hans Breuer <hans breuer org>
Date:   Sun Mar 2 20:31:59 2014 +0100

    database: remove unnecessary extern declarations

 objects/Database/database.h |   21 ---------------------
 objects/Database/table.c    |   29 +++++++++++++++++++++--------
 2 files changed, 21 insertions(+), 29 deletions(-)
---
diff --git a/objects/Database/database.h b/objects/Database/database.h
index 8379de8..cb4efa0 100644
--- a/objects/Database/database.h
+++ b/objects/Database/database.h
@@ -150,25 +150,4 @@ struct _TableReference {
   Alignment ep_desc_text_align; /* end-point */
 };
 
-/* in table.c */
-extern TableAttribute * table_attribute_new (void);
-/* in table.c */
-extern void table_attribute_free (TableAttribute *);
-/* in table.c */
-extern TableAttribute * table_attribute_copy (TableAttribute *);
-/* in table.c */
-extern void table_attribute_ensure_connection_points (TableAttribute *,
-                                                      DiaObject *);
-/* in table.c */
-extern void table_update_connectionpoints (Table *);
-/* in table.c */
-extern void table_update_positions (Table *);
-/* in table.c */
-extern void table_compute_width_height (Table *);
-extern TableState * table_state_new (Table *);
-extern TableChange * table_change_new (Table *, TableState *,
-                                       GList *, GList *, GList *);
-/* in table.c */
-extern void table_update_primary_key_font (Table *);
-
 #endif /* DATABASE_H */
diff --git a/objects/Database/table.c b/objects/Database/table.c
index 3d19f49..d834572 100644
--- a/objects/Database/table.c
+++ b/objects/Database/table.c
@@ -80,6 +80,17 @@ static void underline_table_attribute (DiaRenderer  *, Point,
 static void fill_diamond (DiaRenderer *, real, real, Point *, Color *);
 static void table_init_fonts (Table *);
 
+static TableAttribute *table_attribute_new (void);
+static void table_attribute_free (TableAttribute *);
+static TableAttribute *table_attribute_copy (TableAttribute *);
+static void table_update_connectionpoints (Table *);
+static void table_update_positions (Table *);
+static void table_compute_width_height (Table *);
+static TableState *table_state_new (Table *);
+static TableChange *table_change_new (Table *, TableState *,
+                                      GList *, GList *, GList *);
+static void table_update_primary_key_font (Table *);
+
 static gchar * create_documentation_tag (gchar * comment,
                                          gboolean tagging,
                                          gint WrapPoint, 
@@ -275,7 +286,8 @@ static DiaMenu table_menu = {
 /**
  * Create a new TableAttribute
  */
-TableAttribute * table_attribute_new (void)
+static TableAttribute *
+table_attribute_new (void)
 {
   TableAttribute * attr;
 
@@ -300,7 +312,7 @@ TableAttribute * table_attribute_new (void)
   return attr;
 }
 
-void
+static void
 table_attribute_ensure_connection_points (TableAttribute * attr,
                                           DiaObject * obj)
 {
@@ -318,7 +330,8 @@ table_attribute_ensure_connection_points (TableAttribute * attr,
  * Free a TableAttribute and its allocated resources. Upon return of
  * this function the passed pointer will not be valid anymore.
  */
-void table_attribute_free (TableAttribute * attr)
+static void
+table_attribute_free (TableAttribute * attr)
 {
   if (attr->name) g_free (attr->name);
   if (attr->type) g_free (attr->type);
@@ -333,7 +346,7 @@ void table_attribute_free (TableAttribute * attr)
  * Create a copy of the passed attribute. The returned copy of the
  * attribute needs to be freed using g_free when it is no longer needed.
  */
-TableAttribute *
+static TableAttribute *
 table_attribute_copy (TableAttribute * orig)
 {
   TableAttribute * copy;
@@ -918,7 +931,7 @@ table_set_props (Table *table, GPtrArray *props)
  * members to be initialized, so be sure to call this routine after the
  * font members were already initialized.
  */
-void
+static void
 table_compute_width_height (Table * table)
 {
   real width = 0.0;
@@ -1193,7 +1206,7 @@ table_calculate_namebox_data (Table * table)
   return maxwidth;
 }
 
-void
+static void
 table_update_positions (Table *table)
 {
   ConnectionPoint * connections = table->connections;
@@ -1357,7 +1370,7 @@ table_show_comments_cb(DiaObject *obj, Point *pos, gpointer data)
  * This routine should be called when at least one of these properties
  * have been changed.
  */
-void
+static void
 table_update_primary_key_font (Table * table)
 {
   if (table->primary_key_font)
@@ -1553,7 +1566,7 @@ table_change_apply (TableChange * change, DiaObject * obj)
   change->applied = TRUE;
 }
 
-TableChange * 
+static TableChange *
 table_change_new (Table * table, TableState * saved_state,
                   GList * added, GList * deleted,
                   GList * disconnects)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]