14#ifdef PRISM_EXCLUDE_PACK
31 PM_PACK_VARIANT_UNPACK
42 PM_PACK_STRING_SPACE_PADDED,
43 PM_PACK_STRING_NULL_PADDED,
44 PM_PACK_STRING_NULL_TERMINATED,
47 PM_PACK_STRING_HEX_HIGH,
48 PM_PACK_STRING_HEX_LOW,
51 PM_PACK_STRING_BASE64,
53 PM_PACK_STRING_POINTER,
69 PM_PACK_AGNOSTIC_ENDIAN,
70 PM_PACK_LITTLE_ENDIAN,
72 PM_PACK_NATIVE_ENDIAN,
81 PM_PACK_SIZE_LONG_LONG,
94 PM_PACK_LENGTH_RELATIVE,
100 PM_PACK_ENCODING_START,
101 PM_PACK_ENCODING_ASCII_8BIT,
102 PM_PACK_ENCODING_US_ASCII,
103 PM_PACK_ENCODING_UTF_8
109 PM_PACK_ERROR_UNSUPPORTED_DIRECTIVE,
110 PM_PACK_ERROR_UNKNOWN_DIRECTIVE,
111 PM_PACK_ERROR_LENGTH_TOO_BIG,
112 PM_PACK_ERROR_BANG_NOT_ALLOWED,
113 PM_PACK_ERROR_DOUBLE_ENDIAN
142 const char *format_end,
Macro definitions used throughout the prism library.
#define PRISM_EXPORTED_FUNCTION
By default, we compile with -fvisibility=hidden.
Definition defines.h:50
pm_pack_encoding
The type of encoding for a pack template string.
Definition pack.h:99
pm_pack_result
The result of parsing a pack template.
Definition pack.h:107
pm_pack_variant
The type of pack template we are parsing.
Definition pack.h:29
pm_pack_endian
The endianness of a pack directive.
Definition pack.h:68
pm_pack_signed
The signness of a pack directive.
Definition pack.h:61
pm_pack_size
The size of an integer pack directive.
Definition pack.h:77
PRISM_EXPORTED_FUNCTION size_t pm_size_to_native(pm_pack_size size)
Prism abstracts sizes away from the native system - this converts an abstract size to a native size.
Definition pack.c:484
pm_pack_length_type
The type of length of a pack directive.
Definition pack.h:91
pm_pack_version
The version of the pack template language that we are parsing.
Definition pack.h:24
PRISM_EXPORTED_FUNCTION pm_pack_result pm_pack_parse(pm_pack_variant variant, const char **format, const char *format_end, pm_pack_type *type, pm_pack_signed *signed_type, pm_pack_endian *endian, pm_pack_size *size, pm_pack_length_type *length_type, uint64_t *length, pm_pack_encoding *encoding)
Parse a single directive from a pack or unpack format string.
Definition pack.c:29
pm_pack_type
A directive within the pack template.
Definition pack.h:35