17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#include <math.h>
#include <assert.h>
/*
* The following constants are used by GetFormatSpec to indicate various
* special conditions in the parsing of a format specifier.
*/
#define BINARY_ALL -1 /* Use all elements in the argument. */
#define BINARY_NOCOUNT -2 /* No count was specified in format. */
/*
* The following flags may be OR'ed together and returned by GetFormatSpec
*/
#define BINARY_SIGNED 0 /* Field to be read as signed data */
#define BINARY_UNSIGNED 1 /* Field to be read as unsigned data */
/*
* The following defines the maximum number of different (integer) numbers
* placed in the object cache by 'binary scan' before it bails out and
* switches back to Plan A (creating a new object for each value.)
* Theoretically, it would be possible to keep the cache about for the values
* that are already in it, but that makes the code slower in practice when
|
|
|
|
>
|
|
|
>
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#include <math.h>
#include <assert.h>
/*
* The following constants are used by GetFormatSpec to indicate various
* special conditions in the parsing of a format specifier.
*/
enum GetFormatSpecSpecialCounts {
BINARY_ALL = -1, /* Use all elements in the argument. */
BINARY_NOCOUNT = -2 /* No count was specified in format. */
};
/*
* The following flags may be OR'ed together and returned by GetFormatSpec
*/
enum GetFormatSpecFlags {
BINARY_SIGNED = 0, /* Field to be read as signed data */
BINARY_UNSIGNED = 1 /* Field to be read as unsigned data */
};
/*
* The following defines the maximum number of different (integer) numbers
* placed in the object cache by 'binary scan' before it bails out and
* switches back to Plan A (creating a new object for each value.)
* Theoretically, it would be possible to keep the cache about for the values
* that are already in it, but that makes the code slower in practice when
|