Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8b028b5

Browse files
author
Thomas G. Lockhart
committed
From JM de Lauwereyns (jmlauwer@icdc.caissedesdepots.fr):
lconv is already taken as a struct identifier defined in a /usr/include file.Only has an effect with USE_LOCALE enabled.(Apparently unique to AIX and/or AIX compiler? thomas)
1 parentd663f1c commit8b028b5

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

‎src/backend/utils/adt/cash.c

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* workings can be found in the book "Software Solutions in C" by
1010
* Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
1111
*
12-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.16 1997/09/20 16:15:34 thomas Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.17 1997/10/03 13:10:06 thomas Exp $
1313
*/
1414

1515
#include<stdio.h>
@@ -33,8 +33,7 @@ static const char *num_word(Cash value);
3333
#defineLAST_DIGIT(LAST_PAREN - 1)
3434

3535
#ifdefUSE_LOCALE
36-
staticstructlconv*lconv=NULL;
37-
36+
staticstructlconv*lconvert=NULL;
3837
#endif
3938

4039
/* cash_in()
@@ -65,18 +64,18 @@ cash_in(const char *str)
6564
csymbol;
6665

6766
#ifdefUSE_LOCALE
68-
if (lconv==NULL)
69-
lconv=localeconv();
67+
if (lconvert==NULL)
68+
lconvert=localeconv();
7069

7170
/* frac_digits in the C locale seems to return CHAR_MAX */
7271
/* best guess is 2 in this case I think */
73-
fpoint= ((lconv->frac_digits!=CHAR_MAX) ?lconv->frac_digits :2);/* int_frac_digits? */
72+
fpoint= ((lconvert->frac_digits!=CHAR_MAX) ?lconvert->frac_digits :2);/* int_frac_digits? */
7473

75-
dsymbol=*lconv->mon_decimal_point;
76-
ssymbol=*lconv->mon_thousands_sep;
77-
csymbol=*lconv->currency_symbol;
78-
psymbol=*lconv->positive_sign;
79-
nsymbol=*lconv->negative_sign;
74+
dsymbol=*lconvert->mon_decimal_point;
75+
ssymbol=*lconvert->mon_thousands_sep;
76+
csymbol=*lconvert->currency_symbol;
77+
psymbol=*lconvert->positive_sign;
78+
nsymbol=*lconvert->negative_sign;
8079
#else
8180
fpoint=2;
8281
dsymbol='.';
@@ -183,18 +182,18 @@ cash_out(Cash *in_value)
183182
charconvention;
184183

185184
#ifdefUSE_LOCALE
186-
if (lconv==NULL)
187-
lconv=localeconv();
188-
189-
mon_group=*lconv->mon_grouping;
190-
comma=*lconv->mon_thousands_sep;
191-
csymbol=*lconv->currency_symbol;
192-
dsymbol=*lconv->mon_decimal_point;
193-
nsymbol=lconv->negative_sign;
185+
if (lconvert==NULL)
186+
lconvert=localeconv();
187+
188+
mon_group=*lconvert->mon_grouping;
189+
comma=*lconvert->mon_thousands_sep;
190+
csymbol=*lconvert->currency_symbol;
191+
dsymbol=*lconvert->mon_decimal_point;
192+
nsymbol=lconvert->negative_sign;
194193
/* frac_digits in the C locale seems to return CHAR_MAX */
195194
/* best guess is 2 in this case I think */
196-
points= ((lconv->frac_digits!=CHAR_MAX) ?lconv->frac_digits :2);/* int_frac_digits? */
197-
convention=lconv->n_sign_posn;
195+
points= ((lconvert->frac_digits!=CHAR_MAX) ?lconvert->frac_digits :2);/* int_frac_digits? */
196+
convention=lconvert->n_sign_posn;
198197
#else
199198
mon_group=3;
200199
comma=',';

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp