mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-23 07:27:05 +00:00
Transition to clang-format 19
This commit is contained in:
parent
700d4403d5
commit
6d00641896
@ -1611,7 +1611,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
|
|
||||||
template <class T, size_t N>
|
template <class T, size_t N>
|
||||||
gsl_NODISCARD gsl_api inline gsl_constexpr auto
|
gsl_NODISCARD gsl_api inline gsl_constexpr auto
|
||||||
size(T const (&)[N]) gsl_noexcept->size_t
|
size(T const (&)[N]) gsl_noexcept -> size_t
|
||||||
{
|
{
|
||||||
return N;
|
return N;
|
||||||
}
|
}
|
||||||
@ -1625,7 +1625,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
|
|
||||||
template <class T, size_t N>
|
template <class T, size_t N>
|
||||||
gsl_NODISCARD gsl_api inline gsl_constexpr auto
|
gsl_NODISCARD gsl_api inline gsl_constexpr auto
|
||||||
data(T (&arr)[N]) gsl_noexcept->T *
|
data(T (&arr)[N]) gsl_noexcept -> T *
|
||||||
{
|
{
|
||||||
return &arr[0];
|
return &arr[0];
|
||||||
}
|
}
|
||||||
@ -1646,7 +1646,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
|
|
||||||
template <class E>
|
template <class E>
|
||||||
gsl_NODISCARD inline gsl_constexpr auto
|
gsl_NODISCARD inline gsl_constexpr auto
|
||||||
data(std::initializer_list<E> il) gsl_noexcept->E const *
|
data(std::initializer_list<E> il) gsl_noexcept -> E const *
|
||||||
{
|
{
|
||||||
return il.begin();
|
return il.begin();
|
||||||
}
|
}
|
||||||
@ -1722,7 +1722,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
|
|
||||||
template <class T, std::size_t N>
|
template <class T, std::size_t N>
|
||||||
gsl_NODISCARD gsl_constexpr auto
|
gsl_NODISCARD gsl_constexpr auto
|
||||||
ssize(T const (&)[N]) gsl_noexcept->std::ptrdiff_t
|
ssize(T const (&)[N]) gsl_noexcept -> std::ptrdiff_t
|
||||||
{
|
{
|
||||||
return std::ptrdiff_t(N);
|
return std::ptrdiff_t(N);
|
||||||
}
|
}
|
||||||
@ -2269,7 +2269,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
}
|
}
|
||||||
#endif // gsl_CONFIG_DEFAULTS_VERSION < 1 || ! gsl_CPP17_OR_GREATER
|
#endif // gsl_CONFIG_DEFAULTS_VERSION < 1 || ! gsl_CPP17_OR_GREATER
|
||||||
|
|
||||||
gsl_SUPPRESS_MSGSL_WARNING(f .6)
|
gsl_SUPPRESS_MSGSL_WARNING(f.6)
|
||||||
#if gsl_CONFIG_DEFAULTS_VERSION < 1 // we avoid the unnecessary virtual calls if modern defaults are selected
|
#if gsl_CONFIG_DEFAULTS_VERSION < 1 // we avoid the unnecessary virtual calls if modern defaults are selected
|
||||||
virtual
|
virtual
|
||||||
#endif
|
#endif
|
||||||
@ -2330,7 +2330,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
}
|
}
|
||||||
#endif // ! gsl_CPP17_OR_GREATER
|
#endif // ! gsl_CPP17_OR_GREATER
|
||||||
|
|
||||||
gsl_SUPPRESS_MSGSL_WARNING(f .6) ~final_action_return() gsl_noexcept
|
gsl_SUPPRESS_MSGSL_WARNING(f.6) ~final_action_return() gsl_noexcept
|
||||||
{
|
{
|
||||||
#if !gsl_CPP17_OR_GREATER
|
#if !gsl_CPP17_OR_GREATER
|
||||||
if (exception_count_ != 0xFF) // abuse member as special "no-invoke" marker
|
if (exception_count_ != 0xFF) // abuse member as special "no-invoke" marker
|
||||||
@ -2371,7 +2371,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
}
|
}
|
||||||
#endif // ! gsl_CPP17_OR_GREATER
|
#endif // ! gsl_CPP17_OR_GREATER
|
||||||
|
|
||||||
gsl_SUPPRESS_MSGSL_WARNING(f .6) ~final_action_error() gsl_noexcept
|
gsl_SUPPRESS_MSGSL_WARNING(f.6) ~final_action_error() gsl_noexcept
|
||||||
{
|
{
|
||||||
#if !gsl_CPP17_OR_GREATER
|
#if !gsl_CPP17_OR_GREATER
|
||||||
if (exception_count_ != 0xFF) // abuse member as special "no-invoke" marker
|
if (exception_count_ != 0xFF) // abuse member as special "no-invoke" marker
|
||||||
@ -3496,21 +3496,21 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
gsl_NODISCARD inline gsl_api gsl_constexpr gsl_TRAILING_RETURN_TYPE_(bool)
|
gsl_NODISCARD inline gsl_api gsl_constexpr gsl_TRAILING_RETURN_TYPE_(bool)
|
||||||
operator==(not_null<T> const &l, not_null<U> const &r)
|
operator==(not_null<T> const &l, not_null<U> const &r)
|
||||||
gsl_RETURN_DECLTYPE_(l.operator->() == r.operator->())
|
gsl_RETURN_DECLTYPE_(l.operator-> () == r.operator->())
|
||||||
{
|
{
|
||||||
return l.operator->() == r.operator->();
|
return l.operator->() == r.operator->();
|
||||||
}
|
}
|
||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
gsl_NODISCARD inline gsl_api gsl_constexpr gsl_TRAILING_RETURN_TYPE_(bool)
|
gsl_NODISCARD inline gsl_api gsl_constexpr gsl_TRAILING_RETURN_TYPE_(bool)
|
||||||
operator==(not_null<T> const &l, U const &r)
|
operator==(not_null<T> const &l, U const &r)
|
||||||
gsl_RETURN_DECLTYPE_(l.operator->() == r)
|
gsl_RETURN_DECLTYPE_(l.operator-> () == r)
|
||||||
{
|
{
|
||||||
return l.operator->() == r;
|
return l.operator->() == r;
|
||||||
}
|
}
|
||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
gsl_NODISCARD inline gsl_api gsl_constexpr gsl_TRAILING_RETURN_TYPE_(bool)
|
gsl_NODISCARD inline gsl_api gsl_constexpr gsl_TRAILING_RETURN_TYPE_(bool)
|
||||||
operator==(T const &l, not_null<U> const &r)
|
operator==(T const &l, not_null<U> const &r)
|
||||||
gsl_RETURN_DECLTYPE_(l == r.operator->())
|
gsl_RETURN_DECLTYPE_(l == r.operator-> ())
|
||||||
{
|
{
|
||||||
return l == r.operator->();
|
return l == r.operator->();
|
||||||
}
|
}
|
||||||
@ -3526,21 +3526,21 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
gsl_NODISCARD inline gsl_api gsl_constexpr gsl_TRAILING_RETURN_TYPE_(bool)
|
gsl_NODISCARD inline gsl_api gsl_constexpr gsl_TRAILING_RETURN_TYPE_(bool)
|
||||||
operator<(not_null<T> const &l, not_null<U> const &r)
|
operator<(not_null<T> const &l, not_null<U> const &r)
|
||||||
gsl_RETURN_DECLTYPE_(l.operator->() < r.operator->())
|
gsl_RETURN_DECLTYPE_(l.operator-> () < r.operator->())
|
||||||
{
|
{
|
||||||
return l.operator->() < r.operator->();
|
return l.operator->() < r.operator->();
|
||||||
}
|
}
|
||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
gsl_NODISCARD inline gsl_api gsl_constexpr gsl_TRAILING_RETURN_TYPE_(bool)
|
gsl_NODISCARD inline gsl_api gsl_constexpr gsl_TRAILING_RETURN_TYPE_(bool)
|
||||||
operator<(not_null<T> const &l, U const &r)
|
operator<(not_null<T> const &l, U const &r)
|
||||||
gsl_RETURN_DECLTYPE_(l.operator->() < r)
|
gsl_RETURN_DECLTYPE_(l.operator-> () < r)
|
||||||
{
|
{
|
||||||
return l.operator->() < r;
|
return l.operator->() < r;
|
||||||
}
|
}
|
||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
gsl_NODISCARD inline gsl_api gsl_constexpr gsl_TRAILING_RETURN_TYPE_(bool)
|
gsl_NODISCARD inline gsl_api gsl_constexpr gsl_TRAILING_RETURN_TYPE_(bool)
|
||||||
operator<(T const &l, not_null<U> const &r)
|
operator<(T const &l, not_null<U> const &r)
|
||||||
gsl_RETURN_DECLTYPE_(l < r.operator->())
|
gsl_RETURN_DECLTYPE_(l < r.operator-> ())
|
||||||
{
|
{
|
||||||
return l < r.operator->();
|
return l < r.operator->();
|
||||||
}
|
}
|
||||||
@ -4357,7 +4357,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
#if gsl_CONFIG(ALLOWS_NONSTRICT_SPAN_COMPARISON)
|
#if gsl_CONFIG(ALLOWS_NONSTRICT_SPAN_COMPARISON)
|
||||||
|
|
||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
gsl_SUPPRESS_MSGSL_WARNING(stl .1)
|
gsl_SUPPRESS_MSGSL_WARNING(stl.1)
|
||||||
gsl_NODISCARD inline gsl_constexpr bool
|
gsl_NODISCARD inline gsl_constexpr bool
|
||||||
operator==(span<T> const &l, span<U> const &r)
|
operator==(span<T> const &l, span<U> const &r)
|
||||||
{
|
{
|
||||||
@ -4365,7 +4365,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
gsl_SUPPRESS_MSGSL_WARNING(stl .1)
|
gsl_SUPPRESS_MSGSL_WARNING(stl.1)
|
||||||
gsl_NODISCARD inline gsl_constexpr bool
|
gsl_NODISCARD inline gsl_constexpr bool
|
||||||
operator<(span<T> const &l, span<U> const &r)
|
operator<(span<T> const &l, span<U> const &r)
|
||||||
{
|
{
|
||||||
@ -4375,7 +4375,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
#else // a.k.a. !gsl_CONFIG( ALLOWS_NONSTRICT_SPAN_COMPARISON )
|
#else // a.k.a. !gsl_CONFIG( ALLOWS_NONSTRICT_SPAN_COMPARISON )
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
gsl_SUPPRESS_MSGSL_WARNING(stl .1)
|
gsl_SUPPRESS_MSGSL_WARNING(stl.1)
|
||||||
gsl_NODISCARD inline gsl_constexpr bool
|
gsl_NODISCARD inline gsl_constexpr bool
|
||||||
operator==(span<T> const &l, span<T> const &r)
|
operator==(span<T> const &l, span<T> const &r)
|
||||||
{
|
{
|
||||||
@ -4383,7 +4383,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
gsl_SUPPRESS_MSGSL_WARNING(stl .1)
|
gsl_SUPPRESS_MSGSL_WARNING(stl.1)
|
||||||
gsl_NODISCARD inline gsl_constexpr bool
|
gsl_NODISCARD inline gsl_constexpr bool
|
||||||
operator<(span<T> const &l, span<T> const &r)
|
operator<(span<T> const &l, span<T> const &r)
|
||||||
{
|
{
|
||||||
@ -4531,7 +4531,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
template <class Container, class EP = decltype(std17::data(std::declval<Container &>()))>
|
template <class Container, class EP = decltype(std17::data(std::declval<Container &>()))>
|
||||||
gsl_NODISCARD inline gsl_constexpr auto
|
gsl_NODISCARD inline gsl_constexpr auto
|
||||||
make_span(Container & cont)
|
make_span(Container & cont)
|
||||||
->span<typename std::remove_pointer<EP>::type>
|
-> span<typename std::remove_pointer<EP>::type>
|
||||||
{
|
{
|
||||||
return span<typename std::remove_pointer<EP>::type>(cont);
|
return span<typename std::remove_pointer<EP>::type>(cont);
|
||||||
}
|
}
|
||||||
@ -4539,7 +4539,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
template <class Container, class EP = decltype(std17::data(std::declval<Container &>()))>
|
template <class Container, class EP = decltype(std17::data(std::declval<Container &>()))>
|
||||||
gsl_NODISCARD inline gsl_constexpr auto
|
gsl_NODISCARD inline gsl_constexpr auto
|
||||||
make_span(Container const &cont)
|
make_span(Container const &cont)
|
||||||
->span<const typename std::remove_pointer<EP>::type>
|
-> span<const typename std::remove_pointer<EP>::type>
|
||||||
{
|
{
|
||||||
return span<const typename std::remove_pointer<EP>::type>(cont);
|
return span<const typename std::remove_pointer<EP>::type>(cont);
|
||||||
}
|
}
|
||||||
@ -5062,7 +5062,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
#if gsl_CONFIG(ALLOWS_NONSTRICT_SPAN_COMPARISON)
|
#if gsl_CONFIG(ALLOWS_NONSTRICT_SPAN_COMPARISON)
|
||||||
|
|
||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
gsl_SUPPRESS_MSGSL_WARNING(stl .1)
|
gsl_SUPPRESS_MSGSL_WARNING(stl.1)
|
||||||
gsl_NODISCARD inline gsl_constexpr14 bool
|
gsl_NODISCARD inline gsl_constexpr14 bool
|
||||||
operator==(basic_string_span<T> const &l, U const &u) gsl_noexcept
|
operator==(basic_string_span<T> const &l, U const &u) gsl_noexcept
|
||||||
{
|
{
|
||||||
@ -5072,7 +5072,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T, class U>
|
template <class T, class U>
|
||||||
gsl_SUPPRESS_MSGSL_WARNING(stl .1)
|
gsl_SUPPRESS_MSGSL_WARNING(stl.1)
|
||||||
gsl_NODISCARD inline gsl_constexpr14 bool
|
gsl_NODISCARD inline gsl_constexpr14 bool
|
||||||
operator<(basic_string_span<T> const &l, U const &u) gsl_noexcept
|
operator<(basic_string_span<T> const &l, U const &u) gsl_noexcept
|
||||||
{
|
{
|
||||||
@ -5085,7 +5085,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
|
|
||||||
template <class T, class U
|
template <class T, class U
|
||||||
gsl_ENABLE_IF_((!detail::is_basic_string_span<U>::value))>
|
gsl_ENABLE_IF_((!detail::is_basic_string_span<U>::value))>
|
||||||
gsl_SUPPRESS_MSGSL_WARNING(stl .1)
|
gsl_SUPPRESS_MSGSL_WARNING(stl.1)
|
||||||
gsl_NODISCARD inline gsl_constexpr14 bool
|
gsl_NODISCARD inline gsl_constexpr14 bool
|
||||||
operator==(U const &u, basic_string_span<T> const &r) gsl_noexcept
|
operator==(U const &u, basic_string_span<T> const &r) gsl_noexcept
|
||||||
{
|
{
|
||||||
@ -5096,7 +5096,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
|
|
||||||
template <class T, class U
|
template <class T, class U
|
||||||
gsl_ENABLE_IF_((!detail::is_basic_string_span<U>::value))>
|
gsl_ENABLE_IF_((!detail::is_basic_string_span<U>::value))>
|
||||||
gsl_SUPPRESS_MSGSL_WARNING(stl .1)
|
gsl_SUPPRESS_MSGSL_WARNING(stl.1)
|
||||||
gsl_NODISCARD inline gsl_constexpr14 bool
|
gsl_NODISCARD inline gsl_constexpr14 bool
|
||||||
operator<(U const &u, basic_string_span<T> const &r) gsl_noexcept
|
operator<(U const &u, basic_string_span<T> const &r) gsl_noexcept
|
||||||
{
|
{
|
||||||
@ -5109,7 +5109,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
#else // gsl_CONFIG( ALLOWS_NONSTRICT_SPAN_COMPARISON )
|
#else // gsl_CONFIG( ALLOWS_NONSTRICT_SPAN_COMPARISON )
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
gsl_SUPPRESS_MSGSL_WARNING(stl .1)
|
gsl_SUPPRESS_MSGSL_WARNING(stl.1)
|
||||||
gsl_NODISCARD inline gsl_constexpr14 bool
|
gsl_NODISCARD inline gsl_constexpr14 bool
|
||||||
operator==(basic_string_span<T> const &l, basic_string_span<T> const &r) gsl_noexcept
|
operator==(basic_string_span<T> const &l, basic_string_span<T> const &r) gsl_noexcept
|
||||||
{
|
{
|
||||||
@ -5117,7 +5117,7 @@ gsl_DISABLE_MSVC_WARNINGS(26432 26410 26415 26418 26472 26439 26440 26455 26473
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
gsl_SUPPRESS_MSGSL_WARNING(stl .1)
|
gsl_SUPPRESS_MSGSL_WARNING(stl.1)
|
||||||
gsl_NODISCARD inline gsl_constexpr14 bool
|
gsl_NODISCARD inline gsl_constexpr14 bool
|
||||||
operator<(basic_string_span<T> const &l, basic_string_span<T> const &r) gsl_noexcept
|
operator<(basic_string_span<T> const &l, basic_string_span<T> const &r) gsl_noexcept
|
||||||
{
|
{
|
||||||
|
@ -2588,7 +2588,7 @@ public:
|
|||||||
return ::clUnloadPlatformCompiler(object_);
|
return ::clUnloadPlatformCompiler(object_);
|
||||||
}
|
}
|
||||||
#endif // #if defined(CL_VERSION_1_2)
|
#endif // #if defined(CL_VERSION_1_2)
|
||||||
}; // class Platform
|
}; // class Platform
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deprecated APIs for 1.2
|
* Deprecated APIs for 1.2
|
||||||
@ -4745,9 +4745,9 @@ public:
|
|||||||
|
|
||||||
//! \brief Default constructor - initializes to nullptr.
|
//! \brief Default constructor - initializes to nullptr.
|
||||||
#if defined(CL_VERSION_1_2)
|
#if defined(CL_VERSION_1_2)
|
||||||
BufferRenderGL() : ImageGL(){};
|
BufferRenderGL() : ImageGL() {};
|
||||||
#else // #if defined(CL_VERSION_1_2)
|
#else // #if defined(CL_VERSION_1_2)
|
||||||
BufferRenderGL() : Image2DGL(){};
|
BufferRenderGL() : Image2DGL() {};
|
||||||
#endif // #if defined(CL_VERSION_1_2)
|
#endif // #if defined(CL_VERSION_1_2)
|
||||||
|
|
||||||
/*! \brief Constructor from cl_mem - takes ownership.
|
/*! \brief Constructor from cl_mem - takes ownership.
|
||||||
|
@ -119,7 +119,7 @@ static int ParsePositiveNumberWithBase(const StringView view, int base)
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
StringView remainder = view;
|
StringView remainder = view;
|
||||||
for (; remainder.size;
|
for (; remainder.size;
|
||||||
remainder = CpuFeatures_StringView_PopFront(remainder, 1))
|
remainder = CpuFeatures_StringView_PopFront(remainder, 1))
|
||||||
{
|
{
|
||||||
const int value = HexValue(CpuFeatures_StringView_Front(remainder));
|
const int value = HexValue(CpuFeatures_StringView_Front(remainder));
|
||||||
if (value < 0 || value >= base) return -1;
|
if (value < 0 || value >= base) return -1;
|
||||||
|
@ -36,9 +36,7 @@ struct VOLK_CPU volk_gnsssdr_cpu;
|
|||||||
static inline unsigned long long _xgetbv(unsigned int index)
|
static inline unsigned long long _xgetbv(unsigned int index)
|
||||||
{
|
{
|
||||||
unsigned int eax, edx;
|
unsigned int eax, edx;
|
||||||
__VOLK_ASM __VOLK_VOLATILE("xgetbv"
|
__VOLK_ASM __VOLK_VOLATILE("xgetbv" : "=a"(eax), "=d"(edx) : "c"(index));
|
||||||
: "=a"(eax), "=d"(edx)
|
|
||||||
: "c"(index));
|
|
||||||
return ((unsigned long long)edx << 32) | eax;
|
return ((unsigned long long)edx << 32) | eax;
|
||||||
}
|
}
|
||||||
#define __xgetbv() _xgetbv(0)
|
#define __xgetbv() _xgetbv(0)
|
||||||
|
@ -721,8 +721,8 @@ static void *data_decode_from_file(asn_TYPE_descriptor_t *pduType, FILE *file,
|
|||||||
rval.consumed = 0;
|
rval.consumed = 0;
|
||||||
|
|
||||||
for (tolerate_eof = 1; /* Allow EOF first time buffer is non-empty */
|
for (tolerate_eof = 1; /* Allow EOF first time buffer is non-empty */
|
||||||
(rd = fread(fbuf, 1, fbuf_size, file)) || feof(file) == 0 ||
|
(rd = fread(fbuf, 1, fbuf_size, file)) || feof(file) == 0 ||
|
||||||
(tolerate_eof && DynamicBuffer.length);)
|
(tolerate_eof && DynamicBuffer.length);)
|
||||||
{
|
{
|
||||||
int ecbits = 0; /* Extra consumed bits in case of PER */
|
int ecbits = 0; /* Extra consumed bits in case of PER */
|
||||||
uint8_t *i_bptr;
|
uint8_t *i_bptr;
|
||||||
|
@ -147,8 +147,7 @@ static long GMTOFF(struct tm a)
|
|||||||
} \
|
} \
|
||||||
while (0); \
|
while (0); \
|
||||||
} \
|
} \
|
||||||
while (0) \
|
while (0);
|
||||||
;
|
|
||||||
|
|
||||||
#ifdef _EMULATE_TIMEGM
|
#ifdef _EMULATE_TIMEGM
|
||||||
static time_t timegm(struct tm *tm)
|
static time_t timegm(struct tm *tm)
|
||||||
@ -428,21 +427,21 @@ time_t asn_GT2time_frac(const GeneralizedTime_t *st, int *frac_value,
|
|||||||
memset(&tm_s, 0, sizeof(tm_s));
|
memset(&tm_s, 0, sizeof(tm_s));
|
||||||
#undef B2F
|
#undef B2F
|
||||||
#undef B2T
|
#undef B2T
|
||||||
#define B2F(var) \
|
#define B2F(var) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
unsigned ch = *buf; \
|
unsigned ch = *buf; \
|
||||||
if (ch < 0x30 || ch > 0x39) \
|
if (ch < 0x30 || ch > 0x39) \
|
||||||
{ \
|
{ \
|
||||||
errno = EINVAL; \
|
errno = EINVAL; \
|
||||||
return -1; \
|
return -1; \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
(var) = (var)*10 + (ch - 0x30); \
|
(var) = (var) * 10 + (ch - 0x30); \
|
||||||
buf++; \
|
buf++; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
#define B2T(var) B2F(tm_s.var)
|
#define B2T(var) B2F(tm_s.var)
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ static int INTEGER__compar_enum2value(const void *kp, const void *am)
|
|||||||
|
|
||||||
/* Compare strings */
|
/* Compare strings */
|
||||||
for (ptr = key->start, end = key->stop, name = el->enum_name; ptr < end;
|
for (ptr = key->start, end = key->stop, name = el->enum_name; ptr < end;
|
||||||
ptr++, name++)
|
ptr++, name++)
|
||||||
{
|
{
|
||||||
if (*ptr != *name)
|
if (*ptr != *name)
|
||||||
{
|
{
|
||||||
|
@ -775,10 +775,9 @@ static struct OCTET_STRING__xer_escape_table_s
|
|||||||
char *string;
|
char *string;
|
||||||
int size;
|
int size;
|
||||||
} OCTET_STRING__xer_escape_table[] = {
|
} OCTET_STRING__xer_escape_table[] = {
|
||||||
#define OSXET(s) \
|
#define OSXET(s) \
|
||||||
{ \
|
{ \
|
||||||
s, sizeof(s) - 1 \
|
s, sizeof(s) - 1}
|
||||||
}
|
|
||||||
OSXET("\074\156\165\154\057\076"), /* <nul/> */
|
OSXET("\074\156\165\154\057\076"), /* <nul/> */
|
||||||
OSXET("\074\163\157\150\057\076"), /* <soh/> */
|
OSXET("\074\163\157\150\057\076"), /* <soh/> */
|
||||||
OSXET("\074\163\164\170\057\076"), /* <stx/> */
|
OSXET("\074\163\164\170\057\076"), /* <stx/> */
|
||||||
|
@ -45,7 +45,7 @@ ssize_t ber_fetch_length(int _is_constructed, const void *bufptr, size_t size,
|
|||||||
|
|
||||||
oct &= 0x7F; /* Leave only the 7 LS bits */
|
oct &= 0x7F; /* Leave only the 7 LS bits */
|
||||||
for (len = 0, buf++, skipped = 1; oct && (++skipped <= size);
|
for (len = 0, buf++, skipped = 1; oct && (++skipped <= size);
|
||||||
buf++, oct--)
|
buf++, oct--)
|
||||||
{
|
{
|
||||||
len = (len << 8) | *buf;
|
len = (len << 8) | *buf;
|
||||||
if (len < 0 || (len >> ((8 * sizeof(len)) - 8) && oct > 1))
|
if (len < 0 || (len >> ((8 * sizeof(len)) - 8) && oct > 1))
|
||||||
|
@ -34,7 +34,7 @@ ssize_t ber_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r)
|
|||||||
* The MSB is 0 if it is the last octet of the tag.
|
* The MSB is 0 if it is the last octet of the tag.
|
||||||
*/
|
*/
|
||||||
for (val = 0, ptr = ((const char *)ptr) + 1, skipped = 2; skipped <= size;
|
for (val = 0, ptr = ((const char *)ptr) + 1, skipped = 2; skipped <= size;
|
||||||
ptr = ((const char *)ptr) + 1, skipped++)
|
ptr = ((const char *)ptr) + 1, skipped++)
|
||||||
{
|
{
|
||||||
unsigned int oct = *(const uint8_t *)ptr;
|
unsigned int oct = *(const uint8_t *)ptr;
|
||||||
if (oct & 0x80)
|
if (oct & 0x80)
|
||||||
|
@ -216,7 +216,7 @@ asn_dec_rval_t SEQUENCE_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
|
|||||||
* step = (<member_number> * 2 + <microphase>).
|
* step = (<member_number> * 2 + <microphase>).
|
||||||
*/
|
*/
|
||||||
for (edx = (ctx->step >> 1); edx < td->elements_count;
|
for (edx = (ctx->step >> 1); edx < td->elements_count;
|
||||||
edx++, ctx->step = (ctx->step & ~1) + 2)
|
edx++, ctx->step = (ctx->step & ~1) + 2)
|
||||||
{
|
{
|
||||||
void *memb_ptr; /* Pointer to the member */
|
void *memb_ptr; /* Pointer to the member */
|
||||||
void **memb_ptr2; /* Pointer to that pointer */
|
void **memb_ptr2; /* Pointer to that pointer */
|
||||||
@ -1518,7 +1518,7 @@ asn_dec_rval_t SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx,
|
|||||||
|
|
||||||
/* Fill DEFAULT members in extensions */
|
/* Fill DEFAULT members in extensions */
|
||||||
for (edx = specs->roms_count; edx < specs->roms_count + specs->aoms_count;
|
for (edx = specs->roms_count; edx < specs->roms_count + specs->aoms_count;
|
||||||
edx++)
|
edx++)
|
||||||
{
|
{
|
||||||
asn_TYPE_member_t *elm = &td->elements[edx];
|
asn_TYPE_member_t *elm = &td->elements[edx];
|
||||||
void **memb_ptr2; /* Pointer to member pointer */
|
void **memb_ptr2; /* Pointer to member pointer */
|
||||||
@ -1700,7 +1700,7 @@ asn_enc_rval_t SEQUENCE_encode_uper(asn_TYPE_descriptor_t *td,
|
|||||||
td->elements_count, specs->ext_before);
|
td->elements_count, specs->ext_before);
|
||||||
for (edx = 0; edx < ((specs->ext_after < 0) ? td->elements_count
|
for (edx = 0; edx < ((specs->ext_after < 0) ? td->elements_count
|
||||||
: specs->ext_before - 1);
|
: specs->ext_before - 1);
|
||||||
edx++)
|
edx++)
|
||||||
{
|
{
|
||||||
asn_TYPE_member_t *elm = &td->elements[edx];
|
asn_TYPE_member_t *elm = &td->elements[edx];
|
||||||
void *memb_ptr; /* Pointer to the member */
|
void *memb_ptr; /* Pointer to the member */
|
||||||
|
@ -248,7 +248,7 @@ ssize_t pxml_parse(int *stateContext, const void *xmlbuf, size_t size,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
} /* switch(*ptr) */
|
} /* switch(*ptr) */
|
||||||
} /* for() */
|
} /* for() */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Flush the partially processed chunk, state permitting.
|
* Flush the partially processed chunk, state permitting.
|
||||||
|
Loading…
Reference in New Issue
Block a user