diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/amount.c | 1 | ||||
-rw-r--r-- | src/util/config.c | 2 | ||||
-rw-r--r-- | src/util/currencies.conf | 54 |
3 files changed, 30 insertions, 27 deletions
diff --git a/src/util/amount.c b/src/util/amount.c index 9cd0739c9..97a1cf46a 100644 --- a/src/util/amount.c +++ b/src/util/amount.c @@ -225,6 +225,7 @@ TALER_amount_set_zero (const char *cur, sizeof (struct TALER_Amount)); for (unsigned int i = 0; i<slen; i++) amount->currency[i] = toupper (cur[i]); + /* FIXME: check currency consists only of legal characters! */ return GNUNET_OK; } diff --git a/src/util/config.c b/src/util/config.c index 9e1156240..cd30221ac 100644 --- a/src/util/config.c +++ b/src/util/config.c @@ -260,6 +260,7 @@ parse_currencies_cb (void *cls, GNUNET_free (str); return; } + /* FIXME: validate str has only legal characters in it! */ strcpy (cspec->currency, str); GNUNET_free (str); @@ -388,6 +389,7 @@ parse_currencies_cb (void *cls, return; } } + /* FIXME: validate map only maps from decimal numbers to strings! */ } diff --git a/src/util/currencies.conf b/src/util/currencies.conf index 4e923943c..3341a9a72 100644 --- a/src/util/currencies.conf +++ b/src/util/currencies.conf @@ -3,9 +3,9 @@ ENABLED = YES name = "Euro" code = "EUR" decimal_separator = "," -num_fractional_input_digits = 2 -num_fractional_normal_digits = 2 -num_fractional_trailing_zero_digits = 2 +fractional_input_digits = 2 +fractional_normal_digits = 2 +fractional_trailing_zero_digits = 2 is_currency_name_leading = NO alt_unit_names = {"0":"€"} @@ -14,9 +14,9 @@ ENABLED = YES name = "Swiss Francs" code = "CHF" decimal_separator = "." -num_fractional_input_digits = 2 -num_fractional_normal_digits = 2 -num_fractional_trailing_zero_digits = 2 +fractional_input_digits = 2 +fractional_normal_digits = 2 +fractional_trailing_zero_digits = 2 is_currency_name_leading = YES alt_unit_names = {"0":"Fr.","-2":"Rp."} @@ -25,9 +25,9 @@ ENABLED = NO name = "Hungarian Forint" code = "HUF" decimal_separator = "," -num_fractional_input_digits = 0 -num_fractional_normal_digits = 0 -num_fractional_trailing_zero_digits = 0 +fractional_input_digits = 0 +fractional_normal_digits = 0 +fractional_trailing_zero_digits = 0 is_currency_name_leading = NO alt_unit_names = {"0":"Ft"} @@ -36,9 +36,9 @@ ENABLED = NO name = "US Dollar" code = "USD" decimal_separator = "." -num_fractional_input_digits = 2 -num_fractional_normal_digits = 2 -num_fractional_trailing_zero_digits = 2 +fractional_input_digits = 2 +fractional_normal_digits = 2 +fractional_trailing_zero_digits = 2 is_currency_name_leading = YES alt_unit_names = {"0":"$"} @@ -47,9 +47,9 @@ ENABLED = YES name = "Kudos (Taler Demonstrator)" code = "KUDOS" decimal_separator = "," -num_fractional_input_digits = 2 -num_fractional_normal_digits = 2 -num_fractional_trailing_zero_digits = 2 +fractional_input_digits = 2 +fractional_normal_digits = 2 +fractional_trailing_zero_digits = 2 is_currency_name_leading = NO alt_unit_names = {"0":"ク"} @@ -58,9 +58,9 @@ ENABLED = YES name = "Test-kudos (Taler Demonstrator)" code = "TESTKUDOS" decimal_separator = "." -num_fractional_input_digits = 2 -num_fractional_normal_digits = 2 -num_fractional_trailing_zero_digits = 2 +fractional_input_digits = 2 +fractional_normal_digits = 2 +fractional_trailing_zero_digits = 2 is_currency_name_leading = NO alt_unit_names = {"0":"テ","3":"kテ","-3":"mテ"} @@ -69,9 +69,9 @@ ENABLED = NO name = "Japanese Yen" code = "JPY" decimal_separator = "." -num_fractional_input_digits = 2 -num_fractional_normal_digits = 0 -num_fractional_trailing_zero_digits = 2 +fractional_input_digits = 2 +fractional_normal_digits = 0 +fractional_trailing_zero_digits = 2 is_currency_name_leading = YES alt_unit_names = {"0":"¥"} @@ -80,9 +80,9 @@ ENABLED = NO name = "Bitcoin (Mainnet)" code = "BITCOINBTC" decimal_separator = "." -num_fractional_input_digits = 8 -num_fractional_normal_digits = 3 -num_fractional_trailing_zero_digits = 0 +fractional_input_digits = 8 +fractional_normal_digits = 3 +fractional_trailing_zero_digits = 0 is_currency_name_leading = NO alt_unit_names = {"0":"BTC","-3":"mBTC"} @@ -91,9 +91,9 @@ ENABLED = NO name = "WAI-ETHER (Ethereum)" code = "EthereumWAI" decimal_separator = "." -num_fractional_input_digits = 0 -num_fractional_normal_digits = 0 -num_fractional_trailing_zero_digits = 0 +fractional_input_digits = 0 +fractional_normal_digits = 0 +fractional_trailing_zero_digits = 0 is_currency_name_leading = NO alt_unit_names = {"0":"WAI","3":"KWAI","6":"MWAI","9":"GWAI","12":"Szabo","15":"Finney","18":"Ether","21":"KEther","24":"MEther"} |