Changeset 1403


Ignore:
Timestamp:
Apr 29, 2004, 6:30:57 AM (21 years ago)
Author:
bird
Message:

Redid some constants and copied some minor stuff from mingw32.

Location:
trunk/src/gcc/libstdc++-v3/config/os/os2emx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gcc/libstdc++-v3/config/os/os2emx/ctype_base.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1402 r1403  
    3232//
    3333 
    34 // Information as gleaned from /emx/include/ctype.h
    35 
    36 #define __ctype_ALNUM   0x0001
    37 #define __ctype_ALPHA   0x0002
    38 #define __ctype_CNTRL   0x0004
    39 #define __ctype_DIGIT   0x0008
    40 #define __ctype_XDIGIT  0x0010
    41 #define __ctype_PUNCT   0x0020
    42 #define __ctype_UPPER   0x0040
    43 #define __ctype_LOWER   0x0080
    44 #define __ctype_GRAPH   0x0100
    45 #define __ctype_PRINT   0x0200
    46 #define __ctype_SPACE   0x0400
     34// Information as gleaned from ctype.h
    4735 
     36#define __ctype_UPPER   0x0001      /* Upper case alphabetic character. */
     37#define __ctype_LOWER   0x0002      /* Lower case alphabetic character. */
     38#define __ctype_DIGIT   0x0004      /* Digits 0-9. */
     39#define __ctype_SPACE   0x0008      /* White space and line ends. */
     40#define __ctype_PUNCT   0x0010      /* Punctuation marks. */
     41#define __ctype_CNTRL   0x0020      /* Control and format characters. */
     42#define __ctype_XDIGIT  0x0080      /* Hex digits. */
     43#define __ctype_ALPHA   0x0100      /* Letters and linguistic marks. */
     44#define __ctype_ALNUM   0x0200      /* Alphanumeric. */
     45#define __ctype_GRAPH   0x0400      /* All except controls and space. */
     46#define __ctype_PRINT   0x0800      /* Everything except controls. */
     47                 
    4848  struct ctype_base
    4949  {
  • trunk/src/gcc/libstdc++-v3/config/os/os2emx/ctype_inline.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1402 r1403  
    3535// functions go in ctype.cc
    3636 
     37
    3738  bool
    3839  ctype<char>::
    3940  is(mask __m, char __c) const
    40   { return _M_table[__c] & __m; }
     41  {
     42        return (_M_table[static_cast<unsigned char>(__c) ] & __m);
     43  }
    4144
     45 
    4246  const char*
    4347  ctype<char>::
     
    4549  {
    4650    while (__low < __high)
    47       *__vec++ = _M_table[*__low++];
     51      *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
    4852    return __high;
    4953  }
     
    5357  scan_is(mask __m, const char* __low, const char* __high) const
    5458  {
    55     while (__low < __high && !(_M_table[*__low] & __m))
     59    while (__low < __high && !this->is(__m, *__low))
    5660      ++__low;
    5761    return __low;
     
    6266  scan_not(mask __m, const char* __low, const char* __high) const
    6367  {
    64     while (__low < __high
    65            && (_M_table[*__low] & __m) != 0)
     68    while (__low < __high && this->is(__m, *__low) != 0)
    6669      ++__low;
    6770    return __low;
  • trunk/src/gcc/libstdc++-v3/config/os/os2emx/ctype_noninline.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r1402 r1403  
    161161  { return __ctype_data_inst.ctable; }
    162162
    163   ctype<char>::ctype(__c_locale, const mask* __table, bool __del, size_t __refs)
    164     : __ctype_abstract_base<char>(__refs),
    165       _M_del(__table != 0 && __del),
     163  ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
     164                     size_t __refs)
     165    : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
    166166      _M_toupper (__ctype_data_inst.toupper),
    167167      _M_tolower (__ctype_data_inst.tolower),
     
    172172
    173173  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
    174     : __ctype_abstract_base<char>(__refs),
    175       _M_del(__table != 0 && __del),
     174    : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
    176175      _M_toupper (__ctype_data_inst.toupper),
    177176      _M_tolower (__ctype_data_inst.tolower),
     
    210209    return __high;
    211210  }
     211
     212
     213
     214
Note: See TracChangeset for help on using the changeset viewer.