Changeset 365 for trunk/src/helpers/nls.c
- Timestamp:
- May 26, 2008, 4:33:24 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/nls.c
r349 r365 22 22 23 23 /* 24 * Copyright (C) 1997-200 7Ulrich Mller.24 * Copyright (C) 1997-2008 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 … … 729 729 for (uss = 0; 730 730 uss < usLen; 731 ++uss)731 uss++) 732 732 { 733 733 if (uss) 734 if ( 0 == ((usLen - uss) % 3))734 if (((usLen - uss) % 3) == 0) 735 735 { 736 736 pszTarget[ust] = cThousands; … … 1168 1168 *@@added V0.9.16 (2001-10-25) [umoeller] 1169 1169 *@@changed V0.9.20 (2002-07-25) [umoeller]: speedup, changed prototype 1170 *@@changed XWP V1.0.8 (2008-05-25) [pr]: rewritten for correct DBCS operation @@fixes 1070 1170 1171 */ 1171 1172 1172 1173 ULONG nlsUpper(PSZ psz) // in/out: string 1173 1174 { 1175 BOOL bDBCSType = TYPE_SBCS; 1174 1176 ULONG ul = 0; 1175 PSZ p ;1177 PSZ p = psz; 1176 1178 1177 1179 if (!G_fUpperMapInited) 1178 1180 InitUpperMap(); 1179 1181 1180 if (p = psz) 1181 { 1182 while (*p++ = G_szUpperMap[*p]) 1183 ++ul; 1182 for (; p && *p; p++, ul++) 1183 { 1184 switch(bDBCSType) 1185 { 1186 case TYPE_SBCS: 1187 case TYPE_DBCS_2ND: 1188 bDBCSType = G_afLeadByte[*p]; 1189 break; 1190 1191 case TYPE_DBCS_1ST : 1192 bDBCSType = TYPE_DBCS_2ND; 1193 break; 1194 } 1195 1196 if (bDBCSType == TYPE_SBCS) 1197 *p = G_szUpperMap[*p]; 1184 1198 } 1185 1199 … … 1187 1201 } 1188 1202 1189
Note:
See TracChangeset
for help on using the changeset viewer.