Changeset 1003


Ignore:
Timestamp:
Jan 18, 2004, 10:10:14 AM (22 years ago)
Author:
bird
Message:

A little optimization and extension of the types we support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/lib/locale/setlocale.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r1002 r1003  
    462462        {
    463463          UniChar ucs;
    464           unsigned char ct = 0, uc, lc;
     464          unsigned short ct = 0;
     465          unsigned char uc, lc;
    465466
    466467          if (!__to_ucs (uconv_obj, (unsigned char *)&i, 1, &ucs))
     
    469470          /* isxxx() do not support DBCS characters at all */
    470471          if (!IS_MBCS_PREFIX (__locale_ctype,i))
    471           {
     472          {  /* isn't there apis for getting all this at once? */
     473#if 0
    472474            if (UniQueryUpper (locale_obj, ucs))
    473475              ct |= __UPPER;
     
    488490            if (UniQueryBlank (locale_obj, ucs))
    489491              ct |= __BLANK;
     492#else
     493            UNICTYPE * pctype = UniQueryCharType (ucs);
     494            if (pctype)
     495              /* ASSUMES CT_* == __* */
     496              ct = (pctype->itype) & (__UPPER  | __LOWER  | __DIGIT | __SPACE |
     497                                      __PUNCT  | __CNTRL  | __BLANK | __XDIGIT |
     498                                      __ALPHA  | __ALNUM  | __GRAPH | __PRINT |
     499                                      __NUMBER | __SYMBOL | __ASCII);
     500
     501#endif
    490502
    491503            uc = Transform (locale_obj, uconv_obj, UniTransUpper, ucs, i);
Note: See TracChangeset for help on using the changeset viewer.