diff --git a/libgnucash/engine/CMakeLists.txt b/libgnucash/engine/CMakeLists.txt index 630d8fd1fb6..40c2742410c 100644 --- a/libgnucash/engine/CMakeLists.txt +++ b/libgnucash/engine/CMakeLists.txt @@ -174,23 +174,23 @@ set (engine_SOURCES gnc-rational.cpp gnc-session.c gnc-timezone.cpp - gnc-uri-utils.c + gnc-uri-utils.cpp engine-helpers.c guid.cpp policy.cpp - gncAddress.c - gncBillTerm.c + gncAddress.cpp + gncBillTerm.cpp gncBusiness.c - gncCustomer.c - gncEmployee.c - gncEntry.c + gncCustomer.cpp + gncEmployee.cpp + gncEntry.cpp gncIDSearch.c - gncInvoice.c - gncJob.c - gncOrder.c - gncOwner.c - gncTaxTable.c - gncVendor.c + gncInvoice.cpp + gncJob.cpp + gncOrder.cpp + gncOwner.cpp + gncTaxTable.cpp + gncVendor.cpp kvp-frame.cpp kvp-value.cpp qof-backend.cpp diff --git a/libgnucash/engine/gnc-uri-utils.c b/libgnucash/engine/gnc-uri-utils.cpp similarity index 99% rename from libgnucash/engine/gnc-uri-utils.c rename to libgnucash/engine/gnc-uri-utils.cpp index fd962dc2bb1..164860e6b6e 100755 --- a/libgnucash/engine/gnc-uri-utils.c +++ b/libgnucash/engine/gnc-uri-utils.cpp @@ -66,7 +66,7 @@ gboolean gnc_uri_is_known_scheme (const gchar *scheme) for ( node = known_scheme_list; node != NULL; node = node->next ) { - gchar *known_scheme = node->data; + gchar *known_scheme = (char*)node->data; if ( !g_ascii_strcasecmp (scheme, known_scheme) ) { is_known_scheme = TRUE; diff --git a/libgnucash/engine/gncAddress.c b/libgnucash/engine/gncAddress.cpp similarity index 99% rename from libgnucash/engine/gncAddress.c rename to libgnucash/engine/gncAddress.cpp index 27e249f658d..98d6622f884 100644 --- a/libgnucash/engine/gncAddress.c +++ b/libgnucash/engine/gncAddress.cpp @@ -312,7 +312,7 @@ gncAddressCreate (QofBook *book, QofInstance *prnt) if (!book) return NULL; - addr = g_object_new (GNC_TYPE_ADDRESS, NULL); + addr = GNC_ADDRESS(g_object_new (GNC_TYPE_ADDRESS, NULL)); qof_instance_init_data(&addr->inst, GNC_ID_ADDRESS, book); addr->book = book; addr->dirty = FALSE; @@ -631,7 +631,7 @@ static QofObject GncAddressDesc = DI(.interface_version = ) QOF_OBJECT_VERSION, DI(.e_type = ) GNC_ID_ADDRESS, DI(.type_label = ) "Address", - DI(.create = ) (gpointer)qofAddressCreate, + DI(.create = ) (void* (*)(QofBook*))qofAddressCreate, DI(.book_begin = ) NULL, DI(.book_end = ) NULL, DI(.is_dirty = ) qof_collection_is_dirty, diff --git a/libgnucash/engine/gncBillTerm.c b/libgnucash/engine/gncBillTerm.cpp similarity index 95% rename from libgnucash/engine/gncBillTerm.c rename to libgnucash/engine/gncBillTerm.cpp index 9be71330dc2..bc554254727 100644 --- a/libgnucash/engine/gncBillTerm.c +++ b/libgnucash/engine/gncBillTerm.cpp @@ -95,14 +95,14 @@ static inline void maybe_resort_list (GncBillTerm *term) struct _book_info *bi; if (term->parent || term->invisible) return; - bi = qof_book_get_data (qof_instance_get_book(term), _GNC_MOD_NAME); + bi = static_cast<_book_info*>(qof_book_get_data (qof_instance_get_book(term), _GNC_MOD_NAME)); bi->terms = g_list_sort (bi->terms, (GCompareFunc)gncBillTermCompare); } static inline void addObj (GncBillTerm *term) { struct _book_info *bi; - bi = qof_book_get_data (qof_instance_get_book(term), _GNC_MOD_NAME); + bi = static_cast<_book_info*>(qof_book_get_data (qof_instance_get_book(term), _GNC_MOD_NAME)); bi->terms = g_list_insert_sorted (bi->terms, term, (GCompareFunc)gncBillTermCompare); } @@ -110,7 +110,7 @@ static inline void addObj (GncBillTerm *term) static inline void remObj (GncBillTerm *term) { struct _book_info *bi; - bi = qof_book_get_data (qof_instance_get_book(term), _GNC_MOD_NAME); + bi = static_cast<_book_info*>(qof_book_get_data (qof_instance_get_book(term), _GNC_MOD_NAME)); bi->terms = g_list_remove (bi->terms, term); } @@ -250,7 +250,7 @@ GncBillTerm * gncBillTermCreate (QofBook *book) GncBillTerm *term; if (!book) return NULL; - term = g_object_new (GNC_TYPE_BILLTERM, NULL); + term = GNC_BILLTERM(g_object_new (GNC_TYPE_BILLTERM, NULL)); qof_instance_init_data(&term->inst, _GNC_MOD_NAME, book); term->name = CACHE_INSERT (""); term->desc = CACHE_INSERT (""); @@ -293,7 +293,7 @@ static void gncBillTermFree (GncBillTerm *term) /* disconnect from the children */ for (list = term->children; list; list = list->next) { - child = list->data; + child = GNC_BILLTERM(list->data); gncBillTermSetParent(child, NULL); } g_list_free(term->children); @@ -334,7 +334,18 @@ void gncBillTermSetType (GncBillTerm *term, GncBillTermType type) } /** \brief Convert bill term types from text. */ -FROM_STRING_FUNC(GncBillTermType, ENUM_TERMS_TYPE) +GncBillTermType GncBillTermTypefromString (const char *str) +{ + if (str) + { + if (!strcmp (str, "GNC_TERM_TYPE_DAYS")) + return GNC_TERM_TYPE_DAYS; + else if (!strcmp (str, "GNC_TERM_TYPE_PROXIMO")) + return GNC_TERM_TYPE_PROXIMO; + } + PERR ("str cannot be %s", str); + return GNC_TERM_TYPE_DAYS; +} static void qofBillTermSetType (GncBillTerm *term, const char *type_label) @@ -497,9 +508,9 @@ GncBillTerm *gncBillTermLookupByName (QofBook *book, const char *name) for ( ; list; list = list->next) { - GncBillTerm *term = list->data; + GncBillTerm *term = GNC_BILLTERM(list->data); if (!g_strcmp0 (term->name, name)) - return list->data; + return term; } return NULL; } @@ -509,7 +520,7 @@ GList * gncBillTermGetTerms (QofBook *book) struct _book_info *bi; if (!book) return NULL; - bi = qof_book_get_data (book, _GNC_MOD_NAME); + bi = static_cast<_book_info*>(qof_book_get_data (book, _GNC_MOD_NAME)); return bi->terms; } @@ -527,7 +538,11 @@ const char *gncBillTermGetDescription (const GncBillTerm *term) GncBillTermType gncBillTermGetType (const GncBillTerm *term) { - if (!term) return 0; + if (!term) + { + PERR ("term cannot be null"); + return GNC_TERM_TYPE_DAYS; + } return term->type; } @@ -856,7 +871,7 @@ static void _gncBillTermDestroy (QofBook *book) if (!book) return; - bi = qof_book_get_data (book, _GNC_MOD_NAME); + bi = static_cast<_book_info*>(qof_book_get_data (book, _GNC_MOD_NAME)); col = qof_book_get_collection (book, GNC_ID_BILLTERM); qof_collection_foreach (col, destroy_billterm_on_book_close, NULL); @@ -870,7 +885,7 @@ static QofObject gncBillTermDesc = DI(.interface_version = ) QOF_OBJECT_VERSION, DI(.e_type = ) _GNC_MOD_NAME, DI(.type_label = ) "Billing Term", - DI(.create = ) (gpointer)gncBillTermCreate, + DI(.create = ) (void* (*)(QofBook*))gncBillTermCreate, DI(.book_begin = ) _gncBillTermCreate, DI(.book_end = ) _gncBillTermDestroy, DI(.is_dirty = ) qof_collection_is_dirty, diff --git a/libgnucash/engine/gncCustomer.c b/libgnucash/engine/gncCustomer.cpp similarity index 99% rename from libgnucash/engine/gncCustomer.c rename to libgnucash/engine/gncCustomer.cpp index 9786b3dd7a9..ca4e7e81221 100644 --- a/libgnucash/engine/gncCustomer.c +++ b/libgnucash/engine/gncCustomer.cpp @@ -306,7 +306,7 @@ GncCustomer *gncCustomerCreate (QofBook *book) if (!book) return NULL; - cust = g_object_new (GNC_TYPE_CUSTOMER, NULL); + cust = GNC_CUSTOMER(g_object_new (GNC_TYPE_CUSTOMER, NULL)); qof_instance_init_data (&cust->inst, _GNC_MOD_NAME, book); cust->id = CACHE_INSERT (""); @@ -700,7 +700,7 @@ GList * gncCustomerGetJoblist (const GncCustomer *cust, gboolean show_all) GList *list = NULL, *iterator; for (iterator = cust->jobs; iterator; iterator = iterator->next) { - GncJob *j = iterator->data; + auto j = GNC_JOB(iterator->data); if (gncJobGetActive (j)) list = g_list_prepend (list, j); } @@ -913,7 +913,7 @@ static QofObject gncCustomerDesc = DI(.interface_version = ) QOF_OBJECT_VERSION, DI(.e_type = ) _GNC_MOD_NAME, DI(.type_label = ) "Customer", - DI(.create = ) (gpointer)gncCustomerCreate, + DI(.create = ) (void* (*)(QofBook*))gncCustomerCreate, DI(.book_begin = ) NULL, DI(.book_end = ) gnc_customer_book_end, DI(.is_dirty = ) qof_collection_is_dirty, diff --git a/libgnucash/engine/gncEmployee.c b/libgnucash/engine/gncEmployee.cpp similarity index 98% rename from libgnucash/engine/gncEmployee.c rename to libgnucash/engine/gncEmployee.cpp index fd9518f88d4..e070dba38b6 100644 --- a/libgnucash/engine/gncEmployee.c +++ b/libgnucash/engine/gncEmployee.cpp @@ -205,13 +205,13 @@ gnc_employee_set_property (GObject *object, gncEmployeeSetLanguage(emp, g_value_get_string(value)); break; case PROP_CURRENCY: - gncEmployeeSetCurrency(emp, g_value_get_object(value)); + gncEmployeeSetCurrency(emp, GNC_COMMODITY(g_value_get_object(value))); break; case PROP_ACL: gncEmployeeSetAcl(emp, g_value_get_string(value)); break; case PROP_ADDRESS: - qofEmployeeSetAddr(emp, g_value_get_object(value)); + qofEmployeeSetAddr(emp, QOF_INSTANCE(g_value_get_object(value))); break; case PROP_WORKDAY: gncEmployeeSetWorkday(emp, *(gnc_numeric*)g_value_get_boxed(value)); @@ -220,7 +220,7 @@ gnc_employee_set_property (GObject *object, gncEmployeeSetRate(emp, *(gnc_numeric*)g_value_get_boxed(value)); break; case PROP_CCARD: - gncEmployeeSetCCard(emp, g_value_get_object(value)); + gncEmployeeSetCCard(emp, GNC_ACCOUNT(g_value_get_object(value))); break; case PROP_PDF_DIRNAME: qof_instance_set_kvp (QOF_INSTANCE (emp), value, 1, OWNER_EXPORT_PDF_DIRNAME); @@ -431,7 +431,7 @@ GncEmployee *gncEmployeeCreate (QofBook *book) if (!book) return NULL; - employee = g_object_new (GNC_TYPE_EMPLOYEE, NULL); + employee = GNC_EMPLOYEE(g_object_new (GNC_TYPE_EMPLOYEE, NULL)); qof_instance_init_data (&employee->inst, _GNC_MOD_NAME, book); employee->id = CACHE_INSERT (""); @@ -809,7 +809,7 @@ gboolean gncEmployeeEqual(const GncEmployee* a, const GncEmployee* b) static const char * _gncEmployeePrintable (gpointer item) { - GncEmployee *v = item; + auto v = GNC_EMPLOYEE(item); if (!item) return NULL; return gncAddressGetName(v->addr); } @@ -899,7 +899,7 @@ static QofObject gncEmployeeDesc = DI(.interface_version = ) QOF_OBJECT_VERSION, DI(.e_type = ) _GNC_MOD_NAME, DI(.type_label = ) "Employee", - DI(.create = ) (gpointer)gncEmployeeCreate, + DI(.create = ) (void* (*)(QofBook*))gncEmployeeCreate, DI(.book_begin = ) NULL, DI(.book_end = ) gnc_employee_book_end, DI(.is_dirty = ) qof_collection_is_dirty, diff --git a/libgnucash/engine/gncEntry.c b/libgnucash/engine/gncEntry.cpp similarity index 98% rename from libgnucash/engine/gncEntry.c rename to libgnucash/engine/gncEntry.cpp index 78e6cd972d6..8e056e293eb 100644 --- a/libgnucash/engine/gncEntry.c +++ b/libgnucash/engine/gncEntry.cpp @@ -417,7 +417,7 @@ GncEntry *gncEntryCreate (QofBook *book) if (!book) return NULL; - entry = g_object_new (GNC_TYPE_ENTRY, NULL); + entry = GNC_ENTRY(g_object_new (GNC_TYPE_ENTRY, NULL)); qof_instance_init_data (&entry->inst, _GNC_MOD_NAME, book); entry->desc = CACHE_INSERT (""); @@ -977,13 +977,21 @@ gnc_numeric gncEntryGetInvDiscount (const GncEntry *entry) GncAmountType gncEntryGetInvDiscountType (const GncEntry *entry) { - if (!entry) return 0; + if (!entry) + { + PERR ("entry must not be null"); + return GNC_AMT_TYPE_VALUE; + } return entry->i_disc_type; } GncDiscountHow gncEntryGetInvDiscountHow (const GncEntry *entry) { - if (!entry) return 0; + if (!entry) + { + PERR ("entry must not be null"); + return GNC_DISC_PRETAX; + } return entry->i_disc_how; } @@ -1069,7 +1077,11 @@ GncOwner * gncEntryGetBillTo (GncEntry *entry) GncEntryPaymentType gncEntryGetBillPayment (const GncEntry* entry) { - if (!entry) return 0; + if (!entry) + { + PERR ("entry must not be null"); + return GNC_PAYMENT_CASH; + } return entry->b_payment; } @@ -1158,7 +1170,7 @@ static void gncEntryComputeValueInt (gnc_numeric qty, gnc_numeric price, /* First, compute the aggregate tpercent and tvalue numbers */ for (node = entries; node; node = node->next) { - GncTaxTableEntry *entry = node->data; + auto entry = static_cast(node->data); gnc_numeric amount = gncTaxTableEntryGetAmount (entry); switch (gncTaxTableEntryGetType (entry)) @@ -1296,7 +1308,7 @@ static void gncEntryComputeValueInt (gnc_numeric qty, gnc_numeric price, PINFO("Computing tax value list"); for (node = entries; node; node = node->next) { - GncTaxTableEntry *entry = node->data; + auto entry = static_cast(node->data); Account *acc = gncTaxTableEntryGetAccount (entry); gnc_numeric amount = gncTaxTableEntryGetAmount (entry); @@ -1436,7 +1448,7 @@ gncEntryRecomputeValues (GncEntry *entry) entry->i_tax_value_rounded = gnc_numeric_zero(); for (tv_iter = entry->i_tax_values; tv_iter; tv_iter=tv_iter->next) { - GncAccountValue *acc_val = tv_iter->data; + auto acc_val = static_cast(tv_iter->data); entry->i_tax_value_rounded = gnc_numeric_add (entry->i_tax_value_rounded, acc_val->value, denom, GNC_HOW_DENOM_EXACT | GNC_HOW_RND_ROUND_HALF_UP); } @@ -1447,7 +1459,7 @@ gncEntryRecomputeValues (GncEntry *entry) entry->b_tax_value_rounded = gnc_numeric_zero(); for (tv_iter = entry->b_tax_values; tv_iter; tv_iter=tv_iter->next) { - GncAccountValue *acc_val = tv_iter->data; + auto acc_val = static_cast(tv_iter->data); entry->b_tax_value_rounded = gnc_numeric_add (entry->b_tax_value_rounded, acc_val->value, denom, GNC_HOW_DENOM_EXACT | GNC_HOW_RND_ROUND_HALF_UP); } @@ -1553,7 +1565,7 @@ AccountValueList * gncEntryGetDocTaxValues (GncEntry *entry, gboolean is_cust_do /* Make a copy of the list with negated values if necessary. */ for (node = int_values; node; node = node->next) { - GncAccountValue *acct_val = node->data; + auto acct_val = static_cast(node->data); values = gncAccountValueAdd (values, acct_val->account, (is_cn ? gnc_numeric_neg (acct_val->value) : acct_val->value)); @@ -1589,7 +1601,7 @@ AccountValueList * gncEntryGetBalTaxValues (GncEntry *entry, gboolean is_cust_do /* Make a copy of the list with negated values if necessary. */ for (node = int_values; node; node = node->next) { - GncAccountValue *acct_val = node->data; + auto acct_val = static_cast(node->data); values = gncAccountValueAdd (values, acct_val->account, (is_cust_doc ? gnc_numeric_neg (acct_val->value) : acct_val->value)); @@ -1723,7 +1735,7 @@ static QofObject gncEntryDesc = DI(.interface_version = ) QOF_OBJECT_VERSION, DI(.e_type = ) _GNC_MOD_NAME, DI(.type_label = ) "Order/Invoice/Bill Entry", - DI(.create = ) (gpointer)gncEntryCreate, + DI(.create = ) (void* (*)(QofBook*))gncEntryCreate, DI(.book_begin = ) NULL, DI(.book_end = ) gnc_entry_book_end, DI(.is_dirty = ) qof_collection_is_dirty, diff --git a/libgnucash/engine/gncInvoice.c b/libgnucash/engine/gncInvoice.cpp similarity index 97% rename from libgnucash/engine/gncInvoice.c rename to libgnucash/engine/gncInvoice.cpp index eb4ab1db8da..fb40ad5cb03 100644 --- a/libgnucash/engine/gncInvoice.c +++ b/libgnucash/engine/gncInvoice.cpp @@ -47,6 +47,8 @@ #include "gncOwnerP.h" #include "engine-helpers.h" +#include + struct _gncInvoice { QofInstance inst; @@ -317,7 +319,7 @@ GncInvoice *gncInvoiceCreate (QofBook *book) if (!book) return NULL; - invoice = g_object_new (GNC_TYPE_INVOICE, NULL); + invoice = GNC_INVOICE(g_object_new (GNC_TYPE_INVOICE, NULL)); qof_instance_init_data (&invoice->inst, _GNC_MOD_NAME, book); invoice->id = CACHE_INSERT (""); @@ -345,7 +347,7 @@ GncInvoice *gncInvoiceCopy (const GncInvoice *from) book = qof_instance_get_book (from); g_assert (book); - invoice = g_object_new (GNC_TYPE_INVOICE, NULL); + invoice = GNC_INVOICE(g_object_new (GNC_TYPE_INVOICE, NULL)); qof_instance_init_data (&invoice->inst, _GNC_MOD_NAME, book); gncInvoiceBeginEdit (invoice); @@ -378,7 +380,7 @@ GncInvoice *gncInvoiceCopy (const GncInvoice *from) // Copy all invoice->entries for (node = from->entries; node; node = node->next) { - GncEntry *from_entry = node->data; + auto from_entry = GNC_ENTRY(node->data); GncEntry *to_entry = gncEntryCreate (book); gncEntryCopy (from_entry, to_entry, FALSE); @@ -703,7 +705,7 @@ void gncInvoiceAddPrice (GncInvoice *invoice, GNCPrice *price) commodity = gnc_price_get_commodity (price); while (node != NULL) { - GNCPrice *curr = (GNCPrice*)node->data; + auto curr = GNC_PRICE(node->data); if (gnc_commodity_equal (commodity, gnc_price_get_commodity (curr))) break; node = g_list_next (node); @@ -767,7 +769,7 @@ void gncInvoiceRemoveEntries (GncInvoice *invoice) for (GList *next, *node = invoice->entries; node; node = next) { next = node->next; - GncEntry *entry = node->data; + auto entry = GNC_ENTRY(node->data); switch (gncInvoiceGetOwnerType (invoice)) { @@ -907,7 +909,7 @@ static gnc_numeric gncInvoiceSumTaxesInternal (AccountValueList *taxes) // to the desired denom and addition will just preserve it in that case. for (node = taxes; node; node=node->next) { - GncAccountValue *acc_val = node->data; + auto acc_val = static_cast(node->data); tt = gnc_numeric_add (tt, acc_val->value, GNC_DENOM_AUTO, GNC_HOW_DENOM_EXACT | GNC_HOW_RND_ROUND_HALF_UP); } @@ -917,8 +919,7 @@ static gnc_numeric gncInvoiceSumTaxesInternal (AccountValueList *taxes) static gnc_numeric gncInvoiceGetNetAndTaxesInternal (GncInvoice *invoice, gboolean use_value, AccountValueList **taxes, - gboolean use_payment_type, - GncEntryPaymentType type) + std::optional type) { GList *node; gnc_numeric net_total = gnc_numeric_zero (); @@ -938,10 +939,10 @@ static gnc_numeric gncInvoiceGetNetAndTaxesInternal (GncInvoice *invoice, gboole for (node = gncInvoiceGetEntries (invoice); node; node = node->next) { - GncEntry *entry = node->data; + auto entry = GNC_ENTRY(node->data); gnc_numeric value; - if (use_payment_type && gncEntryGetBillPayment (entry) != type) + if (type.has_value() && gncEntryGetBillPayment (entry) != type.value()) continue; if (use_value) @@ -970,7 +971,7 @@ static gnc_numeric gncInvoiceGetNetAndTaxesInternal (GncInvoice *invoice, gboole // which could otherwise happen when using a tax table with multiple tax rates for (node = tv_list; node; node=node->next) { - GncAccountValue *acc_val = node->data; + auto acc_val = static_cast(node->data); acc_val->value = gnc_numeric_convert (acc_val->value, denom, GNC_HOW_DENOM_EXACT | GNC_HOW_RND_ROUND_HALF_UP); } @@ -983,7 +984,7 @@ static gnc_numeric gncInvoiceGetNetAndTaxesInternal (GncInvoice *invoice, gboole static gnc_numeric gncInvoiceGetTotalInternal (GncInvoice *invoice, gboolean use_value, gboolean use_tax, - gboolean use_payment_type, GncEntryPaymentType type) + std::optional type) { AccountValueList *taxes; gnc_numeric total; @@ -991,7 +992,7 @@ static gnc_numeric gncInvoiceGetTotalInternal (GncInvoice *invoice, gboolean use if (!invoice) return gnc_numeric_zero (); ENTER (""); - total = gncInvoiceGetNetAndTaxesInternal (invoice, use_value, use_tax? &taxes : NULL, use_payment_type, type); + total = gncInvoiceGetNetAndTaxesInternal (invoice, use_value, use_tax? &taxes : NULL, type); if (use_tax) { @@ -1009,25 +1010,25 @@ static gnc_numeric gncInvoiceGetTotalInternal (GncInvoice *invoice, gboolean use gnc_numeric gncInvoiceGetTotal (GncInvoice *invoice) { if (!invoice) return gnc_numeric_zero (); - return gncInvoiceGetTotalInternal (invoice, TRUE, TRUE, FALSE, 0); + return gncInvoiceGetTotalInternal (invoice, TRUE, TRUE, {}); } gnc_numeric gncInvoiceGetTotalSubtotal (GncInvoice *invoice) { if (!invoice) return gnc_numeric_zero (); - return gncInvoiceGetTotalInternal (invoice, TRUE, FALSE, FALSE, 0); + return gncInvoiceGetTotalInternal (invoice, TRUE, FALSE, {}); } gnc_numeric gncInvoiceGetTotalTax (GncInvoice *invoice) { if (!invoice) return gnc_numeric_zero (); - return gncInvoiceGetTotalInternal (invoice, FALSE, TRUE, FALSE, 0); + return gncInvoiceGetTotalInternal (invoice, FALSE, TRUE, {}); } gnc_numeric gncInvoiceGetTotalOf (GncInvoice *invoice, GncEntryPaymentType type) { if (!invoice) return gnc_numeric_zero (); - return gncInvoiceGetTotalInternal (invoice, TRUE, TRUE, TRUE, type); + return gncInvoiceGetTotalInternal (invoice, TRUE, TRUE, type); } AccountValueList *gncInvoiceGetTotalTaxList (GncInvoice *invoice) @@ -1035,7 +1036,7 @@ AccountValueList *gncInvoiceGetTotalTaxList (GncInvoice *invoice) AccountValueList *taxes; if (!invoice) return NULL; - gncInvoiceGetNetAndTaxesInternal (invoice, FALSE, &taxes, FALSE, 0); + gncInvoiceGetNetAndTaxesInternal (invoice, FALSE, &taxes, {}); return taxes; } @@ -1174,7 +1175,7 @@ GNCPrice * gncInvoiceGetPrice (GncInvoice *invoice, gnc_commodity *commodity) while (node != NULL) { - GNCPrice *curr = (GNCPrice*)node->data; + auto curr = GNC_PRICE(node->data); if (gnc_commodity_equal (commodity, gnc_price_get_commodity (curr))) return curr; @@ -1371,7 +1372,7 @@ GHashTable *gncInvoiceGetForeignCurrencies (const GncInvoice *invoice) for (entries_iter = invoice->entries; entries_iter != NULL; entries_iter = g_list_next(entries_iter)) { - GncEntry *entry = (GncEntry*)entries_iter->data; + auto entry = GNC_ENTRY(entries_iter->data); Account *this_acc; gnc_commodity *account_currency; AccountValueList *tt_amts = NULL, *tt_iter; @@ -1401,7 +1402,7 @@ GHashTable *gncInvoiceGetForeignCurrencies (const GncInvoice *invoice) for (tt_iter = tt_amts; tt_iter != NULL; tt_iter = g_list_next(tt_iter)) { - GncAccountValue *tt_amt_val = (GncAccountValue*)tt_iter->data; + auto tt_amt_val = static_cast(tt_iter->data); Account *tt_acc = tt_amt_val->account; gnc_commodity *tt_acc_currency = xaccAccountGetCommodity (tt_acc); @@ -1580,7 +1581,7 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc, total = gnc_numeric_neg (total); for (node = taxes; node; node = node->next) { - GncAccountValue *acc_val = node->data; + auto acc_val = static_cast(node->data); acc_val->value = gnc_numeric_neg (acc_val->value); } } @@ -1592,7 +1593,7 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc, for (iter = gncInvoiceGetEntries (invoice); iter; iter = iter->next) { gnc_numeric value, tax; - GncEntry * entry = iter->data; + auto entry = GNC_ENTRY(iter->data); Account *this_acc; /* Stabilize the TaxTable in this entry */ @@ -1695,7 +1696,7 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc, PINFO ("Processing Split List"); for (iter = splitinfo; iter; iter = iter->next) { - GncAccountValue *acc_val = iter->data; + auto acc_val = static_cast(iter->data); //gnc_numeric amt_rounded = gnc_numeric_convert(acc_val->value, // denom, GNC_HOW_DENOM_EXACT | GNC_HOW_RND_ROUND_HALF_UP); @@ -1833,7 +1834,7 @@ gncInvoiceUnpost (GncInvoice *invoice, gboolean reset_tax_tables) PINFO ("Recreating link transactions for remaining lots"); for (lot_split_iter = lot_split_list; lot_split_iter; lot_split_iter = lot_split_iter->next) { - Split *split = lot_split_iter->data; + auto split = GNC_SPLIT(lot_split_iter->data); GList *other_split_list, *list_iter; Transaction *other_txn = xaccSplitGetParent (split); GList *lot_list = NULL; @@ -1847,7 +1848,7 @@ gncInvoiceUnpost (GncInvoice *invoice, gboolean reset_tax_tables) other_split_list = xaccTransGetSplitList (other_txn); for (list_iter = other_split_list; list_iter; list_iter = list_iter->next) { - Split *other_split = list_iter->data; + auto other_split = GNC_SPLIT(list_iter->data); GNCLot *other_lot = xaccSplitGetLot (other_split); /* Omit the lot we are about to delete */ @@ -1873,7 +1874,7 @@ gncInvoiceUnpost (GncInvoice *invoice, gboolean reset_tax_tables) * send it a modified event to reset its paid status */ for (list_iter = lot_list; list_iter; list_iter = list_iter->next) { - GNCLot *other_lot = list_iter->data; + auto other_lot = GNC_LOT(list_iter->data); GncInvoice *other_invoice = gncInvoiceGetInvoiceFromLot (other_lot); if (!gnc_lot_count_splits (other_lot)) @@ -1905,7 +1906,7 @@ gncInvoiceUnpost (GncInvoice *invoice, gboolean reset_tax_tables) for (iter = gncInvoiceGetEntries (invoice); iter; iter = iter->next) { - GncEntry *entry = iter->data; + auto entry = GNC_ENTRY(iter->data); gncEntryBeginEdit (entry); if (is_cust_doc) @@ -1935,7 +1936,7 @@ struct lotmatch static gboolean gnc_lot_match_owner_balancing (GNCLot *lot, gpointer user_data) { - struct lotmatch *lm = user_data; + struct lotmatch *lm = static_cast(user_data); GncOwner owner_def; const GncOwner *owner; gnc_numeric balance = gnc_lot_get_balance (lot); @@ -2185,7 +2186,7 @@ gboolean gncInvoiceEqual(const GncInvoice *a, const GncInvoice *b) static const char * _gncInvoicePrintable (gpointer obj) { - GncInvoice *invoice = obj; + auto invoice = GNC_INVOICE(obj); g_return_val_if_fail (invoice, NULL); @@ -2224,7 +2225,7 @@ static QofObject gncInvoiceDesc = DI(.interface_version = ) QOF_OBJECT_VERSION, DI(.e_type = ) _GNC_MOD_NAME, DI(.type_label = ) "Invoice", - DI(.create = ) (gpointer)gncInvoiceCreate, + DI(.create = ) (void* (*)(QofBook*))gncInvoiceCreate, DI(.book_begin = ) NULL, DI(.book_end = ) gnc_invoice_book_end, DI(.is_dirty = ) qof_collection_is_dirty, diff --git a/libgnucash/engine/gncJob.c b/libgnucash/engine/gncJob.cpp similarity index 99% rename from libgnucash/engine/gncJob.c rename to libgnucash/engine/gncJob.cpp index e1e55a09e4a..ca641a45a14 100644 --- a/libgnucash/engine/gncJob.c +++ b/libgnucash/engine/gncJob.cpp @@ -215,7 +215,7 @@ GncJob *gncJobCreate (QofBook *book) if (!book) return NULL; - job = g_object_new (GNC_TYPE_JOB, NULL); + job = GNC_JOB(g_object_new (GNC_TYPE_JOB, NULL)); qof_instance_init_data (&job->inst, _GNC_MOD_NAME, book); job->id = CACHE_INSERT (""); @@ -556,7 +556,7 @@ static const char * _gncJobPrintable (gpointer item) { GncJob *c; if (!item) return NULL; - c = item; + c = GNC_JOB(item); return c->name; } @@ -565,7 +565,7 @@ static QofObject gncJobDesc = DI(.interface_version = ) QOF_OBJECT_VERSION, DI(.e_type = ) _GNC_MOD_NAME, DI(.type_label = ) "Job", - DI(.create = ) (gpointer)gncJobCreate, + DI(.create = ) (void* (*)(QofBook*))gncJobCreate, DI(.book_begin = ) NULL, DI(.book_end = ) NULL, DI(.is_dirty = ) qof_collection_is_dirty, diff --git a/libgnucash/engine/gncOrder.c b/libgnucash/engine/gncOrder.cpp similarity index 99% rename from libgnucash/engine/gncOrder.c rename to libgnucash/engine/gncOrder.cpp index 21748717a90..1f7c09d5fe7 100644 --- a/libgnucash/engine/gncOrder.c +++ b/libgnucash/engine/gncOrder.cpp @@ -284,7 +284,7 @@ GncOrder *gncOrderCreate (QofBook *book) if (!book) return NULL; - order = g_object_new (GNC_TYPE_ORDER, NULL); + order = GNC_ORDER(g_object_new (GNC_TYPE_ORDER, NULL)); qof_instance_init_data (&order->inst, _GNC_MOD_NAME, book); order->id = CACHE_INSERT (""); @@ -533,7 +533,7 @@ int gncOrderCompare (const GncOrder *a, const GncOrder *b) static const char * _gncOrderPrintable (gpointer obj) { - GncOrder *order = obj; + GncOrder *order = GNC_ORDER(obj); g_return_val_if_fail (order, NULL); @@ -554,7 +554,7 @@ static QofObject gncOrderDesc = DI(.interface_version = ) QOF_OBJECT_VERSION, DI(.e_type = ) _GNC_MOD_NAME, DI(.type_label = ) "Order", - DI(.create = ) (gpointer)gncOrderCreate, + DI(.create = ) (void* (*)(QofBook*))gncOrderCreate, DI(.book_begin = ) NULL, DI(.book_end = ) NULL, DI(.is_dirty = ) qof_collection_is_dirty, diff --git a/libgnucash/engine/gncOwner.c b/libgnucash/engine/gncOwner.cpp similarity index 98% rename from libgnucash/engine/gncOwner.c rename to libgnucash/engine/gncOwner.cpp index 6441f5fbc16..48a103fa6da 100644 --- a/libgnucash/engine/gncOwner.c +++ b/libgnucash/engine/gncOwner.cpp @@ -705,7 +705,7 @@ gboolean gncOwnerIsValid (const GncOwner *owner) gboolean gncOwnerLotMatchOwnerFunc (GNCLot *lot, gpointer user_data) { - const GncOwner *req_owner = user_data; + auto req_owner = static_cast(user_data); GncOwner lot_owner; const GncOwner *end_owner; GncInvoice *invoice = gncInvoiceGetInvoiceFromLot (lot); @@ -905,7 +905,7 @@ Split *gncOwnerFindOffsettingSplit (GNCLot *lot, gnc_numeric target_amount) for (ls_iter = gnc_lot_get_split_list (lot); ls_iter; ls_iter = ls_iter->next) { - Split *split = ls_iter->data; + auto split = GNC_SPLIT(ls_iter->data); if (!split) continue; @@ -1024,7 +1024,7 @@ gncOwnerSetLotLinkMemo (Transaction *ll_txn) // Find all splits in the lot link transaction that are also in a document lot for (lts_iter = xaccTransGetSplitList (ll_txn); lts_iter; lts_iter = lts_iter->next) { - Split *split = lts_iter->data; + auto split = GNC_SPLIT(lts_iter->data); GNCLot *lot; GncInvoice *invoice; gchar *title; @@ -1052,10 +1052,10 @@ gncOwnerSetLotLinkMemo (Transaction *ll_txn) titles = g_list_sort (titles, (GCompareFunc)g_strcmp0); // Create the memo as we'd want it to be - new_memo = g_strconcat (memo_prefix, titles->data, NULL); + new_memo = g_strconcat (memo_prefix, static_cast(titles->data), NULL); for (titer = titles->next; titer; titer = titer->next) { - gchar *tmp_memo = g_strconcat (new_memo, " - ", titer->data, NULL); + gchar *tmp_memo = g_strconcat (new_memo, " - ", static_cast(titer->data), NULL); g_free (new_memo); new_memo = tmp_memo; } @@ -1064,8 +1064,8 @@ gncOwnerSetLotLinkMemo (Transaction *ll_txn) // Update the memos of all the splits we found previously (if needed) for (siter = splits; siter; siter = siter->next) { - if (g_strcmp0 (xaccSplitGetMemo (siter->data), new_memo) != 0) - xaccSplitSetMemo (siter->data, new_memo); + if (g_strcmp0 (xaccSplitGetMemo (GNC_SPLIT(siter->data)), new_memo) != 0) + xaccSplitSetMemo (GNC_SPLIT(siter->data), new_memo); } g_list_free (splits); @@ -1091,7 +1091,7 @@ get_ll_transaction_from_lot (GNCLot *lot) */ for (ls_iter = gnc_lot_get_split_list (lot); ls_iter; ls_iter = ls_iter->next) { - Split *ls = ls_iter->data; + auto ls = GNC_SPLIT(ls_iter->data); Transaction *ll_txn = xaccSplitGetParent (ls); SplitList *ts_iter; @@ -1100,7 +1100,7 @@ get_ll_transaction_from_lot (GNCLot *lot) for (ts_iter = xaccTransGetSplitList (ll_txn); ts_iter; ts_iter = ts_iter->next) { - Split *ts = ts_iter->data; + auto ts = GNC_SPLIT(ts_iter->data); GNCLot *tslot = xaccSplitGetLot (ts); if (!tslot) @@ -1271,7 +1271,7 @@ void gncOwnerAutoApplyPaymentsWithLots (const GncOwner *owner, GList *lots) for (left_iter = lots; left_iter; left_iter = left_iter->next) { - GNCLot *left_lot = left_iter->data; + auto left_lot = GNC_LOT(left_iter->data); gnc_numeric left_lot_bal; gboolean left_lot_has_doc; gboolean left_modified = FALSE; @@ -1305,7 +1305,7 @@ void gncOwnerAutoApplyPaymentsWithLots (const GncOwner *owner, GList *lots) */ for (right_iter = left_iter->next; right_iter; right_iter = right_iter->next) { - GNCLot *right_lot = right_iter->data; + auto right_lot = GNC_LOT(right_iter->data); gnc_numeric right_lot_bal; gboolean right_lot_has_doc; @@ -1502,7 +1502,7 @@ gncOwnerGetBalanceInCurrency (const GncOwner *owner, /* For each account */ for (acct_node = acct_list; acct_node; acct_node = acct_node->next) { - Account *account = acct_node->data; + auto account = GNC_ACCOUNT(acct_node->data); GList *lot_list = NULL, *lot_node; /* Check if this account can have lots for the owner, otherwise skip to next */ @@ -1520,7 +1520,7 @@ gncOwnerGetBalanceInCurrency (const GncOwner *owner, /* For each lot */ for (lot_node = lot_list; lot_node; lot_node = lot_node->next) { - GNCLot *lot = lot_node->data; + auto lot = GNC_LOT(lot_node->data); gnc_numeric lot_balance = gnc_lot_get_balance (lot); GncInvoice *invoice = gncInvoiceGetInvoiceFromLot(lot); if (invoice) diff --git a/libgnucash/engine/gncTaxTable.c b/libgnucash/engine/gncTaxTable.cpp similarity index 95% rename from libgnucash/engine/gncTaxTable.c rename to libgnucash/engine/gncTaxTable.cpp index fec75d7aed9..a74d964ab6a 100644 --- a/libgnucash/engine/gncTaxTable.c +++ b/libgnucash/engine/gncTaxTable.cpp @@ -154,7 +154,7 @@ maybe_resort_list (GncTaxTable *table) struct _book_info *bi; if (table->parent || table->invisible) return; - bi = qof_book_get_data (qof_instance_get_book(table), _GNC_MOD_NAME); + bi = static_cast<_book_info*>(qof_book_get_data (qof_instance_get_book(table), _GNC_MOD_NAME)); bi->tables = g_list_sort (bi->tables, (GCompareFunc)gncTaxTableCompare); } @@ -167,7 +167,7 @@ mod_table (GncTaxTable *table) static inline void addObj (GncTaxTable *table) { struct _book_info *bi; - bi = qof_book_get_data (qof_instance_get_book(table), _GNC_MOD_NAME); + bi = static_cast<_book_info*>(qof_book_get_data (qof_instance_get_book(table), _GNC_MOD_NAME)); bi->tables = g_list_insert_sorted (bi->tables, table, (GCompareFunc)gncTaxTableCompare); } @@ -175,7 +175,7 @@ static inline void addObj (GncTaxTable *table) static inline void remObj (GncTaxTable *table) { struct _book_info *bi; - bi = qof_book_get_data (qof_instance_get_book(table), _GNC_MOD_NAME); + bi = static_cast<_book_info*>(qof_book_get_data (qof_instance_get_book(table), _GNC_MOD_NAME)); bi->tables = g_list_remove (bi->tables, table); } @@ -322,7 +322,7 @@ impl_refers_to_object(const QofInstance* inst, const QofInstance* ref) for (node = tt->entries; node != NULL; node = node->next) { - GncTaxTableEntry* tte = node->data; + GncTaxTableEntry* tte = static_cast(node->data); if (tte->account == GNC_ACCOUNT(ref)) { @@ -408,7 +408,7 @@ gncTaxTableCreate (QofBook *book) GncTaxTable *table; if (!book) return NULL; - table = g_object_new (GNC_TYPE_TAXTABLE, NULL); + table = GNC_TAXTABLE(g_object_new (GNC_TYPE_TAXTABLE, NULL)); qof_instance_init_data (&table->inst, _GNC_MOD_NAME, book); table->name = CACHE_INSERT (""); addObj (table); @@ -438,9 +438,7 @@ gncTaxTableFree (GncTaxTable *table) remObj (table); /* destroy the list of entries */ - for (list = table->entries; list; list = list->next) - gncTaxTableEntryDestroy (list->data); - g_list_free (table->entries); + g_list_free_full (table->entries, (GDestroyNotify)gncTaxTableEntryDestroy); if (!qof_instance_get_destroying(table)) PERR("free a taxtable without do_free set!"); @@ -452,7 +450,7 @@ gncTaxTableFree (GncTaxTable *table) /* disconnect from the children */ for (list = table->children; list; list = list->next) { - child = list->data; + child = GNC_TAXTABLE(list->data); gncTaxTableSetParent(child, NULL); } g_list_free(table->children); @@ -550,7 +548,7 @@ void gncTaxTableMakeInvisible (GncTaxTable *table) if (!table) return; gncTaxTableBeginEdit (table); table->invisible = TRUE; - bi = qof_book_get_data (qof_instance_get_book(table), _GNC_MOD_NAME); + bi = static_cast<_book_info*>(qof_book_get_data (qof_instance_get_book(table), _GNC_MOD_NAME)); bi->tables = g_list_remove (bi->tables, table); gncTaxTableCommitEdit (table); } @@ -670,9 +668,9 @@ GncTaxTable *gncTaxTableLookupByName (QofBook *book, const char *name) for ( ; list; list = list->next) { - GncTaxTable *table = list->data; + GncTaxTable *table = GNC_TAXTABLE(list->data); if (!g_strcmp0 (table->name, name)) - return list->data; + return table; } return NULL; } @@ -703,7 +701,7 @@ GncTaxTableList * gncTaxTableGetTables (QofBook *book) struct _book_info *bi; if (!book) return NULL; - bi = qof_book_get_data (book, _GNC_MOD_NAME); + bi = static_cast<_book_info*>(qof_book_get_data (book, _GNC_MOD_NAME)); return bi ? bi->tables : NULL; } @@ -737,7 +735,7 @@ static GncTaxTable *gncTaxTableCopy (const GncTaxTable *table) for (list = table->entries; list; list = list->next) { GncTaxTableEntry *entry, *e; - entry = list->data; + entry = static_cast(list->data); e = gncTaxTableEntryCopy (entry); /* Clang static analyzer thinks we're leaking e, but we're not. * We're transferring it to table. */ @@ -800,7 +798,7 @@ Account * gncTaxTableEntryGetAccount (const GncTaxTableEntry *entry) GncAmountType gncTaxTableEntryGetType (const GncTaxTableEntry *entry) { - if (!entry) return 0; + if (!entry) return GncAmountType(0); return entry->type; } @@ -950,7 +948,7 @@ GList *gncAccountValueAdd (GList *list, Account *acc, gnc_numeric value) /* Try to find the account in the list */ for (li = list; li; li = li->next) { - res = li->data; + res = static_cast(li->data); if (res->account == acc) { res->value = gnc_numeric_add (res->value, value, GNC_DENOM_AUTO, @@ -973,7 +971,7 @@ GList *gncAccountValueAddList (GList *l1, GList *l2) for (li = l2; li; li = li->next ) { - GncAccountValue *val = li->data; + GncAccountValue *val = static_cast(li->data); l1 = gncAccountValueAdd (l1, val->account, val->value); } @@ -987,7 +985,7 @@ gnc_numeric gncAccountValueTotal (GList *list) for ( ; list ; list = list->next) { - GncAccountValue *val = list->data; + GncAccountValue *val = static_cast(list->data); total = gnc_numeric_add (total, val->value, GNC_DENOM_AUTO, GNC_HOW_DENOM_REDUCE | GNC_HOW_RND_ROUND_HALF_UP); } return total; @@ -1031,7 +1029,7 @@ static void _gncTaxTableDestroy (QofBook *book) if (!book) return; - bi = qof_book_get_data (book, _GNC_MOD_NAME); + bi = static_cast<_book_info*>(qof_book_get_data (book, _GNC_MOD_NAME)); col = qof_book_get_collection (book, GNC_ID_TAXTABLE); qof_collection_foreach (col, destroy_taxtable_on_book_close, NULL); @@ -1045,7 +1043,7 @@ static QofObject gncTaxTableDesc = DI(.interface_version = ) QOF_OBJECT_VERSION, DI(.e_type = ) _GNC_MOD_NAME, DI(.type_label = ) "Tax Table", - DI(.create = ) (gpointer)gncTaxTableCreate, + DI(.create = ) (void* (*)(QofBook*))gncTaxTableCreate, DI(.book_begin = ) _gncTaxTableCreate, DI(.book_end = ) _gncTaxTableDestroy, DI(.is_dirty = ) qof_collection_is_dirty, diff --git a/libgnucash/engine/gncVendor.c b/libgnucash/engine/gncVendor.cpp similarity index 98% rename from libgnucash/engine/gncVendor.c rename to libgnucash/engine/gncVendor.cpp index 7d0340c707b..3ab02210d6c 100644 --- a/libgnucash/engine/gncVendor.c +++ b/libgnucash/engine/gncVendor.cpp @@ -218,7 +218,7 @@ gnc_vendor_set_property (GObject *object, gncVendorSetNotes(vendor, g_value_get_string(value)); break; case PROP_CURRENCY: - gncVendorSetCurrency(vendor, g_value_get_object(value)); + gncVendorSetCurrency(vendor, GNC_COMMODITY(g_value_get_object(value))); break; case PROP_ACTIVE: gncVendorSetActive(vendor, g_value_get_boolean(value)); @@ -227,13 +227,13 @@ gnc_vendor_set_property (GObject *object, gncVendorSetTaxTableOverride(vendor, g_value_get_boolean(value)); break; case PROP_BILLTERMS: - gncVendorSetTerms(vendor, g_value_get_object(value)); + gncVendorSetTerms(vendor, GNC_BILLTERM(g_value_get_object(value))); break; case PROP_TAXTABLE: - gncVendorSetTaxTable(vendor, g_value_get_object(value)); + gncVendorSetTaxTable(vendor, GNC_TAXTABLE(g_value_get_object(value))); break; case PROP_ADDRESS: - qofVendorSetAddr(vendor, g_value_get_object(value)); + qofVendorSetAddr(vendor, QOF_INSTANCE(g_value_get_object(value))); break; case PROP_TAX_INCLUDED: gncVendorSetTaxIncluded(vendor, (GncTaxIncluded)g_value_get_int(value)); @@ -456,7 +456,7 @@ GncVendor *gncVendorCreate (QofBook *book) if (!book) return NULL; - vendor = g_object_new (GNC_TYPE_VENDOR, NULL); + vendor = GNC_VENDOR(g_object_new (GNC_TYPE_VENDOR, NULL)); qof_instance_init_data (&vendor->inst, _GNC_MOD_NAME, book); vendor->id = CACHE_INSERT (""); @@ -943,7 +943,7 @@ vend_handle_qof_events (QofInstance *entity, QofEventId event_type, static const char * _gncVendorPrintable (gpointer item) { - GncVendor *v = item; + GncVendor *v = GNC_VENDOR(item); if (!item) return NULL; return v->name; } @@ -975,7 +975,7 @@ static QofObject gncVendorDesc = DI(.interface_version = ) QOF_OBJECT_VERSION, DI(.e_type = ) _GNC_MOD_NAME, DI(.type_label = ) "Vendor", - DI(.create = ) (gpointer)gncVendorCreate, + DI(.create = ) (void* (*)(QofBook*))gncVendorCreate, DI(.book_begin = ) NULL, DI(.book_end = ) gnc_vendor_book_end, DI(.is_dirty = ) qof_collection_is_dirty, diff --git a/po/POTFILES.in b/po/POTFILES.in index 3ce4eb2bf72..7372b1d6f64 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -626,42 +626,42 @@ libgnucash/engine/cap-gains.cpp libgnucash/engine/cashobjects.cpp libgnucash/engine/engine-helpers.c libgnucash/engine/gnc-accounting-period.c -libgnucash/engine/gncAddress.c +libgnucash/engine/gncAddress.cpp libgnucash/engine/gnc-aqbanking-templates.cpp -libgnucash/engine/gncBillTerm.c +libgnucash/engine/gncBillTerm.cpp libgnucash/engine/gnc-budget.cpp libgnucash/engine/gncBusiness.c libgnucash/engine/gnc-commodity.cpp libgnucash/engine/gnc-commodity.h -libgnucash/engine/gncCustomer.c +libgnucash/engine/gncCustomer.cpp libgnucash/engine/gnc-date.cpp libgnucash/engine/gnc-datetime.cpp -libgnucash/engine/gncEmployee.c +libgnucash/engine/gncEmployee.cpp libgnucash/engine/gnc-engine.cpp -libgnucash/engine/gncEntry.c +libgnucash/engine/gncEntry.cpp libgnucash/engine/gnc-euro.cpp libgnucash/engine/gnc-event.c libgnucash/engine/gnc-features.cpp libgnucash/engine/gnc-hooks.c libgnucash/engine/gncIDSearch.c libgnucash/engine/gnc-int128.cpp -libgnucash/engine/gncInvoice.c -libgnucash/engine/gncJob.c +libgnucash/engine/gncInvoice.cpp +libgnucash/engine/gncJob.cpp libgnucash/engine/gnc-lot.cpp libgnucash/engine/gnc-numeric.cpp libgnucash/engine/gnc-option.cpp libgnucash/engine/gnc-option-date.cpp libgnucash/engine/gnc-optiondb.cpp libgnucash/engine/gnc-option-impl.cpp -libgnucash/engine/gncOrder.c -libgnucash/engine/gncOwner.c +libgnucash/engine/gncOrder.cpp +libgnucash/engine/gncOwner.cpp libgnucash/engine/gnc-pricedb.cpp libgnucash/engine/gnc-rational.cpp libgnucash/engine/gnc-session.c -libgnucash/engine/gncTaxTable.c +libgnucash/engine/gncTaxTable.cpp libgnucash/engine/gnc-timezone.cpp -libgnucash/engine/gnc-uri-utils.c -libgnucash/engine/gncVendor.c +libgnucash/engine/gnc-uri-utils.cpp +libgnucash/engine/gncVendor.cpp libgnucash/engine/guid.cpp libgnucash/engine/kvp-frame.cpp libgnucash/engine/kvp-value.cpp