Harlequin C language standard types. More...
Macros | |
#define | NULL ((void*)0) |
Definition of NULL pointer. More... | |
#define | INDEX_FROM_FLOAT(r, x) ((int32)((float)((r) - 1)*(x) + 0.5f)) |
#define | INDEX_FROM_DOUBLE(r, x) ((int32)((double)((r) - 1)*(x) + 0.5)) |
#define | MAXUINT64 UINT64_MAX |
Maximum value of 64-bit unsigned integer. | |
#define | MAXINT64 INT64_MAX |
Maximum value of 64-bit signed integer. | |
#define | MININT64 INT64_MIN |
Minimum value of 64-bit signed integer. | |
#define | HQN_INT64 int64_t |
Assume that 64-bit integers are supported from C99 onwards. | |
#define | MAXUINT8 ((uint8)255) |
Maximum value of 8-bit unsigned integer. | |
#define | MAXINT8 ((int8)127) |
Maximum value of 8-bit signed integer. | |
#define | MININT8 ((int8)-128) |
Minimum value of 8-bit signed integer. | |
#define | MAXUINT16 ((uint16)65535) |
Maximum value of 16-bit unsigned integer. | |
#define | MAXINT16 ((int16)32767) |
Maximum value of 16-bit signed integer. | |
#define | MININT16 ((int16)-32768) |
Minimum value of 16-bit signed integer. | |
#define | MAXUINT32 0xffffffffU |
Maximum value of 32-bit unsigned integer. | |
#define | MAXINT32 ((int32)0x7fffffff) |
Maximum value of 32-bit signed integer. | |
#define | MININT32 ((int32)0x80000000) |
Minimum value of 32-bit signed integer. | |
#define | MAXINT MAXINT32 |
Maximum value of signed integer. More... | |
#define | MININT MININT32 |
Minimum value of signed integer. More... | |
#define | MAXUINT MAXUINT32 |
Minimum value of unsigned integer. More... | |
#define | SIZE_MAX MAXUINT64 |
Maximum value of size_t. | |
#define | UINTPTR_MAX MAXUINT64 |
Maximum value of uintptr_t. | |
#define | TRUE 1 |
HqBool boolean true value. More... | |
#define | FALSE 0 |
HqBool boolean false value. More... | |
#define | BOOL_IS_VALID(bool_) ((bool_) == TRUE || (bool_) == FALSE) |
Validate boolean values. More... | |
#define | HQNIDENT_MAX MAXINT32 |
Maximum value of an HqnIdent before wrap-around. | |
#define | HQNIDENT_MIN MININT32 |
Minimum value of an HqnIdent after wrap-around. | |
Typedefs | |
typedef int8_t | int8 |
8-bit signed integer | |
typedef uint8_t | uint8 |
8-bit unsigned integer | |
typedef int16_t | int16 |
16-bit signed integer | |
typedef uint16_t | uint16 |
16-bit unsigned integer | |
typedef int32_t | int32 |
32-bit signed integer | |
typedef uint32_t | uint32 |
32-bit unsigned integer | |
typedef int64_t | int64 |
64-bit signed integer | |
typedef uint64_t | uint64 |
64-bit unsigned integer | |
typedef int | HqBool |
Harlequin standard boolean type. More... | |
typedef intptr_t | HqnFileDescriptor |
The type of a file descriptor on a device. More... | |
typedef int32 | HqnIdent |
HqnIdent identifiers. More... | |
typedef int32 | HqnResult |
HqnResult return types. More... | |
Enumerations | |
enum | { HQN_RESULT_SUCCESS = 0 } |
Harlequin C language standard types.
This file contains definitions of the Harlequin RIP C Language standard types. These include standard integer and boolean types, the NULL pointer, file descriptors, generic integer identifiers for handles, and type generic result type.
Asserting type conversion macros are also defined.
Copyright (C) 2023 Global Graphics Software Ltd. All rights reserved. This source code contains the confidential and trade secret information of Global Graphics Software Ltd. It may not be used, copied or distributed for any reason except as set forth in the applicable Global Graphics license agreement.
#define INDEX_FROM_DOUBLE | ( | r, | |
x | |||
) | ((int32)((double)((r) - 1)*(x) + 0.5)) |
Conversion of double in the range [0,1] to an array index in the range 0,r-1. This macro rounds to the nearest integer.
#define INDEX_FROM_FLOAT | ( | r, | |
x | |||
) | ((int32)((float)((r) - 1)*(x) + 0.5f)) |
Conversion of float in the range [0,1] to an array index in the range 0,r-1. This macro rounds to the nearest integer.
#define NULL ((void*)0) |
Definition of NULL pointer.
NULL is defined differently for C++ and C. C restricts the use to pointer values by casting to (void *). C++ allows implicit conversion.
Define NULL as (void*)0 for C to limit usage to pointers