Go to the documentation of this file.
2 #define _TEXT2INT_H_ "$Id: text2int.h 463 2020-07-24 17:42:01Z geoff $"
17 #include <netinet/in.h>
47 #define __BIG_ENDIAN0 43210
48 #define __BYTE_ORDER0 99990
49 #define __BYTE_ORDER_APPEND2(x,y) x ## y
50 #define __BYTE_ORDER_APPEND1(x,y) __BYTE_ORDER_APPEND2(x,y)
51 #define _BE_PATTERN __BYTE_ORDER_APPEND1(__BIG_ENDIAN,0)
52 #define _HB_PATTERN __BYTE_ORDER_APPEND1(__BYTE_ORDER,0)
54 #define __PERMIT_UNALIGNED_READS 1
56 #define _ENABLE_TABLE_PREFETCH_ 0
63 #pragma GCC diagnostic push
64 #pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
79 inline uint_fast32_t
text2uint32(const
char *textString, uint_fast8_t text_len)
85 enum { baseOffset =
'0' * 10 *
sizeof(uint32_t) };
87 #if _ENABLE_TABLE_PREFETCH_ == 1
101 const unsigned char *text = (
const unsigned char *) textString;
102 uint_fast32_t result = 0;
135 inline int_fast32_t
text2int32(const
char *textString, uint_fast8_t text_len)
138 bool isNegative =
false;
142 char c = textString[i];
168 while (i < text_len);
172 return (
static_cast<int_fast32_t
>(
val));
174 return (0 -
static_cast<int_fast32_t
>(
val));
182 inline uint64_t
text2uint64(const
char *textString, uint_fast8_t text_len)
187 enum { baseOffset =
'0' * 20 *
sizeof(uint64_t) };
188 #if _ENABLE_TABLE_PREFETCH_ == 1
207 const unsigned char *text = (
const unsigned char *) textString;
265 inline int64_t
text2int64(const
char *textString, uint_fast8_t text_len)
268 bool isNegative =
false;
272 char c = textString[i];
287 while (i < text_len);
291 return (
static_cast<int64_t
>(
val));
293 return (0 -
static_cast<int64_t
>(
val));
302 const unsigned char *bytes =
reinterpret_cast<const unsigned char *
>(byteData);
305 #if (__PERMIT_UNALIGNED_READS == 1) && defined(__GNUC__)
306 const uint16_t *u16p =
reinterpret_cast<const uint16_t *
>(bytes);
307 #if _HB_PATTERN == _BE_PATTERN
310 result = __builtin_bswap16(*u16p);
312 #else // unaligned reads not permitted or not gcc
313 result = bytes[0] * 0x100 + bytes[1];
323 const unsigned char *bytes =
reinterpret_cast<const unsigned char *
>(byteData);
325 #if (__PERMIT_UNALIGNED_READS == 1) && defined(__GNUC__)
326 const uint32_t *u32p =
reinterpret_cast<const uint32_t *
>(bytes);
327 #if _HB_PATTERN == _BE_PATTERN
330 result = __builtin_bswap32(*u32p);
332 #else // unaligned reads not permitted or not gcc
333 result = bytes[0] *
static_cast<uint32_t
>(0x1000000) +
334 bytes[1] *
static_cast<uint32_t
>(0x10000) +
335 bytes[2] *
static_cast<uint32_t
>(0x100) +
346 const unsigned char *bytes =
reinterpret_cast<const unsigned char *
>(byteData);
348 #if (__PERMIT_UNALIGNED_READS == 1) && defined(__GNUC__)
349 const uint64_t *u64p =
reinterpret_cast<const uint64_t *
>(bytes);
350 #if _HB_PATTERN == _BE_PATTERN
353 result = __builtin_bswap64(*u64p);
355 #else // unaligned reads not permitted or not gcc
356 result = bytes[0] *
static_cast<uint64_t
>(0x100000000000000) +
357 bytes[1] *
static_cast<uint64_t
>(0x1000000000000) +
358 bytes[2] *
static_cast<uint64_t
>(0x10000000000) +
359 bytes[3] *
static_cast<uint64_t
>(0x100000000) +
360 bytes[4] *
static_cast<uint64_t
>(0x1000000) +
361 bytes[5] *
static_cast<uint64_t
>(0x10000) +
362 bytes[6] *
static_cast<uint64_t
>(0x100) +
384 #if _HB_PATTERN == _BE_PATTERN
404 return (((arg & 0xff) << 8) | ((arg >> 8) & 0xff));
409 return (((arg & 0xff) << 24) |
410 (((arg >> 8) & 0xff) << 16) |
411 (((arg >> 16) & 0xff) << 8) |
412 ((arg >> 24) & 0xff));
417 return (((arg & 0xff) << 56) |
418 (((arg >> 8) & 0xff) << 48) |
419 (((arg >> 16) & 0xff) << 40) |
420 (((arg >> 24) & 0xff) << 32) |
421 (((arg >> 32) & 0xff) << 24) |
422 (((arg >> 40) & 0xff) << 16) |
423 (((arg >> 48) & 0xff) << 8) |
424 ((arg >> 56) & 0xff));
450 extern char *
uint_to_ascii(uint32_t workBfr[], uint_fast8_t bfrLen,
451 uint64_t value, uint_fast8_t *retStrLen =
nullptr)
NONNULL_RETURN;
458 extern
char *
int_to_ascii(uint32_t workBfr[], uint_fast8_t bfrLen,
467 #define CONVERT_UINT_TO_TEXT(varName, sourceVal) uint32_t _workBfr_ ## varName [6]; char *varName = uint_to_ascii(_workBfr_ ## varName, sizeof(_workBfr_ ## varName), sourceVal)
476 #define CONVERT_INT_TO_TEXT(varName, sourceVal) uint32_t _workBfr_ ## varName [6]; char *varName = int_to_ascii(_workBfr_ ## varName, sizeof(_workBfr_ ## varName), sourceVal);
498 uint64_t value, uint_fast8_t fieldWidth,
char fillChar =
' ')
NONNULL_RETURN;
520 int64_t value, uint_fast8_t decimals, uint_fast8_t *retStrLen =
nullptr,
566 const
char *str, uint_fast8_t *resultPrecision =
nullptr,
570 uint_fast8_t *resultPrecision, uint_fast8_t len,
571 int_fast8_t desiredPrecision)
575 if (resultPrecision !=
nullptr) {
576 *resultPrecision =
static_cast<uint_fast8_t
>(result.
precision);
578 return (result.
value);
618 double value, uint_fast8_t *retStrLen =
nullptr,
619 int_fast8_t outputPrecision = -2,
632 if ((
val & 0xe0) == 0xc0) {
635 if ((
val & 0xf0) == 0xe0) {
638 if ((
val & 0xf8) == 0xf0) {
641 if ((
val & 0xfc) == 0xf8) {
655 const char *ptr = (
const char *)
s;
659 #pragma GCC diagnostic pop
680 return (powerOf10Constant < EXPONENT - 1 > () * 10);
685 template <>
inline CONSTEXPR uint64_t powerOf10Constant<0>()
687 return (
static_cast<uint64_t
>(1));
691 #pragma GCC diagnostic push
692 #pragma GCC diagnostic ignored "-Wmissing-attributes"
716 return ((
s[LEN - 1] != PADDING_CHAR) ? LEN : right_padded_strlen < LEN - 1 > (
s, PADDING_CHAR));
747 template <u
int_fast8_t FIELD_LEN>
inline uint64_t
textField2uint(
const char *field)
749 return ( ((field[0] -
'0') * powerOf10Constant<FIELD_LEN - 1>()) +
750 textField2uint<FIELD_LEN - 1>(field + 1) );
756 template<>
inline uint64_t textField2uint<1>(
const char *field)
758 return (field[0] -
'0');
762 template<>
inline uint64_t textField2uint<0>(
const char *field)
784 return ((field[0] ==
'-') ?
785 (0 -
static_cast<int64_t
>(textField2uint<FIELD_LEN - 1>(field + 1))) :
786 ((field[0] ==
'+') ?
static_cast<int64_t
>(textField2uint<FIELD_LEN - 1>(field + 1)) :
787 ((field[0] ==
' ') ? textField2int<FIELD_LEN - 1>(field + 1) :
788 static_cast<int64_t
>(textField2uint<FIELD_LEN>(field))) ));
793 template<>
inline int64_t textField2int<0>(
const char *field)
812 inline int64_t fastTextField2int(const
char *field, uint_fast8_t len)
819 return (textField2int<20>(field));
821 return (textField2int<19>(field));
823 return (textField2int<18>(field));
825 return (textField2int<17>(field));
827 return (textField2int<16>(field));
829 return (textField2int<15>(field));
831 return (textField2int<14>(field));
833 return (textField2int<13>(field));
835 return (textField2int<12>(field));
837 return (textField2int<11>(field));
839 return (textField2int<10>(field));
841 return (textField2int<9>(field));
843 return (textField2int<8>(field));
845 return (textField2int<7>(field));
847 return (textField2int<6>(field));
849 return (textField2int<5>(field));
851 return (textField2int<4>(field));
853 return (textField2int<3>(field));
855 return (textField2int<2>(field));
857 return (textField2int<1>(field));
864 #pragma GCC diagnostic pop
878 return ((((v >= 0) ? v : -v) >= minPrecision) ? v : 0);
892 return ((v >= minPrecision) ? v : 0);
CHAR chProtocol
Definition: sockspx.c:216
#define safe_strcpy(d, s, l)
Safe strcpy() routine that will not copy more than l bytes and always ensures that a null is present ...
Definition: compiler_hints.h:696
#define REC_BYTES
Definition: test_malloc.c:143
#define MAX_CALL_DEPTH
Definition: test_malloc.c:69
int_fast32_t text2int32(const char *textString, uint_fast8_t text_len) NONNULL_PARAMETERS(1) OME_ALWAYS_OPTIMIZE("-O3")
Convert a sequence of text characters into a 32-bit signed integer as quickly as possible....
Definition: text2int.h:135
#define MAX_RANGES
Definition: test_malloc.c:97
#define REC_ALLOC_FILENAME
Definition: test_malloc.c:149
uint_fast32_t right_padded_strlen(const char *s, const char PADDING_CHAR=' ') NONNULL_PARAMETERS(1) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
Templated convenience routine to return the length of a possibly padded string. The assumption is tha...
Definition: text2int.h:714
Ïúíþ ð Ø ˜ ˜ __text __TEXT € __apple_names __DWARF __apple_objc __DWARF __apple_namespac__DWARF H X __apple_types __DWARF l
Definition: tmp3.o.cpp:1
SOCKET sock
Definition: sockspx.c:203
void __stdcall Usage(CHAR *pszProgramName)
Definition: sockspx.c:1001
const char s[]
Definition: t.cpp:4
int newCallLine[MAX_CALL_DEPTH]
Definition: test_malloc.c:72
int main(int argc, char *argv[])
Definition: testIf.cpp:37
#define unlockMEM()
Definition: test_malloc.c:9
#define stdout
Definition: tmp.o.cpp:3117
#define REC_LENGTH
Definition: test_malloc.c:142
#define BLOCK_ALIGNMENT
Definition: test_malloc.c:68
void dump_malloc_blocks(int age, int resetDumpTime)
Definition: test_malloc.c:199
int pamConvFunc(int numMess, const struct pam_message *msg[], struct pam_response **pam_resp, void *appData)
Definition: t.c:10
const char byteAsLowercaseHexadecimal[256][3]
Table of uppercase hexadecimal characters for each byte value.
Definition: text2int.cpp:38
char * uint_to_ascii_right_justified(uint32_t resultBfr[], uint_fast8_t bfrLen, uint64_t value, uint_fast8_t fieldLen, char fillChar)
Convert a binary integer into right-justified ASCII decimal text and pad on the left with a specified...
Definition: text2int.cpp:2718
char * realloc(char *block, unsigned int size)
Definition: test_malloc.c:618
struct Aligned4Chars::@4 lastThreeDigits
int main(int argc, const char *argv[])
Definition: t.cpp:46
#define stderr
Definition: tmp.o.cpp:3115
char * calloc(unsigned int nelem, unsigned int elsize)
Definition: test_malloc.c:687
void arrayTest()
Definition: test.cpp:122
Fundamental ANY type for FARGOS/VISTA Object Management Environment.
Definition: OMEbaseType.h:250
INT __stdcall ReceiveDatagarm(SOCKET s, CHAR *pchBuffer, SOCKADDR_IPX *psa, INT *pcb)
Definition: sockspx.c:835
void setTest()
Definition: test.cpp:92
const uint64_t powersOf10_64bit[16]
Table of powers-of-10 constants as 64-bit unsigned integers.
Definition: text2int_tbl.h:46
Table of word-aligned 4-character groups representing 0000-9999.
Definition: text2int_tbl.h:708
const union Aligned4Chars numberAs4Digits[10000]
Definition: text2int.cpp:124
#define REC_TIME
Definition: test_malloc.c:145
char * newCallFile[MAX_CALL_DEPTH]
Definition: test_malloc.c:73
Reference-counted maintainer of a sparse array.
Definition: OMEarray.h:23
#define OME_ALWAYS_OPTIMIZE(level)
Mark a function to be compiled with a specific level of optimization.
Definition: compiler_hints.h:406
void __stdcall PrintIpxAddress(CHAR *lpsNetnum, CHAR *lpsNodenum)
Definition: sockspx.c:1046
#define REC_ALLOC_NEXT
Definition: test_malloc.c:146
BOOL fServer
Definition: sockspx.c:194
#define __GNUC__
Definition: tmp.o.cpp:2554
int64_t ascii_to_fixedpoint(const char *str, uint_fast8_t *resultPrecision=nullptr, uint_fast8_t len=0, int_fast8_t desiredPrecision=-2) NONNULL_PARAMETERS(1) OME_ALWAYS_INLINE
Convert ASCII decimal text string to fixed point representation.
Definition: text2int.h:569
void _stdcall FillIpxAddress(SOCKADDR_IPX *psa, LPSTR lpsAddress, LPSTR lpsEndpoint)
Definition: sockspx.c:696
BOOL fEnumerate
Definition: sockspx.c:197
BOOL fStarted
Definition: sockspx.c:200
STREAMTYPE & outputOnStream(STREAMTYPE &outputStream, int_fast16_t indent=0, uint8_t includeTypePrefix=OME_DEFAULT_COMPLEX_OUTPUT_MODE) const
Output an OMEarray to an output stream.
Definition: OMEarray.h:275
#define NONNULL_PARAMETERS(...)
Mark parameters to a function as not permitting null pointers.
Definition: compiler_hints.h:335
#define REC_ALLOC_PREV
Definition: test_malloc.c:147
OME_DLL_EXPORT int OMEgetInterfaces(OMEtype &result)
Definition: OMEifList.cpp:290
#define POOL_SIZE
Definition: test_malloc.c:83
void __stdcall EnumerateAdapters(void)
Definition: sockspx.c:292
uint32_t n4to_uint32(const void *byteData) NONNULL_PARAMETERS(1) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
Convert a network byte order 4-byte integer into a native unsigned 32-bit value.
Definition: text2int.h:321
#define OME_PREFETCH(addr, rw, locality)
Macro to request prefetch.
Definition: compiler_hints.h:362
const double reciprocalPowersOf10[16]
Table of reciprocal powers-of-10 divisors.
Definition: text2int_tbl.h:75
int_fast8_t precision
Definition: text2int.h:529
Return value structure for representing fixed-point values with variable precision.
Definition: text2int.h:527
char * fixedpoint_to_ascii(char *resultBfr, uint_fast8_t bfrLen, int64_t value, uint_fast8_t precision, uint_fast8_t *retStrLen, int_fast8_t outputPrecision)
Format a fixed-point value with indicated decimal places.
Definition: text2int.cpp:2734
INT __stdcall SendData(SOCKET s, CHAR *pchBuffer)
Definition: sockspx.c:747
#define INVALID_SOCKET
Definition: io_processor.hpp:55
void trap_bad_assert()
Definition: test_malloc.c:254
const char srcID[]
Definition: catSym.c:17
CONSTEXPR uint32_t const_uint32_ton4(const uint32_t arg) OME_ALWAYS_INLINE OME_PURE_FUNCTION OME_ALWAYS_OPTIMIZE("-O3")
Equivalent of htonl(), but evaluated at compile time.
Definition: text2int.h:391
INT __stdcall ReceiveData(SOCKET s, CHAR *pchBuffer)
Definition: sockspx.c:776
void __stdcall PrintError(CHAR *lpszRoutine, CHAR *lpszCallName, DWORD dwError)
Definition: sockspx.c:1025
#define REC_SIGNATURE
Definition: test_malloc.c:150
Implements an ordered list of OMEtype elements.
Definition: OMEset.h:64
void __stdcall CreateSocket(void)
Definition: sockspx.c:632
CONSTEXPR uint64_t const_uint64_ton8(const uint64_t arg) OME_ALWAYS_INLINE OME_PURE_FUNCTION OME_ALWAYS_OPTIMIZE("-O3")
Equivalent of htonll(), but evaluated at compile time.
Definition: text2int.h:396
#define CACHE_LINE_LENGTH
Definition for target system's cache line length.
Definition: compiler_hints.h:576
CONSTEXPR double cleanedNumericValue(double v, double maxResolution) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
Return value clipped to 0 if not above a threshold of precision.
Definition: text2int.h:875
uint64_t n8to_uint64(const void *byteData) NONNULL_PARAMETERS(1) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
Convert a network byte order 8-byte integer into a native unsigned 64-bit value.
Definition: text2int.h:344
#define WORDS_IN_RECORD
Definition: test_malloc.c:153
CONSTEXPR uint16_t const_uint16_ton2(const uint16_t arg) OME_ALWAYS_INLINE OME_PURE_FUNCTION OME_ALWAYS_OPTIMIZE("-O3")
Equivalent of htons(), but evaluated at compile time.
Definition: text2int.h:386
void mallocStopPoint()
Definition: test_malloc.c:249
INT __stdcall SendDatagram(SOCKET s, CHAR *pchBuffer, SOCKADDR_IPX *psa)
Definition: sockspx.c:805
SOCKET newsock
Definition: sockspx.c:204
#define OME_EXPECT_TRUE(expr)
Annotation macro for conditional expression expected to be true.
Definition: compiler_hints.h:541
const char numberAsTwoDigits[100][3]
Table of 2-character strings representing 00-99.
Definition: text2int.cpp:20
uint_fast32_t right_padded_strlen< 0 >(const char *s, const char PADDING_CHAR) NONNULL_PARAMETERS(1)
specialization to stop recursion at length 0
Definition: text2int.h:721
uint_fast32_t text2uint32(const char *textString, uint_fast8_t text_len) NONNULL_PARAMETERS(1) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
Convert a sequence of text characters into an unsigned integer as quickly as possible....
Definition: text2int.h:79
BOOL __stdcall CtrlCHandler(DWORD dwEvent)
Definition: sockspx.c:274
Extreme-performance text/number conversion routines.
#define NULL
Definition: tmp.o.cpp:327
#define MAX_DATA_LEN
Definition: sockspx.c:83
void __stdcall DoClient(void)
Definition: sockspx.c:489
uint_fast8_t bytesInUTFcharacter(const char val) OME_PURE_FUNCTION OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
Return number of bytes required to represent UTF-encoded character as indicated by value of leading b...
Definition: text2int.h:627
char * float_to_ascii(char *resultBfr, uint_fast8_t bfrLen, double value, uint_fast8_t *retStrLen, int_fast8_t outputPrecision, bool roundValue)
Format a double-precision value with indicated decimal places.
Definition: text2int.cpp:2808
OME fundamental type implementation.
void arrayBaseTest()
Definition: test.cpp:6
char * int_to_ascii(uint32_t resultBfr[], uint_fast8_t bfrLen, int64_t value, uint_fast8_t *retStrLen)
Identical to uint_to_ascii(), except that negative values are accepted.
Definition: text2int.cpp:2699
void __stdcall DoStartup(void)
Definition: sockspx.c:607
CHAR * pszServerEndpoint
Definition: sockspx.c:213
#define REC_ALLOC_LINENUM
Definition: test_malloc.c:148
const char srcID[] OME_USED
Definition: tick_time.cpp:24
main()
Definition: test.cpp:160
void __stdcall AtoH(CHAR *szDest, CHAR *szSource, INT iCount)
Definition: sockspx.c:1075
void stringTest()
Definition: test.cpp:77
#define REC_NEXT
Definition: test_malloc.c:144
double text2double(const char *str, uint_fast8_t len)
Convert ASCII decimal text string to a double.
Definition: text2int.cpp:2955
#define OME_CONST_FUNCTION
Mark as an idempotent function that only accesses arguments – no global data.
Definition: compiler_hints.h:390
STREAMTYPE & operator<<(STREAMTYPE &os, const VariableFixedPointValue arg)
Definition: text2int.h:895
int64_t value
Definition: text2int.h:528
@ OME_SET
Definition: OMEmanifests.h:89
OME constants and typedefs.
Internal tables used for extreme performance text/number conversion routines.
const uint32_t text2int_table[256][10]
Convert ASCII digit into corresponding 32-bit value.
Definition: text2int_tbl.h:95
Compiler-specific macros to provide performance-related hints.
#define OME_EXPECT_FALSE(expr)
Annotation macro for conditional expression expected to be false.
Definition: compiler_hints.h:540
void __stdcall DoServer(void)
Definition: sockspx.c:377
BOOL __stdcall CheckProtocol(CHAR chProtocol)
Definition: sockspx.c:985
#define OME_ALWAYS_INLINE
Tell the compiler to alway inline a function, regardless of optimization level.
Definition: compiler_hints.h:364
char digits[4]
Definition: text2int_tbl.h:709
CONSTEXPR uint64_t powerOf10Constant() OME_CONST_FUNCTION OME_ALWAYS_INLINE
Generate compile-time constant for integral power of 10.
Definition: text2int.h:678
UCHAR __stdcall BtoH(CHAR ch)
Definition: sockspx.c:1093
CONSTEXPR double cleanedPositiveNumericValue(double v, double maxResolution) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
Return value clipped to 0 if not above a threshold of precision.
Definition: text2int.h:890
char * malloc(unsigned int bytes)
Definition: test_malloc.c:441
void __stdcall CheckParameters(INT argc, CHAR **argv)
Definition: sockspx.c:894
void __cdecl main(INT argc, CHAR **argv)
Definition: sockspx.c:219
int64_t textField2int(const char *field)
Templated ASCII-to-integer conversion routine that converts fixed-length fields.
Definition: text2int.h:782
void __stdcall DoCleanup(void)
Definition: sockspx.c:868
int trace_malloc
Definition: test_malloc.c:66
CHAR * pszServerAddress
Definition: sockspx.c:207
Implements sparse array of OMEtype elements.
Definition: OMEarray.h:75
int main(int argc, const char *argv[])
Definition: testint.c:7
uint32_t val
Definition: text2int_tbl.h:710
const class OMEtype & READ_ONLY_OMEtype
A convenience typedef for performing read-only access to sparse and associative arrays....
Definition: OMEtype.h:58
const char byteAsUppercaseHexadecimal[256][3]
Table of uppercase hexadecimal characters for each byte value.
Definition: text2int.cpp:78
const uint64_t text2int64_table[256][20]
Convert ASCII digit into corresponding 64-bit value.
Definition: text2int_tbl.h:384
void free(char *block)
Definition: test_malloc.c:553
void assocTest()
Definition: test.cpp:139
void __stdcall BindSocket(SOCKADDR_IPX *psa, LPSTR lpsAddress, LPSTR lpsEndpoint)
Definition: sockspx.c:654
char * uint_to_ascii(uint32_t resultBfr[], uint_fast8_t bfrLen, uint64_t value, uint_fast8_t *retStrLen)
Quickly convert a binary integer into ASCII decimal text.
Definition: text2int.cpp:2628
Storage record for large-sized elements on 32-bit hardware.
Definition: OMEbaseType.h:28
@ OME_ARRAY
Definition: OMEmanifests.h:86
VariableFixedPointValue fast_ascii_to_fixedpoint(const char *str, uint_fast8_t len, int_fast8_t desiredPrecision)
Convert ASCII decimal text string to fixed point representation.
Definition: text2int.cpp:2888
uint32_t n2to_uint32(const void *byteData) NONNULL_PARAMETERS(1) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
Convert a network byte order 2-byte integer into a native unsigned 32-bit value.
Definition: text2int.h:300
int64_t text2int64(const char *textString, uint_fast8_t text_len) NONNULL_PARAMETERS(1) OME_ALWAYS_OPTIMIZE("-O3")
Convert a sequence of text characters into a 64-bit signed integer as quickly as possible....
Definition: text2int.h:265
int newCallSP
Definition: test_malloc.c:71
#define lockMEM()
Definition: test_malloc.c:8
char * crypt(const char *, const char *)
struct Aligned4Chars::@3 lastTwoDigits
#define CONSTEXPR
Generates constexpr if the compiler supports it.
Definition: compiler_hints.h:432
char NONNULL_RETURN
Definition: compiler_hints.h:745
void set_malloc_dump_time(unsigned long t, int blockSizeLimit)
Definition: test_malloc.c:266
uint64_t text2uint64(const char *textString, uint_fast8_t text_len) NONNULL_PARAMETERS(1) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
Convert a sequence of text characters into a 64-bit unsigned integer as quickly as possible.
Definition: text2int.h:182
@ OME_ASSOC
Definition: OMEmanifests.h:87
uint64_t textField2uint(const char *field)
Templated ASCII-to-integer conversion routine that very quickly converts fixed-length fields of posit...
Definition: text2int.h:747
#define OME_PURE_FUNCTION
Mark as an idempotent function that can access global variables.
Definition: compiler_hints.h:388
const double floatingPowersOf10[10]
Table of powers-of-10 constants as floating-point values.
Definition: text2int_tbl.h:61
CHAR * pszLocalAddress
Definition: sockspx.c:210
uint_fast8_t bytesInUTFchar(const void *s) NONNULL_PARAMETERS(1) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3")
Return number of bytes required to represent UTF-encoded character pointed to by argument.
Definition: text2int.h:653