Add a space after the currency code to make the currency string.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2261 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-05-03 09:56:04 +00:00
parent dbc52f39b8
commit 21b226b505
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2000-05-03 Dave Peticolas <peticola@cs.ucdavis.edu>
* src/engine/util.c (xaccSPrintAmount): add a space after the
currency code to make the currency symbol.
2000-05-02 Robert Graham Merkel <rgmerk@mira.net>
* man/gnc-prices.1: fixed typo.

View File

@ -557,13 +557,21 @@ xaccSPrintAmount (char * bufp, double val, short shrs, const char *curr_code)
struct lconv *lc;
int precision;
int min_trailing_zeros;
char curr_sym[5];
lc = gnc_localeconv();
if (curr_code && (strncmp(curr_code, lc->int_curr_symbol, 3) == 0))
curr_code = NULL;
else if (curr_code)
{
strncpy(curr_sym, curr_code, 3);
curr_sym[3] = '\0';
strcat(curr_sym, " ");
curr_code = curr_sym;
}
if (curr_code && (safe_strcmp(curr_code, "EUR") == 0))
if (curr_code && (strncmp(curr_code, "EUR", 3) == 0))
shrs |= PRTEUR;
if (shrs & PRTSHR)