More Cruft for deletion

John Ralls jralls at ceridwen.us
Mon Nov 14 10:06:41 EST 2011


On Nov 13, 2011, at 11:42 PM, Christian Stimming wrote:

> Dear John,
> 
> thanks for looking up those unused functions. In general, I agree those should be removed. Have you also checked whether any of those are called from the Scheme files (with underscores replaces by dashes)? This should be checked as well.
> 
> Looking at the details, there are a few functions that I would consider useful even though they are unused, such as the equality predicates:
> 
> src/engine/gncEntry.c: gncEntryEqual
> src/engine/gncOrder.c: gncOrderEqual
> src/engine/gnc-commodity.c: gnc_commodity_table_equal
> 
> Those:
> src/engine/SX-ttinfo.c: gnc_ttsplitinfo_set_credit_formula_numeric
> src/engine/SX-ttinfo.c: gnc_ttsplitinfo_set_debit_formula_numeric
> are from me and are needed to fix the still-existing bug about the SX formula which is locale dependent (meaning if you entered an amount "1.23" in a locale with decimal point as the decimal separator, it won't work if you switch to a locale with a comma as the decimal separator). Those functions are the first of several steps to fix that. However, to be honest I'm not at all working on this anymore.
> 
> The app-utils ones should be checked for usage from Scheme (such as the gnc_is_euro_currency_code), but if they are unused in *our* Scheme code, all of them can be removed in trunk.
> 
> The gnome-utils ones can be removed. However, the file src/gnome-utils/gnc-tree-view-owner.c is probably still being worked on by Geert, but he will speak up for himself shortly I guess.
> 

Christian,

Yes, I checked for scheme usage by replacing underscores with hyphens. I found one function with a name in Scheme different from its name in C (xaccSomethingRetGUID in C became xaccSomethingReturnGUID in Scheme) during the build and I removed it from the list.

The gncFooEqual functions look like they were written for SQL backend testing. There are some others which are used only there (and since I'm not ready to rewrite those tests, will stay for now.)

Thanks for the review.

Regards,
John Ralls





More information about the gnucash-devel mailing list