r19670 - gnucash/trunk/src/backend/sql - Fix include files. Include files now only include other include files if symbols from the other files are needed by this one.

Phil Longstaff plongstaff at code.gnucash.org
Sun Oct 17 17:17:14 EDT 2010


Author: plongstaff
Date: 2010-10-17 17:17:14 -0400 (Sun, 17 Oct 2010)
New Revision: 19670
Trac: http://svn.gnucash.org/trac/changeset/19670

Modified:
   gnucash/trunk/src/backend/sql/gnc-account-sql.h
   gnucash/trunk/src/backend/sql/gnc-address-sql.c
   gnucash/trunk/src/backend/sql/gnc-address-sql.h
   gnucash/trunk/src/backend/sql/gnc-backend-sql.c
   gnucash/trunk/src/backend/sql/gnc-backend-sql.h
   gnucash/trunk/src/backend/sql/gnc-bill-term-sql.h
   gnucash/trunk/src/backend/sql/gnc-book-sql.h
   gnucash/trunk/src/backend/sql/gnc-budget-sql.h
   gnucash/trunk/src/backend/sql/gnc-commodity-sql.h
   gnucash/trunk/src/backend/sql/gnc-lots-sql.h
   gnucash/trunk/src/backend/sql/gnc-owner-sql.h
   gnucash/trunk/src/backend/sql/gnc-price-sql.h
   gnucash/trunk/src/backend/sql/gnc-recurrence-sql.h
   gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.h
   gnucash/trunk/src/backend/sql/gnc-slots-sql.h
   gnucash/trunk/src/backend/sql/gnc-transaction-sql.h
Log:
Fix include files.  Include files now only include other include files if symbols from the other files are needed by this one.


Modified: gnucash/trunk/src/backend/sql/gnc-account-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-account-sql.h	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-account-sql.h	2010-10-17 21:17:14 UTC (rev 19670)
@@ -26,13 +26,13 @@
  * restoring data to/from an SQL database
  */
 
-#ifndef GNC_ACCOUNT_SQL_H_
-#define GNC_ACCOUNT_SQL_H_
+#ifndef GNC_ACCOUNT_SQL_H
+#define GNC_ACCOUNT_SQL_H
 
+#include "gnc-backend-sql.h"
 #include "qof.h"
-#include <gmodule.h>
 
 void gnc_sql_init_account_handler( void );
 gboolean gnc_sql_save_account( GncSqlBackend* be, QofInstance* inst );
 
-#endif /* GNC_ACCOUNT_SQL_H_ */
+#endif /* GNC_ACCOUNT_SQL_H */

Modified: gnucash/trunk/src/backend/sql/gnc-address-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-address-sql.c	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-address-sql.c	2010-10-17 21:17:14 UTC (rev 19670)
@@ -36,6 +36,8 @@
 
 #include "gnc-engine.h"
 
+#include "gncAddress.h"
+
 #include "gnc-backend-sql.h"
 #include "gnc-address-sql.h"
 

Modified: gnucash/trunk/src/backend/sql/gnc-address-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-address-sql.h	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-address-sql.h	2010-10-17 21:17:14 UTC (rev 19670)
@@ -29,8 +29,6 @@
 #ifndef GNC_ADDRESS_SQL_H
 #define GNC_ADDRESS_SQL_H
 
-#include "gncAddress.h"
-
 #define CT_ADDRESS "address"
 
 void gnc_address_sql_initialize( void );

Modified: gnucash/trunk/src/backend/sql/gnc-backend-sql.c
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-backend-sql.c	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-backend-sql.c	2010-10-17 21:17:14 UTC (rev 19670)
@@ -42,6 +42,8 @@
 #include "gnc-engine.h"
 #include "SX-book.h"
 #include "Recurrence.h"
+#include "gncBillTerm.h"
+#include "gncTaxTable.h"
 
 #include "gnc-gconf-utils.h"
 

Modified: gnucash/trunk/src/backend/sql/gnc-backend-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-backend-sql.h	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-backend-sql.h	2010-10-17 21:17:14 UTC (rev 19670)
@@ -36,8 +36,8 @@
  *  @author Copyright (c) 2006-2008 Phil Longstaff <plongstaff at rogers.com>
  */
 
-#ifndef GNC_BACKEND_SQL_H_
-#define GNC_BACKEND_SQL_H_
+#ifndef GNC_BACKEND_SQL_H
+#define GNC_BACKEND_SQL_H
 
 #include "qof.h"
 #include "qofbackend-p.h"
@@ -752,7 +752,7 @@
     gboolean is_ok;
 } write_objects_t;
 
