Changeset 365 for branches/branch-1-0/src
- Timestamp:
- May 26, 2008, 4:33:24 AM (17 years ago)
- Location:
- branches/branch-1-0/src/helpers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1-0/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 … … 178 178 ++n) 179 179 G_afLeadByte[n] = TRUE; 180 180 181 G_fDBCS = TRUE; 181 182 } … … 586 587 ust++; 587 588 } 588 pszTarget[ust] = szTemp[uss]; 589 ust++; 589 pszTarget[ust++] = szTemp[uss]; 590 590 } 591 591 pszTarget[ust] = '\0'; … … 917 917 918 918 for (ul = 0; 919 ul < sizeof(G_szUpperMap);919 ul < 256; 920 920 ++ul) 921 921 { … … 964 964 *@@added V0.9.16 (2001-10-25) [umoeller] 965 965 *@@changed V0.9.20 (2002-07-25) [umoeller]: speedup, changed prototype 966 *@@changed XWP V1.0.8 (2008-05-25) [pr]: rewritten for correct DBCS operation @@fixes 1070 966 967 */ 967 968 968 969 ULONG nlsUpper(PSZ psz) // in/out: string 969 970 { 971 BOOL bDBCSType = TYPE_SBCS; 970 972 ULONG ul = 0; 973 PSZ p = psz; 971 974 972 975 if (!G_fUpperMapInited) 973 976 InitUpperMap(); 974 977 975 if (psz) 976 { 977 PSZ p = psz; 978 979 while (*p++ = G_szUpperMap[*p]) 980 ++ul; 978 for (; p && *p; p++, ul++) 979 { 980 switch(bDBCSType) 981 { 982 case TYPE_SBCS: 983 case TYPE_DBCS_2ND: 984 bDBCSType = G_afLeadByte[*p]; 985 break; 986 987 case TYPE_DBCS_1ST : 988 bDBCSType = TYPE_DBCS_2ND; 989 break; 990 } 991 992 if (bDBCSType == TYPE_SBCS) 993 *p = G_szUpperMap[*p]; 981 994 } 982 995 … … 984 997 } 985 998 986 -
branches/branch-1-0/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.