This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[v3] ctype generic fixups



As reported by Mike, the ctype_base mask values for the generic
configury are duplicated. This solution was also pointed out by Loren
in private email.

I'd found it too, however, plus the removal of default arguments in
the ctype<char> ctor. 

The remaining generic bit is the ctype::is(cc, cc, mask*). 

-benjamin

x86/linux

2000-12-07  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* config/os/generic/bits/ctype_base.h (ctype_base): Change space mask.

	* config/os/generic/bits/ctype_noninline.h (ctype): Remove default
	arguments in definition.
	* config/os/solaris/solaris2.7/bits/ctype_noninline.h (ctype): Same.
	* config/os/solaris/solaris2.6/bits/ctype_noninline.h (ctype): Same.
	* config/os/solaris/solaris2.5/bits/ctype_noninline.h (ctype): Same.
	* config/os/newlib/bits/ctype_noninline.h (ctype): Same.
	* config/os/irix/bits/ctype_noninline.h (ctype): Same.
	* config/os/hpux/bits/ctype_noninline.h (ctype): Same.
	* config/os/bsd/netbsd/bits/ctype_noninline.h (ctype): Same.
	* config/os/bsd/freebsd/bits/ctype_noninline.h (ctype): Same.
	* config/os/aix/bits/ctype_noninline.h (ctype): Same.

Index: config/os/aix/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/aix/bits/ctype_noninline.h,v
retrieving revision 1.4
diff -c -p -r1.4 ctype_noninline.h
*** ctype_noninline.h	2000/12/07 06:44:46	1.4
--- ctype_noninline.h	2000/12/07 20:45:33
***************
*** 33,40 ****
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table = 0, bool __del = false, 
! 	size_t __refs = 0) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(NULL), _M_tolower(NULL),
        _M_ctable(NULL), _M_table(__table == 0 ? _M_ctable: __table) 
--- 33,39 ----
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(NULL), _M_tolower(NULL),
        _M_ctable(NULL), _M_table(__table == 0 ? _M_ctable: __table) 
Index: config/os/bsd/freebsd/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/bsd/freebsd/bits/ctype_noninline.h,v
retrieving revision 1.2
diff -c -p -r1.2 ctype_noninline.h
*** ctype_noninline.h	2000/12/07 06:44:47	1.2
--- ctype_noninline.h	2000/12/07 20:45:33
***************
*** 33,40 ****
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table = 0, bool __del = false, 
! 	size_t __refs = 0) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(NULL), _M_tolower(NULL),
        _M_ctable(NULL), _M_table(__table == 0 ? _M_ctable: __table) 
--- 33,39 ----
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(NULL), _M_tolower(NULL),
        _M_ctable(NULL), _M_table(__table == 0 ? _M_ctable: __table) 
Index: config/os/bsd/netbsd/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/bsd/netbsd/bits/ctype_noninline.h,v
retrieving revision 1.2
diff -c -p -r1.2 ctype_noninline.h
*** ctype_noninline.h	2000/12/07 06:44:47	1.2
--- ctype_noninline.h	2000/12/07 20:45:33
***************
*** 33,40 ****
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table = 0, bool __del = false, 
! 	size_t __refs = 0) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(NULL), _M_tolower(NULL),
        _M_ctable(NULL), _M_table(__table == 0 ? (_ctype_ + 1) : __table) 
--- 33,39 ----
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(NULL), _M_tolower(NULL),
        _M_ctable(NULL), _M_table(__table == 0 ? (_ctype_ + 1) : __table) 
Index: config/os/generic/bits/ctype_base.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/generic/bits/ctype_base.h,v
retrieving revision 1.1
diff -c -p -r1.1 ctype_base.h
*** ctype_base.h	2000/10/07 18:39:05	1.1
--- ctype_base.h	2000/12/07 20:45:33
***************
*** 41,57 ****
  
      enum
      {
!       space = (1 << 5),	// Whitespace
!       print = (1 << 6),	// Printing
!       cntrl = (1 << 9),	// Control character
!       upper = (1 << 0),	// UPPERCASE
!       lower = (1 << 1),	// lowercase
!       alpha = (1 << 5),	// Alphabetic
!       digit = (1 << 2),	// Numeric
!       punct = (1 << 10),// Punctuation
!       xdigit = (1 << 4),// Hexadecimal numeric
!       alnum = (1 << 11),// Alphanumeric
!       graph = (1 << 7)	// Graphical
      };
    };
  
--- 41,57 ----
  
      enum
      {
!       space  = (1 << 0),     // Whitespace
!       print  = (1 << 1),     // Printing
!       cntrl  = (1 << 2),     // Control character
!       upper  = (1 << 3),     // UPPERCASE
!       lower  = (1 << 4),     // lowercase
!       alpha  = (1 << 5),     // Alphabetic
!       digit  = (1 << 6),     // Numeric
!       punct  = (1 << 7),     // Punctuation
!       xdigit = (1 << 8),     // Hexadecimal numeric
!       alnum  = (1 << 9),     // Alphanumeric
!       graph  = (1 << 10)     // Graphical
      };
    };
  
Index: config/os/generic/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/generic/bits/ctype_noninline.h,v
retrieving revision 1.3
diff -c -p -r1.3 ctype_noninline.h
*** ctype_noninline.h	2000/12/07 06:44:48	1.3
--- ctype_noninline.h	2000/12/07 20:45:33
***************
*** 33,40 ****
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table = 0, bool __del = false, 
! 	size_t __refs = 0) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(NULL), _M_tolower(NULL),
        _M_ctable(NULL), _M_table(__table == 0 ? _M_ctable: __table) 
--- 33,39 ----
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(NULL), _M_tolower(NULL),
        _M_ctable(NULL), _M_table(__table == 0 ? _M_ctable: __table) 
