- Timestamp:
- May 30, 2011, 5:44:18 PM (14 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cppbase/bs_string_base.cpp
r254 r390 8 8 9 9 /* 10 * This file Copyright (C) 1999-20 01 Ulrich Mller.10 * This file Copyright (C) 1999-2011 Ulrich Mller. 11 11 * This program is free software; you can redistribute it and/or modify 12 12 * it under the terms of the GNU General Public License as published by … … 374 374 * 375 375 *@@added V0.9.18 (2002-03-08) [umoeller] 376 *@@changed WarpIN V1.0.20 (2011-05-30) [pr]: fix signed/unsigned error 376 377 */ 377 378 … … 383 384 CHAR sz[100]; 384 385 if (cThousands) 385 nlsThousands ULong(sz, value, cThousands);386 nlsThousandsLong(sz, value, cThousands); 386 387 else 387 388 _itoa(value, sz, 10); -
trunk/src/helpers/nls.c
r386 r390 22 22 23 23 /* 24 * Copyright (C) 1997-201 0Ulrich Mller.24 * Copyright (C) 1997-2011 Ulrich Mller. 25 25 * This file is part of the "XWorkplace helpers" source package. 26 26 * This is free software; you can redistribute it and/or modify … … 762 762 763 763 /* 764 *@@ nlsThousandsLong: 765 * signed version of above. 766 * 767 *@@added WarpIn V1.0.20 (2011-05-30) [pr] 768 */ 769 770 PSZ nlsThousandsLong(PSZ pszTarget, // out: decimal as string 771 LONG l, // in: decimal to convert 772 CHAR cThousands) // in: separator char (e.g. '.') 773 { 774 CHAR szTemp[30]; 775 USHORT ust = 0, 776 uss, 777 usLen = sprintf(szTemp, "%ld", l); 778 779 for (uss = 0; 780 uss < usLen; 781 uss++) 782 { 783 if (uss) 784 if (((usLen - uss) % 3) == 0) 785 { 786 pszTarget[ust] = cThousands; 787 ust++; 788 } 789 790 pszTarget[ust++] = szTemp[uss]; 791 } 792 793 pszTarget[ust] = '\0'; 794 795 return pszTarget; 796 } 797 798 /* 764 799 *@@ nlsThousandsDouble: 765 800 * like nlsThousandsULong, but for a "double"
Note:
See TracChangeset
for help on using the changeset viewer.