Which fields are really needed? was: Converting iso-4217-currencies.scm to C?

Frank H. Ellenberger f.ellenberger at online.de
Sun Feb 15 07:28:49 EST 2009


Hi,

Am Monday 09 February 2009 17:54:54 schrieb Derek Atkins:
:
> I.e., I can imagine something like:
>
> typedef struct {
>   const char* fullname;
>   const char* unitname;
>   const char* partname;
>   const char* namespace;
>   const char* mnemonic;
>   const char* exchange_code;
>   unsigned    parts_per_unit;
>   unsigned    smallest_fraction;
> } GNCCurrencyDef;
>
> static GNCCurrencyDef gncISOCurrencies[] = {
>  { "Afghanistan Afghani (old)", "afghani", "pul", "ISO4217", "AFA", "004",
> 100, 100 }, // through 2003-01-02 { "Afghanistan Afghani", "afghani",
> "afghani", "ISO4217", "AFN", "971", 1, 1 }, // from 2002-10-07 ...
> };

When I made the HUF-patch, I watched, that iso-currencies-to-c only generates 
	 fullname,
	 namespace,
         mnemonic, 
         exchange-code,
         smallest-fraction

The rest is simply ignored (unitname, partname, smallest-fraction).

Charles, just a shot in the dark: could this be the cause of Bug 
408444 – "Smallest fraction" disregarded?

BTW, where can I find some explanation of smallest_fraction vs. parts_per_unit 
vs. SCU?

Regards
Frank


More information about the gnucash-devel mailing list