mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-15 04:00:56 +00:00
Fix typos
llvm-svn: 208869
This commit is contained in:
parent
0f9355b3b0
commit
f03763a44b
@ -417,7 +417,7 @@ int __sscanf_l(const char *__s, locale_t __l, const char *__format, ...) {
|
||||
// and failbit is set in __err.
|
||||
// Else an iterator pointing to the matching keyword is found. If more than
|
||||
// one keyword matches, an iterator to the first matching keyword is returned.
|
||||
// If on exit __b == __e, eofbit is set in __err. If __case_senstive is false,
|
||||
// If on exit __b == __e, eofbit is set in __err. If __case_sensitive is false,
|
||||
// __ct is used to force to lower case before comparing characters.
|
||||
// Examples:
|
||||
// Keywords: "a", "abb"
|
||||
@ -2038,7 +2038,7 @@ template <class _CharT, class _InputIterator>
|
||||
locale::id
|
||||
time_get<_CharT, _InputIterator>::id;
|
||||
|
||||
// time_get primatives
|
||||
// time_get primitives
|
||||
|
||||
template <class _CharT, class _InputIterator>
|
||||
void
|
||||
@ -2259,7 +2259,7 @@ time_get<_CharT, _InputIterator>::__get_percent(iter_type& __b, iter_type __e,
|
||||
__err |= ios_base::eofbit;
|
||||
}
|
||||
|
||||
// time_get end primatives
|
||||
// time_get end primitives
|
||||
|
||||
template <class _CharT, class _InputIterator>
|
||||
_InputIterator
|
||||
|
@ -2311,7 +2311,7 @@ template <class _CharT, class _Traits, class _Allocator>
|
||||
basic_string<_CharT, _Traits, _Allocator>&
|
||||
basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s, size_type __n)
|
||||
{
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::assign recieved nullptr");
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::assign received nullptr");
|
||||
size_type __cap = capacity();
|
||||
if (__cap >= __n)
|
||||
{
|
||||
@ -2485,7 +2485,7 @@ template <class _CharT, class _Traits, class _Allocator>
|
||||
basic_string<_CharT, _Traits, _Allocator>&
|
||||
basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s)
|
||||
{
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::assign recieved nullptr");
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::assign received nullptr");
|
||||
return assign(__s, traits_type::length(__s));
|
||||
}
|
||||
|
||||
@ -2495,7 +2495,7 @@ template <class _CharT, class _Traits, class _Allocator>
|
||||
basic_string<_CharT, _Traits, _Allocator>&
|
||||
basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s, size_type __n)
|
||||
{
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::append recieved nullptr");
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::append received nullptr");
|
||||
size_type __cap = capacity();
|
||||
size_type __sz = size();
|
||||
if (__cap - __sz >= __n)
|
||||
@ -2632,7 +2632,7 @@ template <class _CharT, class _Traits, class _Allocator>
|
||||
basic_string<_CharT, _Traits, _Allocator>&
|
||||
basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s)
|
||||
{
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::append recieved nullptr");
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::append received nullptr");
|
||||
return append(__s, traits_type::length(__s));
|
||||
}
|
||||
|
||||
@ -2642,7 +2642,7 @@ template <class _CharT, class _Traits, class _Allocator>
|
||||
basic_string<_CharT, _Traits, _Allocator>&
|
||||
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s, size_type __n)
|
||||
{
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::insert recieved nullptr");
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::insert received nullptr");
|
||||
size_type __sz = size();
|
||||
if (__pos > __sz)
|
||||
this->__throw_out_of_range();
|
||||
@ -2794,7 +2794,7 @@ template <class _CharT, class _Traits, class _Allocator>
|
||||
basic_string<_CharT, _Traits, _Allocator>&
|
||||
basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s)
|
||||
{
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::insert recieved nullptr");
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::insert received nullptr");
|
||||
return insert(__pos, __s, traits_type::length(__s));
|
||||
}
|
||||
|
||||
@ -2845,7 +2845,7 @@ template <class _CharT, class _Traits, class _Allocator>
|
||||
basic_string<_CharT, _Traits, _Allocator>&
|
||||
basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, const value_type* __s, size_type __n2)
|
||||
{
|
||||
_LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::replace recieved nullptr");
|
||||
_LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::replace received nullptr");
|
||||
size_type __sz = size();
|
||||
if (__pos > __sz)
|
||||
this->__throw_out_of_range();
|
||||
@ -2977,7 +2977,7 @@ template <class _CharT, class _Traits, class _Allocator>
|
||||
basic_string<_CharT, _Traits, _Allocator>&
|
||||
basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, const value_type* __s)
|
||||
{
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::replace recieved nullptr");
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::replace received nullptr");
|
||||
return replace(__pos, __n1, __s, traits_type::length(__s));
|
||||
}
|
||||
|
||||
@ -3345,7 +3345,7 @@ basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s,
|
||||
size_type __pos,
|
||||
size_type __n) const _NOEXCEPT
|
||||
{
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find(): received nullptr");
|
||||
size_type __sz = size();
|
||||
if (__pos > __sz || __sz - __pos < __n)
|
||||
return npos;
|
||||
@ -3374,7 +3374,7 @@ typename basic_string<_CharT, _Traits, _Allocator>::size_type
|
||||
basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s,
|
||||
size_type __pos) const _NOEXCEPT
|
||||
{
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::find(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::find(): received nullptr");
|
||||
return find(__s, __pos, traits_type::length(__s));
|
||||
}
|
||||
|
||||
@ -3401,7 +3401,7 @@ basic_string<_CharT, _Traits, _Allocator>::rfind(const value_type* __s,
|
||||
size_type __pos,
|
||||
size_type __n) const _NOEXCEPT
|
||||
{
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::rfind(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::rfind(): received nullptr");
|
||||
size_type __sz = size();
|
||||
__pos = _VSTD::min(__pos, __sz);
|
||||
if (__n < __sz - __pos)
|
||||
@ -3431,7 +3431,7 @@ typename basic_string<_CharT, _Traits, _Allocator>::size_type
|
||||
basic_string<_CharT, _Traits, _Allocator>::rfind(const value_type* __s,
|
||||
size_type __pos) const _NOEXCEPT
|
||||
{
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::rfind(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::rfind(): received nullptr");
|
||||
return rfind(__s, __pos, traits_type::length(__s));
|
||||
}
|
||||
|
||||
@ -3465,7 +3465,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_of(const value_type* __s,
|
||||
size_type __pos,
|
||||
size_type __n) const _NOEXCEPT
|
||||
{
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_of(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_of(): received nullptr");
|
||||
return _VSTD::__find_first_of<value_type, size_type, traits_type, npos>
|
||||
(data(), size(), __s, __pos, __n);
|
||||
}
|
||||
@ -3486,7 +3486,7 @@ typename basic_string<_CharT, _Traits, _Allocator>::size_type
|
||||
basic_string<_CharT, _Traits, _Allocator>::find_first_of(const value_type* __s,
|
||||
size_type __pos) const _NOEXCEPT
|
||||
{
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::find_first_of(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::find_first_of(): received nullptr");
|
||||
return _VSTD::__find_first_of<value_type, size_type, traits_type, npos>
|
||||
(data(), size(), __s, __pos, traits_type::length(__s));
|
||||
}
|
||||
@ -3508,7 +3508,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_of(const value_type* __s,
|
||||
size_type __pos,
|
||||
size_type __n) const _NOEXCEPT
|
||||
{
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_of(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_of(): received nullptr");
|
||||
return _VSTD::__find_last_of<value_type, size_type, traits_type, npos>
|
||||
(data(), size(), __s, __pos, __n);
|
||||
}
|
||||
@ -3529,7 +3529,7 @@ typename basic_string<_CharT, _Traits, _Allocator>::size_type
|
||||
basic_string<_CharT, _Traits, _Allocator>::find_last_of(const value_type* __s,
|
||||
size_type __pos) const _NOEXCEPT
|
||||
{
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::find_last_of(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::find_last_of(): received nullptr");
|
||||
return _VSTD::__find_last_of<value_type, size_type, traits_type, npos>
|
||||
(data(), size(), __s, __pos, traits_type::length(__s));
|
||||
}
|
||||
@ -3551,7 +3551,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const value_type* _
|
||||
size_type __pos,
|
||||
size_type __n) const _NOEXCEPT
|
||||
{
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_not_of(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_not_of(): received nullptr");
|
||||
return _VSTD::__find_first_not_of<value_type, size_type, traits_type, npos>
|
||||
(data(), size(), __s, __pos, __n);
|
||||
}
|
||||
@ -3572,7 +3572,7 @@ typename basic_string<_CharT, _Traits, _Allocator>::size_type
|
||||
basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const value_type* __s,
|
||||
size_type __pos) const _NOEXCEPT
|
||||
{
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::find_first_not_of(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::find_first_not_of(): received nullptr");
|
||||
return _VSTD::__find_first_not_of<value_type, size_type, traits_type, npos>
|
||||
(data(), size(), __s, __pos, traits_type::length(__s));
|
||||
}
|
||||
@ -3595,7 +3595,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const value_type* __
|
||||
size_type __pos,
|
||||
size_type __n) const _NOEXCEPT
|
||||
{
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_not_of(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_not_of(): received nullptr");
|
||||
return _VSTD::__find_last_not_of<value_type, size_type, traits_type, npos>
|
||||
(data(), size(), __s, __pos, __n);
|
||||
}
|
||||
@ -3616,7 +3616,7 @@ typename basic_string<_CharT, _Traits, _Allocator>::size_type
|
||||
basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const value_type* __s,
|
||||
size_type __pos) const _NOEXCEPT
|
||||
{
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::find_last_not_of(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::find_last_not_of(): received nullptr");
|
||||
return _VSTD::__find_last_not_of<value_type, size_type, traits_type, npos>
|
||||
(data(), size(), __s, __pos, traits_type::length(__s));
|
||||
}
|
||||
@ -3680,7 +3680,7 @@ template <class _CharT, class _Traits, class _Allocator>
|
||||
int
|
||||
basic_string<_CharT, _Traits, _Allocator>::compare(const value_type* __s) const _NOEXCEPT
|
||||
{
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::compare(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::compare(): received nullptr");
|
||||
return compare(0, npos, __s, traits_type::length(__s));
|
||||
}
|
||||
|
||||
@ -3690,7 +3690,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
|
||||
size_type __n1,
|
||||
const value_type* __s) const
|
||||
{
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::compare(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__s != nullptr, "string::compare(): received nullptr");
|
||||
return compare(__pos1, __n1, __s, traits_type::length(__s));
|
||||
}
|
||||
|
||||
@ -3701,7 +3701,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
|
||||
const value_type* __s,
|
||||
size_type __n2) const
|
||||
{
|
||||
_LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::compare(): recieved nullptr");
|
||||
_LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::compare(): received nullptr");
|
||||
size_type __sz = size();
|
||||
if (__pos1 > __sz || __n2 == npos)
|
||||
this->__throw_out_of_range();
|
||||
|
@ -136,7 +136,7 @@ const unsigned indices[] =
|
||||
// The algorithm creates a list of small primes, plus an open-ended list of
|
||||
// potential primes. All prime numbers are potential prime numbers. However
|
||||
// some potential prime numbers are not prime. In an ideal world, all potential
|
||||
// prime numbers would be prime. Candiate prime numbers are chosen as the next
|
||||
// prime numbers would be prime. Candidate prime numbers are chosen as the next
|
||||
// highest potential prime. Then this number is tested for prime by dividing it
|
||||
// by all potential prime numbers less than the sqrt of the candidate.
|
||||
//
|
||||
|
@ -303,7 +303,7 @@ void
|
||||
ios_base::copyfmt(const ios_base& rhs)
|
||||
{
|
||||
// If we can't acquire the needed resources, throw bad_alloc (can't set badbit)
|
||||
// Don't alter *this until all needed resources are aquired
|
||||
// Don't alter *this until all needed resources are acquired
|
||||
unique_ptr<event_callback, void (*)(void*)> new_callbacks(0, free);
|
||||
unique_ptr<int, void (*)(void*)> new_ints(0, free);
|
||||
unique_ptr<long, void (*)(void*)> new_longs(0, free);
|
||||
|
@ -107,8 +107,8 @@ size_t mbsnrtowcs( wchar_t *__restrict dst, const char **__restrict src,
|
||||
// Converts max_source_chars from the wide character buffer pointer to by *src,
|
||||
// into the multi byte character sequence buffer stored at dst which must be
|
||||
// dst_size_bytes bytes in size.
|
||||
// Returns >= 0: the number of bytes in the sequence sequence
|
||||
// converted frome *src, excluding the null terminator.
|
||||
// Returns >= 0: the number of bytes in the sequence
|
||||
// converted from *src, excluding the null terminator.
|
||||
// Returns size_t(-1) if an error occurs, also sets errno.
|
||||
// If dst is NULL dst_size_bytes is ignored and no bytes are copied to dst
|
||||
// and no "out" parameters are updated.
|
||||
|
@ -22,7 +22,7 @@
|
||||
// no keyword match is found. If no keyword match is found, __ke is returned.
|
||||
// Else an iterator pointing to the matching keyword is found. If more than
|
||||
// one keyword matches, an iterator to the first matching keyword is returned.
|
||||
// If on exit __b == __e, eofbit is set in __err. If __case_senstive is false,
|
||||
// If on exit __b == __e, eofbit is set in __err. If __case_sensitive is false,
|
||||
// __ct is used to force to lower case before comparing characters.
|
||||
// Examples:
|
||||
// Keywords: "a", "abb"
|
||||
|
@ -54,19 +54,19 @@ int main()
|
||||
std::ios ios(0);
|
||||
{
|
||||
const my_facet f(LOCALE_en_US_UTF_8, 1);
|
||||
std::string pat("Today is %A which is abreviated %a.");
|
||||
std::string pat("Today is %A which is abbreviated %a.");
|
||||
iter = f.put(output_iterator<char*>(str), ios, '*', &t,
|
||||
pat.data(), pat.data() + pat.size());
|
||||
std::string ex(str, iter.base());
|
||||
assert(ex == "Today is Saturday which is abreviated Sat.");
|
||||
assert(ex == "Today is Saturday which is abbreviated Sat.");
|
||||
}
|
||||
{
|
||||
const my_facet f(LOCALE_fr_FR_UTF_8, 1);
|
||||
std::string pat("Today is %A which is abreviated %a.");
|
||||
std::string pat("Today is %A which is abbreviated %a.");
|
||||
iter = f.put(output_iterator<char*>(str), ios, '*', &t,
|
||||
pat.data(), pat.data() + pat.size());
|
||||
std::string ex(str, iter.base());
|
||||
assert((ex == "Today is Samedi which is abreviated Sam.")||
|
||||
(ex == "Today is samedi which is abreviated sam." ));
|
||||
assert((ex == "Today is Samedi which is abbreviated Sam.")||
|
||||
(ex == "Today is samedi which is abbreviated sam." ));
|
||||
}
|
||||
}
|
||||
|
@ -45,11 +45,11 @@ int main()
|
||||
t.tm_isdst = 1;
|
||||
std::ios ios(0);
|
||||
{
|
||||
std::string pat("Today is %A which is abreviated %a.");
|
||||
std::string pat("Today is %A which is abbreviated %a.");
|
||||
iter = f.put(output_iterator<char*>(str), ios, '*', &t,
|
||||
pat.data(), pat.data() + pat.size());
|
||||
std::string ex(str, iter.base());
|
||||
assert(ex == "Today is Saturday which is abreviated Sat.");
|
||||
assert(ex == "Today is Saturday which is abbreviated Sat.");
|
||||
}
|
||||
{
|
||||
std::string pat("The number of the month is %Om.");
|
||||
|
Loading…
Reference in New Issue
Block a user