Harlequin RIP SDK
C Standard Definitions

Modules

 Harlequin standard "assert" and "trace" macros
 
 Harlequin standard atomic operations.
 
 Harlequin standard bit and byte operations
 
 Harlequin standard memory set, copy, move, and compare functions
 
 Harlequin SIMD (Single Instruction Multiple Data) operations
 
 Standard integer and Bool types
 
 Harlequin standard hash functions
 
 Platform-dependent defines.
 
 Harlequin standard Red-Black binary trees
 General red-black binary tree routines.
 
 Harlequin standard Robin Hood hash map
 Generic Robin Hood hash map.
 

Files

file  hq32x2.h
 Compatibility support for 64-bit integer types.
 
file  hqexcept.h
 Harlequin standard code for handling exceptions and signals.
 
file  hqstr.h
 Harlequin C-String utilities for zero-terminated strings.
 
file  hqtypes.h
 Harlequin C language standard types.
 
file  osprotos.h
 Define prototypes for "standard" functions.
 
file  proto.h
 Harlequin Generic Prototype Definitions.
 
file  std.h
 Standard types and definitions for use in all C/C++ products.
 

Macros

#define min(a, b)   __min((a),(b))
 Minimum of two numbers. More...
 
#define max(a, b)   __max((a),(b))
 Maximum of two numbers. More...
 
#define NUM_ARRAY_ITEMS(_array_)    ( sizeof( _array_ ) / sizeof( (_array_)[ 0 ] ) )
 
#define STRING_AND_LENGTH(s1_)   STRING_AND_LENGTH2(s1_)
 
#define CSTRING_AND_LENGTH(s1_)   CSTRING_AND_LENGTH2(s1_)
 
#define CSTRING_LENGTH(s1_)   CSTRING_LENGTH2(s1_)
 

Detailed Description

These definitions provide a common set of sized integral types, and platform abstraction macros.

Macro Definition Documentation

◆ CSTRING_AND_LENGTH

#define CSTRING_AND_LENGTH (   s1_)    CSTRING_AND_LENGTH2(s1_)

Macro expansion from literal string to char pointer string and length, separated by commas. Two-level expansion is used to allow #defined strings.

◆ CSTRING_LENGTH

#define CSTRING_LENGTH (   s1_)    CSTRING_LENGTH2(s1_)

Macro expansion from literal string to length of the string, excluding the zero terminator. Two-level expansion is used to allow #defined strings.

◆ max

#define max (   a,
 
)    __max((a),(b))

Maximum of two numbers.

The definition of max() may macro expand the parameters more than once.

◆ min

#define min (   a,
 
)    __min((a),(b))

Minimum of two numbers.

EMPTY_STATEMENT should be used when no statement is required (for example in a for loop whose conditions are sufficient to search for and find an item), to prevent compiler warnings.

The definition of min() may macro expand the parameters more than once.

◆ NUM_ARRAY_ITEMS

#define NUM_ARRAY_ITEMS (   _array_)     ( sizeof( _array_ ) / sizeof( (_array_)[ 0 ] ) )

Return the number of items in an initialised array. This can be used in initialisers.

◆ STRING_AND_LENGTH

#define STRING_AND_LENGTH (   s1_)    STRING_AND_LENGTH2(s1_)

Macro expansion from literal string to uint8 pointer string and length, separated by commas. Two-level expansion is used to allow #defined strings.