7 #if defined(__cplusplus)
12 Notes on format of format strings:
13 * whitespace is ignored
14 * each "group" consists of an optional count (defaults to 1),
15 an optional byte-order marker (defaults to H, "host-native"),
16 and a data-type specifier.
17 * when unpacking, each variable argument is a pointer to the
18 appropriate number of objects of the appropriate type.
19 * when packing, each variable argument is an object of the
20 appropriate type if the count is omitted, or a pointer to the
21 appropriate number of objects of the appropriate type if the
23 * the buffer supplied to pack/unpack must be of sufficient length
24 to hold all the data, or the behavior is unspecified.
25 * the file provided to the "f" versions of the functions must be
26 open in the appropriate mode, or the behavior is unspecified.
27 * the file supplied to funpackf must be of sufficient length to
28 hold all the data, or the behavior is unspecified.
29 * the behavior of all functions is unspecified if the format string
30 is incorrectly-formed.
33 x skipped byte; no corresponding argument
35 s two-byte two's-complement integer
36 i four-byte two's-complement integer
37 l eight-byte two's-complement integer
38 f four-byte IEEE754 float
39 d eight-byte IEEE754 double
41 Byte-order specifiers:
44 H host's native byte order
48 #if defined(BinIO_STDINT_HEADER)
49 #include BinIO_STDINT_HEADER
50 typedef float float32_t;
51 typedef double float64_t;
53 typedef unsigned char uint8_t;
54 typedef unsigned short uint16_t;
55 typedef unsigned long uint32_t;
57 typedef unsigned __int64 uint64_t;
59 typedef unsigned long long uint64_t;
61 typedef float float32_t;
62 typedef double float64_t;
76 extern void packf ( const char *format, ...);
77 extern void spackf (void *buffer, const char *format, ...);
78 extern void fpackf (FILE *file, const char *format, ...);
79 extern void vspackf (void *buffer, const char *format, va_list args);
80 extern void vfpackf (FILE *file, const char *format, va_list args);
82 extern void unpackf ( const char *format, ...);
83 extern void sunpackf (const void *buffer, const char *format, ...);
84 extern void funpackf (FILE *file, const char *format, ...);
85 extern void vsunpackf(const void *buffer, const char *format, va_list args);
86 extern void vfunpackf(FILE *file, const char *format, va_list args);
88 #if defined(__cplusplus)