r17724 - gnucash/trunk/src - Bug #539957: Replace struct named assignments by C99 "designated initializers"
Christian Stimming
cstim at cvs.gnucash.org
Wed Nov 26 09:35:36 EST 2008
Author: cstim
Date: 2008-11-26 09:35:36 -0500 (Wed, 26 Nov 2008)
New Revision: 17724
Trac: http://svn.gnucash.org/trac/changeset/17724
Modified:
gnucash/trunk/src/business/business-core/gncAddress.c
gnucash/trunk/src/business/business-core/gncBillTerm.c
gnucash/trunk/src/business/business-core/gncCustomer.c
gnucash/trunk/src/business/business-core/gncEmployee.c
gnucash/trunk/src/business/business-core/gncEntry.c
gnucash/trunk/src/business/business-core/gncInvoice.c
gnucash/trunk/src/business/business-core/gncJob.c
gnucash/trunk/src/business/business-core/gncOrder.c
gnucash/trunk/src/business/business-core/gncTaxTable.c
gnucash/trunk/src/business/business-core/gncVendor.c
gnucash/trunk/src/engine/Account.c
gnucash/trunk/src/engine/SX-book.c
gnucash/trunk/src/engine/SchedXaction.c
gnucash/trunk/src/engine/Split.c
gnucash/trunk/src/engine/Transaction.c
gnucash/trunk/src/engine/gnc-budget.c
gnucash/trunk/src/engine/gnc-commodity.c
gnucash/trunk/src/engine/gnc-lot.c
gnucash/trunk/src/engine/gnc-pricedb.c
Log:
Bug #539957: Replace struct named assignments by C99 "designated initializers"
Patch by Halton Huo.
Modified: gnucash/trunk/src/business/business-core/gncAddress.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncAddress.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/business/business-core/gncAddress.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -373,17 +373,17 @@
static QofObject GncAddressDesc =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: GNC_ID_ADDRESS,
- type_label: "Address",
- create: (gpointer)qofAddressCreate,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: NULL,
- version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_ID_ADDRESS,
+ .type_label = "Address",
+ .create = (gpointer)qofAddressCreate,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = NULL,
+ .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
};
gboolean gncAddressRegister (void)
Modified: gnucash/trunk/src/business/business-core/gncBillTerm.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncBillTerm.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/business/business-core/gncBillTerm.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -705,17 +705,17 @@
static QofObject gncBillTermDesc =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: _GNC_MOD_NAME,
- type_label: "Billing Term",
- create: (gpointer)gncBillTermCreate,
- book_begin: _gncBillTermCreate,
- book_end: _gncBillTermDestroy,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: NULL,
- version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = _GNC_MOD_NAME,
+ .type_label = "Billing Term",
+ .create = (gpointer)gncBillTermCreate,
+ .book_begin = _gncBillTermCreate,
+ .book_end = _gncBillTermDestroy,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = NULL,
+ .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
};
gboolean gncBillTermRegister (void)
Modified: gnucash/trunk/src/business/business-core/gncCustomer.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncCustomer.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/business/business-core/gncCustomer.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -578,17 +578,17 @@
static QofObject gncCustomerDesc =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: _GNC_MOD_NAME,
- type_label: "Customer",
- create: (gpointer)gncCustomerCreate,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: (const char* (*)(gpointer))gncCustomerGetName,
- version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = _GNC_MOD_NAME,
+ .type_label = "Customer",
+ .create = (gpointer)gncCustomerCreate,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = (const char* (*)(gpointer))gncCustomerGetName,
+ .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
};
gboolean gncCustomerRegister (void)
Modified: gnucash/trunk/src/business/business-core/gncEmployee.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncEmployee.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/business/business-core/gncEmployee.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -420,17 +420,17 @@
static QofObject gncEmployeeDesc =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: _GNC_MOD_NAME,
- type_label: "Employee",
- create: (gpointer)gncEmployeeCreate,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: _gncEmployeePrintable,
- version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = _GNC_MOD_NAME,
+ .type_label = "Employee",
+ .create = (gpointer)gncEmployeeCreate,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = _gncEmployeePrintable,
+ .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
};
gboolean gncEmployeeRegister (void)
Modified: gnucash/trunk/src/business/business-core/gncEntry.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncEntry.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/business/business-core/gncEntry.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -1240,17 +1240,17 @@
static QofObject gncEntryDesc =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: _GNC_MOD_NAME,
- type_label: "Order/Invoice/Bill Entry",
- create: (gpointer)gncEntryCreate,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: NULL,
- version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = _GNC_MOD_NAME,
+ .type_label = "Order/Invoice/Bill Entry",
+ .create = (gpointer)gncEntryCreate,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = NULL,
+ .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
};
gboolean gncEntryRegister (void)
Modified: gnucash/trunk/src/business/business-core/gncInvoice.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncInvoice.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/business/business-core/gncInvoice.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -1681,17 +1681,17 @@
static QofObject gncInvoiceDesc =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: _GNC_MOD_NAME,
- type_label: "Invoice",
- create: (gpointer)gncInvoiceCreate,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: _gncInvoicePrintable,
- version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = _GNC_MOD_NAME,
+ .type_label = "Invoice",
+ .create = (gpointer)gncInvoiceCreate,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = _gncInvoicePrintable,
+ .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
};
static void
Modified: gnucash/trunk/src/business/business-core/gncJob.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncJob.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/business/business-core/gncJob.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -368,17 +368,17 @@
static QofObject gncJobDesc =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: _GNC_MOD_NAME,
- type_label: "Job",
- create: (gpointer)gncJobCreate,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: _gncJobPrintable,
- version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = _GNC_MOD_NAME,
+ .type_label = "Job",
+ .create = (gpointer)gncJobCreate,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = _gncJobPrintable,
+ .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
};
gboolean gncJobRegister (void)
Modified: gnucash/trunk/src/business/business-core/gncOrder.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncOrder.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/business/business-core/gncOrder.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -422,17 +422,17 @@
static QofObject gncOrderDesc =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: _GNC_MOD_NAME,
- type_label: "Order",
- create: (gpointer)gncOrderCreate,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: _gncOrderPrintable,
- version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = _GNC_MOD_NAME,
+ .type_label = "Order",
+ .create = (gpointer)gncOrderCreate,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = _gncOrderPrintable,
+ .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
};
gboolean gncOrderRegister (void)
Modified: gnucash/trunk/src/business/business-core/gncTaxTable.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncTaxTable.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/business/business-core/gncTaxTable.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -802,17 +802,17 @@
static QofObject gncTaxTableDesc =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: _GNC_MOD_NAME,
- type_label: "Tax Table",
- create: (gpointer)gncTaxTableCreate,
- book_begin: _gncTaxTableCreate,
- book_end: _gncTaxTableDestroy,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: NULL,
- version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = _GNC_MOD_NAME,
+ .type_label = "Tax Table",
+ .create = (gpointer)gncTaxTableCreate,
+ .book_begin = _gncTaxTableCreate,
+ .book_end = _gncTaxTableDestroy,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = NULL,
+ .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
};
gboolean gncTaxTableRegister (void)
Modified: gnucash/trunk/src/business/business-core/gncVendor.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncVendor.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/business/business-core/gncVendor.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -521,17 +521,17 @@
static QofObject gncVendorDesc =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: _GNC_MOD_NAME,
- type_label: "Vendor",
- create: (gpointer)gncVendorCreate,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: _gncVendorPrintable,
- version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = _GNC_MOD_NAME,
+ .type_label = "Vendor",
+ .create = (gpointer)gncVendorCreate,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = _gncVendorPrintable,
+ .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
};
gboolean gncVendorRegister (void)
Modified: gnucash/trunk/src/engine/Account.c
===================================================================
--- gnucash/trunk/src/engine/Account.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/engine/Account.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -4535,17 +4535,17 @@
/* QofObject function implementation and registration */
static QofObject account_object_def = {
- interface_version: QOF_OBJECT_VERSION,
- e_type: GNC_ID_ACCOUNT,
- type_label: "Account",
- create: (gpointer)xaccMallocAccount,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: (const char* (*)(gpointer)) xaccAccountGetName,
- version_cmp: (int (*)(gpointer,gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_ID_ACCOUNT,
+ .type_label = "Account",
+ .create = (gpointer)xaccMallocAccount,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = (const char* (*)(gpointer)) xaccAccountGetName,
+ .version_cmp = (int (*)(gpointer,gpointer)) qof_instance_version_cmp,
};
gboolean xaccAccountRegister (void)
Modified: gnucash/trunk/src/engine/SX-book.c
===================================================================
--- gnucash/trunk/src/engine/SX-book.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/engine/SX-book.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -162,15 +162,15 @@
static QofObject sxtg_object_def =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: GNC_ID_SXTG,
- type_label: "Scheduled Transaction Templates",
- book_begin: sxtg_book_begin,
- book_end: sxtg_book_end,
- is_dirty: sxtg_is_dirty,
- mark_clean: sxtg_mark_clean,
- foreach: NULL,
- printable: NULL,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_ID_SXTG,
+ .type_label = "Scheduled Transaction Templates",
+ .book_begin = sxtg_book_begin,
+ .book_end = sxtg_book_end,
+ .is_dirty = sxtg_is_dirty,
+ .mark_clean = sxtg_mark_clean,
+ .foreach = NULL,
+ .printable = NULL,
};
/* ====================================================================== */
@@ -294,32 +294,32 @@
static QofObject sxes_object_def =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: GNC_ID_SXES,
- type_label: "Scheduled Transactions List",
- create: NULL,
- book_begin: book_sxes_setup,
- book_end: NULL,
- is_dirty: book_sxlist_notsaved,
- mark_clean: book_sxns_mark_saved,
- foreach: NULL,
- printable: NULL,
- version_cmp: NULL
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_ID_SXES,
+ .type_label = "Scheduled Transactions List",
+ .create = NULL,
+ .book_begin = book_sxes_setup,
+ .book_end = NULL,
+ .is_dirty = book_sxlist_notsaved,
+ .mark_clean = book_sxns_mark_saved,
+ .foreach = NULL,
+ .printable = NULL,
+ .version_cmp = NULL
};
static QofObject sxtt_object_def =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: GNC_ID_SXTT,
- type_label: "Scheduled Transaction Templates",
- create: NULL,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: NULL,
- mark_clean: NULL,
- foreach: NULL,
- printable: NULL,
- version_cmp: NULL,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_ID_SXTT,
+ .type_label = "Scheduled Transaction Templates",
+ .create = NULL,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = NULL,
+ .mark_clean = NULL,
+ .foreach = NULL,
+ .printable = NULL,
+ .version_cmp = NULL,
};
gboolean
Modified: gnucash/trunk/src/engine/SchedXaction.c
===================================================================
--- gnucash/trunk/src/engine/SchedXaction.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/engine/SchedXaction.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -851,17 +851,17 @@
static QofObject SXDesc =
{
- interface_version : QOF_OBJECT_VERSION,
- e_type : GNC_SX_ID,
- type_label : "Scheduled Transaction",
- create : (gpointer)xaccSchedXactionMalloc,
- book_begin : NULL,
- book_end : NULL,
- is_dirty : qof_collection_is_dirty,
- mark_clean : qof_collection_mark_clean,
- foreach : qof_collection_foreach,
- printable : NULL,
- version_cmp : (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_SX_ID,
+ .type_label = "Scheduled Transaction",
+ .create = (gpointer)xaccSchedXactionMalloc,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = NULL,
+ .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
};
gboolean
Modified: gnucash/trunk/src/engine/Split.c
===================================================================
--- gnucash/trunk/src/engine/Split.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/engine/Split.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -1758,17 +1758,17 @@
/* Hook into the QofObject registry */
static QofObject split_object_def = {
- interface_version: QOF_OBJECT_VERSION,
- e_type: GNC_ID_SPLIT,
- type_label: "Split",
- create: (gpointer)xaccMallocSplit,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: (const char* (*)(gpointer)) xaccSplitGetMemo,
- version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_ID_SPLIT,
+ .type_label = "Split",
+ .create = (gpointer)xaccMallocSplit,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = (const char* (*)(gpointer)) xaccSplitGetMemo,
+ .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
};
static gpointer
Modified: gnucash/trunk/src/engine/Transaction.c
===================================================================
--- gnucash/trunk/src/engine/Transaction.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/engine/Transaction.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -1912,17 +1912,17 @@
/* Hook into the QofObject registry */
static QofObject trans_object_def = {
- interface_version: QOF_OBJECT_VERSION,
- e_type: GNC_ID_TRANS,
- type_label: "Transaction",
- create: (gpointer)xaccMallocTransaction,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: (const char* (*)(gpointer)) xaccTransGetDescription,
- version_cmp: (int (*)(gpointer,gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_ID_TRANS,
+ .type_label = "Transaction",
+ .create = (gpointer)xaccMallocTransaction,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = (const char* (*)(gpointer)) xaccTransGetDescription,
+ .version_cmp = (int (*)(gpointer,gpointer)) qof_instance_version_cmp,
};
static gboolean
Modified: gnucash/trunk/src/engine/gnc-budget.c
===================================================================
--- gnucash/trunk/src/engine/gnc-budget.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/engine/gnc-budget.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -596,17 +596,17 @@
/* Define the QofObject. */
static QofObject budget_object_def =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: GNC_ID_BUDGET,
- type_label: "Budget",
- create: (gpointer)gnc_budget_new,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: (const char* (*)(gpointer)) gnc_budget_get_name,
- version_cmp: (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_ID_BUDGET,
+ .type_label = "Budget",
+ .create = (gpointer)gnc_budget_new,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = (const char* (*)(gpointer)) gnc_budget_get_name,
+ .version_cmp = (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
};
Modified: gnucash/trunk/src/engine/gnc-commodity.c
===================================================================
--- gnucash/trunk/src/engine/gnc-commodity.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/engine/gnc-commodity.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -2319,28 +2319,28 @@
static QofObject commodity_object_def =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: GNC_ID_COMMODITY,
- type_label: "Commodity",
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: (const char* (*)(gpointer)) gnc_commodity_get_fullname,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_ID_COMMODITY,
+ .type_label = "Commodity",
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = (const char* (*)(gpointer)) gnc_commodity_get_fullname,
};
static QofObject namespace_object_def =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: GNC_ID_COMMODITY_NAMESPACE,
- type_label: "Namespace",
- book_begin: NULL,
- book_end: NULL,
- is_dirty: NULL,
- mark_clean: NULL,
- foreach: NULL,
- printable: NULL,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_ID_COMMODITY_NAMESPACE,
+ .type_label = "Namespace",
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = NULL,
+ .mark_clean = NULL,
+ .foreach = NULL,
+ .printable = NULL,
};
static void
@@ -2375,17 +2375,17 @@
static QofObject commodity_table_object_def =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: GNC_ID_COMMODITY_TABLE,
- type_label: "CommodityTable",
- create: NULL,
- book_begin: commodity_table_book_begin,
- book_end: commodity_table_book_end,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: NULL,
- printable: NULL,
- version_cmp: NULL,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_ID_COMMODITY_TABLE,
+ .type_label = "CommodityTable",
+ .create = NULL,
+ .book_begin = commodity_table_book_begin,
+ .book_end = commodity_table_book_end,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = NULL,
+ .printable = NULL,
+ .version_cmp = NULL,
};
gboolean
Modified: gnucash/trunk/src/engine/gnc-lot.c
===================================================================
--- gnucash/trunk/src/engine/gnc-lot.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/engine/gnc-lot.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -438,17 +438,17 @@
static QofObject gncLotDesc =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: GNC_ID_LOT,
- type_label: "Lot",
- create: (gpointer)gnc_lot_new,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: qof_collection_foreach,
- printable: NULL,
- version_cmp: (int (*)(gpointer,gpointer))qof_instance_version_cmp,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_ID_LOT,
+ .type_label = "Lot",
+ .create = (gpointer)gnc_lot_new,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = qof_collection_foreach,
+ .printable = NULL,
+ .version_cmp = (int (*)(gpointer,gpointer))qof_instance_version_cmp,
};
Modified: gnucash/trunk/src/engine/gnc-pricedb.c
===================================================================
--- gnucash/trunk/src/engine/gnc-pricedb.c 2008-11-26 14:22:17 UTC (rev 17723)
+++ gnucash/trunk/src/engine/gnc-pricedb.c 2008-11-26 14:35:36 UTC (rev 17724)
@@ -2444,32 +2444,32 @@
static QofObject price_object_def =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: GNC_ID_PRICE,
- type_label: "Price",
- create: price_create,
- book_begin: NULL,
- book_end: NULL,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: price_foreach,
- printable: price_printable,
- version_cmp: NULL,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_ID_PRICE,
+ .type_label = "Price",
+ .create = price_create,
+ .book_begin = NULL,
+ .book_end = NULL,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = price_foreach,
+ .printable = price_printable,
+ .version_cmp = NULL,
};
static QofObject pricedb_object_def =
{
- interface_version: QOF_OBJECT_VERSION,
- e_type: GNC_ID_PRICEDB,
- type_label: "PriceDB",
- create: NULL,
- book_begin: pricedb_book_begin,
- book_end: pricedb_book_end,
- is_dirty: qof_collection_is_dirty,
- mark_clean: qof_collection_mark_clean,
- foreach: NULL,
- printable: NULL,
- version_cmp: NULL,
+ .interface_version = QOF_OBJECT_VERSION,
+ .e_type = GNC_ID_PRICEDB,
+ .type_label = "PriceDB",
+ .create = NULL,
+ .book_begin = pricedb_book_begin,
+ .book_end = pricedb_book_end,
+ .is_dirty = qof_collection_is_dirty,
+ .mark_clean = qof_collection_mark_clean,
+ .foreach = NULL,
+ .printable = NULL,
+ .version_cmp = NULL,
};
gboolean
More information about the gnucash-changes
mailing list