{ return this->do_toupper(__c); }
const char_type*
- toupper(char_type *__low, const char_type* __high) const
- { return this->do_toupper(__low, __high); }
+ toupper(char_type *__lo, const char_type* __hi) const
+ { return this->do_toupper(__lo, __hi); }
char_type
tolower(char_type __c) const
{ return this->do_tolower(__c); }
const char_type*
- tolower(char_type* __low, const char_type* __high) const
- { return this->do_tolower(__low, __high); }
+ tolower(char_type* __lo, const char_type* __hi) const
+ { return this->do_tolower(__lo, __hi); }
char_type
widen(char __c) const
{ return this->do_widen(__c); }
const char*
- widen(const char* __low, const char* __high, char_type* __to) const
- { return this->do_widen(__low, __high, __to); }
+ widen(const char* __lo, const char* __hi, char_type* __to) const
+ { return this->do_widen(__lo, __hi, __to); }
char
narrow(char_type __c, char __dfault) const
{ return this->do_narrow(__c, __dfault); }
const char_type*
- narrow(const char_type* __low, const char_type* __high,
+ narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char *__to) const
- { return this->do_narrow(__low, __high, __dfault, __to); }
+ { return this->do_narrow(__lo, __hi, __dfault, __to); }
protected:
explicit
mask* __vec) const = 0;
virtual const char_type*
- do_scan_is(mask __m, const char_type* __lo,
+ do_scan_is(mask __m, const char_type* __lo,
const char_type* __hi) const = 0;
virtual const char_type*
do_toupper(char_type) const = 0;
virtual const char_type*
- do_toupper(char_type* __low, const char_type* __high) const = 0;
+ do_toupper(char_type* __lo, const char_type* __hi) const = 0;
virtual char_type
do_tolower(char_type) const = 0;
virtual const char_type*
- do_tolower(char_type* __low, const char_type* __high) const = 0;
+ do_tolower(char_type* __lo, const char_type* __hi) const = 0;
virtual char_type
do_widen(char) const = 0;
virtual const char*
- do_widen(const char* __low, const char* __high,
+ do_widen(const char* __lo, const char* __hi,
char_type* __dest) const = 0;
virtual char
do_narrow(char_type, char __dfault) const = 0;
virtual const char_type*
- do_narrow(const char_type* __low, const char_type* __high,
+ do_narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char* __dest) const = 0;
};
protected:
virtual
~ctype() { }
+
+ virtual bool
+ do_is(mask __m, char_type __c) const
+ { return false; }
+
+ virtual const char_type*
+ do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const
+ { return __hi; }
+
+ virtual const char_type*
+ do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const
+ { return __hi; }
+
+ virtual const char_type*
+ do_scan_not(mask __m, const char_type* __lo,
+ const char_type* __hi) const
+ { return __hi; }
+
+ virtual char_type
+ do_toupper(char_type __c) const
+ { return __c; }
+
+ virtual const char_type*
+ do_toupper(char_type* __lo, const char_type* __hi) const
+ { return __hi; }
+
+ virtual char_type
+ do_tolower(char_type __c) const
+ { return __c; }
+
+ virtual const char_type*
+ do_tolower(char_type* __lo, const char_type* __hi) const
+ { return __hi; }
+
+ virtual char_type
+ do_widen(char __c) const
+ { return char_type(); }
+
+ virtual const char*
+ do_widen(const char* __lo, const char* __hi, char_type* __dest) const
+ { return __hi; }
+
+ virtual char
+ do_narrow(char_type, char __dfault) const
+ { return __dfault; }
+
+ virtual const char_type*
+ do_narrow(const char_type* __lo, const char_type* __hi,
+ char __dfault, char* __dest) const
+ { return __hi; }
};
template<typename _CharT>
is(mask __m, char __c) const;
inline const char*
- is(const char* __low, const char* __high, mask* __vec) const;
+ is(const char* __lo, const char* __hi, mask* __vec) const;
inline const char*
- scan_is(mask __m, const char* __low, const char* __high) const;
+ scan_is(mask __m, const char* __lo, const char* __hi) const;
inline const char*
- scan_not(mask __m, const char* __low, const char* __high) const;
+ scan_not(mask __m, const char* __lo, const char* __hi) const;
protected:
virtual
do_is(mask __m, char_type __c) const;
virtual const char_type*
- do_is(const char_type* __lo, const char_type* __hi,
- mask* __vec) const;
+ do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
virtual const char_type*
- do_scan_is(mask __m, const char_type* __lo,
- const char_type* __hi) const;
+ do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
virtual const char_type*
do_scan_not(mask __m, const char_type* __lo,
do_toupper(char_type) const;
virtual const char_type*
- do_toupper(char_type* __low, const char_type* __high) const;
+ do_toupper(char_type* __lo, const char_type* __hi) const;
virtual char_type
do_tolower(char_type) const;
virtual const char_type*
- do_tolower(char_type* __low, const char_type* __high) const;
+ do_tolower(char_type* __lo, const char_type* __hi) const;
virtual char_type
do_widen(char) const;
virtual const char*
- do_widen(const char* __low, const char* __high,
- char_type* __dest) const;
+ do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
virtual char
do_narrow(char_type, char __dfault) const;
virtual const char_type*
- do_narrow(const char_type* __low, const char_type* __high,
+ do_narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char* __dest) const;
};
do_is(mask __m, char_type __c) const;
virtual const char_type*
- do_is(const char_type* __lo, const char_type* __hi,
- mask* __vec) const;
+ do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
virtual const char_type*
- do_scan_is(mask __m, const char_type* __lo,
- const char_type* __hi) const;
+ do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
virtual const char_type*
do_scan_not(mask __m, const char_type* __lo,
do_toupper(char_type) const;
virtual const char_type*
- do_toupper(char_type* __low, const char_type* __high) const;
+ do_toupper(char_type* __lo, const char_type* __hi) const;
virtual char_type
do_tolower(char_type) const;
virtual const char_type*
- do_tolower(char_type* __low, const char_type* __high) const;
+ do_tolower(char_type* __lo, const char_type* __hi) const;
virtual char_type
do_widen(char) const;
virtual const char*
- do_widen(const char* __low, const char* __high,
- char_type* __dest) const;
+ do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
virtual char
do_narrow(char_type, char __dfault) const;
virtual const char_type*
- do_narrow(const char_type* __low, const char_type* __high,
+ do_narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char* __dest) const;
};
{ return __c; }
const char*
- ctype<char>::do_widen(const char* __low, const char* __high,
- char* __dest) const
+ ctype<char>::do_widen(const char* __lo, const char* __hi, char* __dest) const
{
- memcpy(__dest, __low, __high - __low);
- return __high;
+ memcpy(__dest, __lo, __hi - __lo);
+ return __hi;
}
char
{ return __c; }
const char*
- ctype<char>::do_narrow(const char* __low, const char* __high,
+ ctype<char>::do_narrow(const char* __lo, const char* __hi,
char /*__dfault*/, char* __dest) const
{
- memcpy(__dest, __low, __high - __low);
- return __high;
+ memcpy(__dest, __lo, __hi - __lo);
+ return __hi;
}
ctype_byname<char>::ctype_byname(const char* /*__s*/, size_t __refs)
{ return towupper(__c); }
const wchar_t*
- ctype<wchar_t>::do_toupper(wchar_t* __low, const wchar_t* __high) const
+ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
{
- while (__low < __high)
+ while (__lo < __hi)
{
- *__low = towupper(*__low);
- ++__low;
+ *__lo = towupper(*__lo);
+ ++__lo;
}
- return __high;
+ return __hi;
}
wchar_t
{ return towlower(__c); }
const wchar_t*
- ctype<wchar_t>::do_tolower(wchar_t* __low, const wchar_t* __high) const
+ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
{
- while (__low < __high)
+ while (__lo < __hi)
{
- *__low = towlower(*__low);
- ++__low;
+ *__lo = towlower(*__lo);
+ ++__lo;
}
- return __high;
+ return __hi;
}
bool
const wchar_t*
ctype<wchar_t>::
- do_is(const wchar_t* __low, const wchar_t* __high, mask* __m) const
+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __m) const
{
- while (__low < __high && !this->is(*__m, *__low))
- ++__low;
- return __low;
+ while (__lo < __hi && !this->is(*__m, *__lo))
+ ++__lo;
+ return __lo;
}
const wchar_t*
ctype<wchar_t>::
- do_scan_is(mask __m, const wchar_t* __low, const wchar_t* __high) const
+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
{
- while (__low < __high && !this->is(__m, *__low))
- ++__low;
- return __low;
+ while (__lo < __hi && !this->is(__m, *__lo))
+ ++__lo;
+ return __lo;
}
const wchar_t*
ctype<wchar_t>::
- do_scan_not(mask __m, const char_type* __low, const char_type* __high) const
+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
{
- while (__low < __high && this->is(__m, *__low) != 0)
- ++__low;
- return __low;
+ while (__lo < __hi && this->is(__m, *__lo) != 0)
+ ++__lo;
+ return __lo;
}
wchar_t
const char*
ctype<wchar_t>::
- do_widen(const char* __low, const char* __high, wchar_t* __dest) const
+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
{
mbstate_t __state;
memset(static_cast<void*>(&__state), 0, sizeof(mbstate_t));
- mbsrtowcs(__dest, &__low, __high - __low, &__state);
- return __high;
+ mbsrtowcs(__dest, &__lo, __hi - __lo, &__state);
+ return __hi;
}
char
const wchar_t*
ctype<wchar_t>::
- do_narrow(const wchar_t* __low, const wchar_t* __high, char __dfault,
+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
char* __dest) const
{
mbstate_t __state;
memset(static_cast<void*>(&__state), 0, sizeof(mbstate_t));
- size_t __len = __high - __low;
- size_t __conv = wcsrtombs(__dest, &__low, __len, &__state);
+ size_t __len = __hi - __lo;
+ size_t __conv = wcsrtombs(__dest, &__lo, __len, &__state);
if (__conv == __len)
*__dest = __dfault;
- return __high;
+ return __hi;
}
ctype_byname<wchar_t>::