-#endif /* GNC_BACKEND_SQL_H_ */
+#endif /* GNC_BACKEND_SQL_H */
 
 /**
   @}  end of the SQL Backend Core doxygen group

Modified: gnucash/trunk/src/backend/sql/gnc-bill-term-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-bill-term-sql.h	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-bill-term-sql.h	2010-10-17 21:17:14 UTC (rev 19670)
@@ -30,7 +30,8 @@
 #ifndef GNC_BILLTERM_SQL_H
 #define GNC_BILLTERM_SQL_H
 
-#include "gncBillTerm.h"
+#include "gnc-backend-sql.h"
+#include "qof.h"
 
 #define CT_BILLTERMREF "billterm"
 

Modified: gnucash/trunk/src/backend/sql/gnc-book-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-book-sql.h	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-book-sql.h	2010-10-17 21:17:14 UTC (rev 19670)
@@ -26,13 +26,13 @@
  * restoring data to/from an SQL database
  */
 
-#ifndef GNC_BOOK_SQL_H_
-#define GNC_BOOK_SQL_H_
+#ifndef GNC_BOOK_SQL_H
+#define GNC_BOOK_SQL_H
 
+#include "gnc-backend-sql.h"
 #include "qof.h"
-#include <gmodule.h>
 
 void gnc_sql_init_book_handler( void );
 gboolean gnc_sql_save_book( GncSqlBackend* be, QofInstance* inst );
 
-#endif /* GNC_BOOK_SQL_H_ */
+#endif /* GNC_BOOK_SQL_H */

Modified: gnucash/trunk/src/backend/sql/gnc-budget-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-budget-sql.h	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-budget-sql.h	2010-10-17 21:17:14 UTC (rev 19670)
@@ -26,12 +26,9 @@
  * restoring data to/from an SQL database
  */
 
-#ifndef GNC_BUDGET_SQL_H_
-#define GNC_BUDGET_SQL_H_
+#ifndef GNC_BUDGET_SQL_H
+#define GNC_BUDGET_SQL_H
 
-#include "qof.h"
-#include <gmodule.h>
-
 void gnc_sql_init_budget_handler( void );
 
-#endif /* GNC_BUDGET_SQL_H_ */
+#endif /* GNC_BUDGET_SQL_H */

Modified: gnucash/trunk/src/backend/sql/gnc-commodity-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-commodity-sql.h	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-commodity-sql.h	2010-10-17 21:17:14 UTC (rev 19670)
@@ -26,13 +26,13 @@
  * restoring data to/from an SQL database
  */
 
-#ifndef GNC_COMMODITY_SQL_H_
-#define GNC_COMMODITY_SQL_H_
+#ifndef GNC_COMMODITY_SQL_H
+#define GNC_COMMODITY_SQL_H
 
-#include "qof.h"
-#include <gmodule.h>
+#include "gnc-backend-sql.h"
+#include "gnc-commodity.h"
 
 void gnc_sql_init_commodity_handler( void );
 gboolean gnc_sql_save_commodity( GncSqlBackend* be, gnc_commodity* pCommodity );
 
-#endif /* GNC_COMMODITY_SQL_H_ */
+#endif /* GNC_COMMODITY_SQL_H */

Modified: gnucash/trunk/src/backend/sql/gnc-lots-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-lots-sql.h	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-lots-sql.h	2010-10-17 21:17:14 UTC (rev 19670)
@@ -26,12 +26,9 @@
  * restoring data to/from an SQL database
  */
 
-#ifndef GNC_LOT_SQL_H_
-#define GNC_LOT_SQL_H_
+#ifndef GNC_LOT_SQL_H
+#define GNC_LOT_SQL_H
 
-#include "qof.h"
-#include <gmodule.h>
-
 void gnc_sql_init_lot_handler( void );
 
-#endif /* GNC_LOT_SQL_H_ */
+#endif /* GNC_LOT_SQL_H */

Modified: gnucash/trunk/src/backend/sql/gnc-owner-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-owner-sql.h	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-owner-sql.h	2010-10-17 21:17:14 UTC (rev 19670)
@@ -29,9 +29,6 @@
 #ifndef GNC_OWNER_SQL_H
 #define GNC_OWNER_SQL_H
 
-#include "gncOwner.h"
-#include "qof.h"
-
 #define CT_OWNERREF "owner"
 
 void gnc_owner_sql_initialize( void );

Modified: gnucash/trunk/src/backend/sql/gnc-price-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-price-sql.h	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-price-sql.h	2010-10-17 21:17:14 UTC (rev 19670)
@@ -26,12 +26,9 @@
  * restoring data to/from an SQL database
  */
 
-#ifndef GNC_PRICE_SQL_H_
-#define GNC_PRICE_SQL_H_
+#ifndef GNC_PRICE_SQL_H
+#define GNC_PRICE_SQL_H
 
