SingingCat
0
application
Toggle main menu visibility
Main Page
Modules
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
Files
File List
Globals
All
_
a
c
d
e
f
g
i
l
m
n
o
p
r
s
u
w
Functions
a
c
d
e
f
g
i
l
m
n
o
p
r
s
u
w
Variables
Typedefs
_
s
Enumerations
Enumerator
Macros
c
m
s
include
shifter.h
1
#ifndef SHIFTER_H
2
#define SHIFTER_H
3
#include <stdint.h>
4
// NOTE: this isn't really metrics specific but quite generic
5
6
typedef
struct
shifter
{
7
int
bufsize;
// max size of buffer
8
int
validbytes;
// valid bytes in buffer
9
int
error;
// if non-zero, an error occured
10
uint8_t * buf;
11
}
_shifter
;
12
13
// init a shifter for first use
14
void
shifter_init(
struct
shifter
*sh, uint8_t *buf,
int
bufsize);
15
void
shift_into_uint8(
struct
shifter
*sh, uint8_t b);
16
void
shift_into_uint32(
struct
shifter
*sh, uint32_t b);
17
void
shift_into_uint64(
struct
shifter
*sh, uint64_t b);
18
// return number of bytes shifted into buffer
19
int
shift_size(
struct
shifter
*sh);
20
// if non-zero an error occured on this shifter
21
int
shift_error(
struct
shifter
*sh);
22
#endif
shifter
Definition:
shifter.h:6
Generated on Tue May 28 2024 19:13:43 for SingingCat by
1.9.4