Index: config/os/hpux/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/hpux/bits/ctype_noninline.h,v
retrieving revision 1.2
diff -c -p -r1.2 ctype_noninline.h
*** ctype_noninline.h	2000/12/07 06:44:48	1.2
--- ctype_noninline.h	2000/12/07 20:45:34
***************
*** 33,40 ****
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table = 0, bool __del = false, 
! 	size_t __refs = 0) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(NULL), _M_tolower(NULL),
        _M_ctable(NULL), _M_table(__table == 0 ? _M_ctable: __table) 
--- 33,39 ----
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(NULL), _M_tolower(NULL),
        _M_ctable(NULL), _M_table(__table == 0 ? _M_ctable: __table) 
Index: config/os/irix/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/irix/bits/ctype_noninline.h,v
retrieving revision 1.3
diff -c -p -r1.3 ctype_noninline.h
*** ctype_noninline.h	2000/12/07 06:44:48	1.3
--- ctype_noninline.h	2000/12/07 20:45:36
***************
*** 33,45 ****
    
  // Information as gleaned from /usr/include/ctype.h
  
!   ctype<char>::ctype(const mask* __table = 0, bool __del = false, 
! 	size_t __refs = 0)
!     : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
!       _M_toupper(NULL), _M_tolower(NULL), _M_ctable(NULL), 
!       _M_table(!__table
! 	       ? (const mask*) (__libc_attr._ctype_tbl->_class + 1)
! 	       : __table) 
      { }
  
    char
--- 33,43 ----
    
  // Information as gleaned from /usr/include/ctype.h
  
!   ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
!   : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
!     _M_toupper(NULL), _M_tolower(NULL), _M_ctable(NULL), 
!     _M_table(!__table ? 
!              (const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table) 
      { }
  
    char
Index: config/os/newlib/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/newlib/bits/ctype_noninline.h,v
retrieving revision 1.3
diff -c -p -r1.3 ctype_noninline.h
*** ctype_noninline.h	2000/12/07 06:44:48	1.3
--- ctype_noninline.h	2000/12/07 20:45:37
***************
*** 33,40 ****
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table = 0, bool __del = false, 
! 	size_t __refs = 0) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(NULL), _M_tolower(NULL),
        _M_ctable(_ctype_), _M_table(__table == 0 ? _M_ctable: __table) 
--- 33,39 ----
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(NULL), _M_tolower(NULL),
        _M_ctable(_ctype_), _M_table(__table == 0 ? _M_ctable: __table) 
Index: config/os/solaris/solaris2.5/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/solaris/solaris2.5/bits/ctype_noninline.h,v
retrieving revision 1.3
diff -c -p -r1.3 ctype_noninline.h
*** ctype_noninline.h	2000/12/07 06:44:48	1.3
--- ctype_noninline.h	2000/12/07 20:45:37
***************
*** 33,40 ****
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table = 0, bool __del = false, 
! 	size_t __refs = 0) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(NULL), _M_tolower(NULL),
        _M_ctable(__ctype), _M_table(__table == 0 ? _M_ctable: __table) 
--- 33,39 ----
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(NULL), _M_tolower(NULL),
        _M_ctable(__ctype), _M_table(__table == 0 ? _M_ctable: __table) 
Index: config/os/solaris/solaris2.6/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/solaris/solaris2.6/bits/ctype_noninline.h,v
retrieving revision 1.3
diff -c -p -r1.3 ctype_noninline.h
*** ctype_noninline.h	2000/12/07 06:44:48	1.3
--- ctype_noninline.h	2000/12/07 20:45:38
***************
*** 33,40 ****
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table = 0, bool __del = false, 
! 	size_t __refs = 0) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(__trans_upper), _M_tolower(__trans_lower),
        _M_ctable(__ctype_mask), _M_table(__table == 0 ? _M_ctable: __table) 
--- 33,39 ----
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) 
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(__trans_upper), _M_tolower(__trans_lower),
        _M_ctable(__ctype_mask), _M_table(__table == 0 ? _M_ctable: __table) 
Index: config/os/solaris/solaris2.7/bits/ctype_noninline.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/os/solaris/solaris2.7/bits/ctype_noninline.h,v
retrieving revision 1.3
diff -c -p -r1.3 ctype_noninline.h
*** ctype_noninline.h	2000/12/07 06:44:48	1.3
--- ctype_noninline.h	2000/12/07 20:45:39
***************
*** 33,40 ****
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table = 0, bool __del = false, 
! 	size_t __refs = 0)
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(__trans_upper), _M_tolower(__trans_lower),
        _M_ctable(__ctype_mask), _M_table(__table == 0 ? _M_ctable: __table) 
--- 33,39 ----
    
  // Information as gleaned from /usr/include/ctype.h
    
!   ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
      : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del), 
        _M_toupper(__trans_upper), _M_tolower(__trans_lower),
        _M_ctable(__ctype_mask), _M_table(__table == 0 ? _M_ctable: __table) 
Index: include/bits/locale_facets.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/bits/locale_facets.h,v
retrieving revision 1.6
diff -c -p -r1.6 locale_facets.h
*** locale_facets.h	2000/12/07 06:44:49	1.6
--- locale_facets.h	2000/12/07 20:45:41
*************** namespace std
*** 223,229 ****
        __to_type const& 	       _M_toupper;
        __to_type const& 	       _M_tolower;
        const mask* const&       _M_ctable;
!       const mask*       _M_table;
        
      public:
        static locale::id        id;
--- 223,229 ----
        __to_type const& 	       _M_toupper;
        __to_type const& 	       _M_tolower;
        const mask* const&       _M_ctable;
!       const mask*              _M_table;
        
      public:
        static locale::id        id;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]