-#include "qof.h"
-#include <gmodule.h>
-
 void gnc_sql_init_price_handler( void );
 
-#endif /* GNC_PRICE_SQL_H_ */
+#endif /* GNC_PRICE_SQL_H */

Modified: gnucash/trunk/src/backend/sql/gnc-recurrence-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-recurrence-sql.h	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-recurrence-sql.h	2010-10-17 21:17:14 UTC (rev 19670)
@@ -26,11 +26,13 @@
  * restoring data to/from an SQL database
  */
 
-#ifndef GNC_RECURRENCE_SQL_H_
-#define GNC_RECURRENCE_SQL_H_
+#ifndef GNC_RECURRENCE_SQL_H
+#define GNC_RECURRENCE_SQL_H
 
-#include "qof.h"
-#include <gmodule.h>
+#include <glib.h>
+#include "Recurrence.h"
+#include "guid.h"
+#include "gnc-backend-sql.h"
 
 gboolean gnc_sql_recurrence_save( GncSqlBackend* be, const GncGUID* guid, const Recurrence* pRecurrence );
 void gnc_sql_recurrence_save_list( GncSqlBackend* be, const GncGUID* guid, GList* schedule );
@@ -42,4 +44,4 @@
 
 void gnc_sql_init_recurrence_handler( void );
 
-#endif /* GNC_RECURRENCE_SQL_H_ */
+#endif /* GNC_RECURRENCE_SQL_H */

Modified: gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.h	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-schedxaction-sql.h	2010-10-17 21:17:14 UTC (rev 19670)
@@ -26,13 +26,13 @@
  * restoring data to/from an SQL database
  */
 
-#ifndef GNC_SCHEDXACTION_SQL_H_
-#define GNC_SCHEDXACTION_SQL_H_
+#ifndef GNC_SCHEDXACTION_SQL_H
+#define GNC_SCHEDXACTION_SQL_H
 
 #include "qof.h"
-#include <gmodule.h>
+#include "gnc-backend-sql.h"
 
 void gnc_sql_init_schedxaction_handler( void );
 gboolean gnc_sql_save_schedxaction( GncSqlBackend* be, QofInstance* inst );
 
-#endif /* GNC_SCHEDXACTION_SQL_H_ */
+#endif /* GNC_SCHEDXACTION_SQL_H */

Modified: gnucash/trunk/src/backend/sql/gnc-slots-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-slots-sql.h	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-slots-sql.h	2010-10-17 21:17:14 UTC (rev 19670)
@@ -26,11 +26,14 @@
  * restoring data to/from an SQL database
  */
 
-#ifndef GNC_SLOTS_SQL_H_
-#define GNC_SLOTS_SQL_H_
+#ifndef GNC_SLOTS_SQL_H
+#define GNC_SLOTS_SQL_H
 
+#include <glib.h>
+#include "guid.h"
+#include "kvp_frame.h"
 #include "qof.h"
-#include <gmodule.h>
+#include "gnc-backend-sql.h"
 
 /**
  * gnc_sql_slots_save - Saves slots for an object to the db.
@@ -69,7 +72,6 @@
  */
 void gnc_sql_slots_load_for_list( GncSqlBackend* be, GList* list );
 
-
 typedef QofInstance* (*BookLookupFn)( const GncGUID* guid, const QofBook* book );
 
 /**
@@ -86,4 +88,4 @@
 
 void gnc_sql_init_slots_handler( void );
 
-#endif /* GNC_SLOTS_SQL_H_ */
+#endif /* GNC_SLOTS_SQL_H */

Modified: gnucash/trunk/src/backend/sql/gnc-transaction-sql.h
===================================================================
--- gnucash/trunk/src/backend/sql/gnc-transaction-sql.h	2010-10-17 20:21:41 UTC (rev 19669)
+++ gnucash/trunk/src/backend/sql/gnc-transaction-sql.h	2010-10-17 21:17:14 UTC (rev 19670)
@@ -26,11 +26,13 @@
  * restoring data to/from an SQL database
  */
 
-#ifndef GNC_TRANSACTION_SQL_H_
-#define GNC_TRANSACTION_SQL_H_
+#ifndef GNC_TRANSACTION_SQL_H
+#define GNC_TRANSACTION_SQL_H
 
+#include "gnc-backend-sql.h"
+#include "Transaction.h"
 #include "qof.h"
-#include <gmodule.h>
+#include "Account.h"
 
 void gnc_sql_init_transaction_handler( void );
 
@@ -84,4 +86,4 @@
 /*@ null @*/
 GSList* gnc_sql_get_account_balances_slist( GncSqlBackend* be );
 
-#endif /* GNC_TRANSACTION_SQL_H_ */
+#endif /* GNC_TRANSACTION_SQL_H */



More information about the gnucash-changes mailing list