Changeset 365 for trunk/src/helpers
- Timestamp:
- May 26, 2008, 4:33:24 AM (17 years ago)
- Location:
- trunk/src/helpers
- Files:
-
- 2 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 -
trunk/src/helpers/wphandle.c
r302 r365 24 24 25 25 /* 26 * This file Copyright (C) 1997-200 5Ulrich Mller,26 * This file Copyright (C) 1997-2008 Ulrich Mller, 27 27 * This file is part of the "XWorkplace helpers" source package. 28 28 * This is free software; you can redistribute it and/or modify … … 279 279 * 280 280 *@@added V0.9.16 (2001-10-02) [umoeller] 281 *@@changted V0.9.17 (2002-02-05) [umoeller]: added fQuitOnErrors 281 *@@changed V0.9.17 (2002-02-05) [umoeller]: added fQuitOnErrors 282 *@@changed XWP V1.0.8 (2008-05-25) [pr]: made DBCS safe @@fixes 1070 282 283 */ 283 284 … … 317 318 318 319 // upper the node name for string comparisons 319 strupr(pDriv->szName);320 nlsUpper(pDriv->szName); // V1.0.8 (2008-05-25) 320 321 321 322 // create a drive tree node … … 347 348 348 349 // upper the node name for string comparisons 349 strupr(pNode->szName);350 nlsUpper(pNode->szName); // V1.0.8 (2008-05-25) 350 351 351 352 // create a node tree node … … 643 644 * 644 645 *@@changed V0.9.16 (2001-10-19) [umoeller]: rewritten 646 *@@changed V1.0.8 (2008-05-25) [pr]: made DBCS safe @@fixes 1070 645 647 */ 646 648 … … 681 683 pEnd = NULL; 682 684 683 strupr(pszFilename);685 nlsUpper(pszFilename); // V1.0.8 (2008-05-25) 684 686 685 687 // 1) OK, find the drive.
Note:
See TracChangeset
for help on using the changeset viewer.