Changeset 390 for trunk/src/helpers
- Timestamp:
- May 30, 2011, 5:44:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.