blob: 7bc9d7618ce151e14bf0bcc301676de04f49e02b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#ifndef BUFFER_H
#define BUFFER_H
#include <sys/types.h>
struct buffer {
char *addr;
char *begin;
char *end;
int size;
};
void binit(struct buffer *b, size_t size);
void bfree(struct buffer *b);
int bread(struct buffer *b, int fd);
int bwrite(struct buffer *b, int fd);
int bcanfill(struct buffer *b);
int bhasdata(struct buffer *b);
#endif
|