forked from luanhailiang/mudos
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuffer.h
More file actions
32 lines (26 loc) · 728 Bytes
/
buffer.h
File metadata and controls
32 lines (26 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* buffer.h by John Garnett, 1993/11/07 */
/* It is usually better to include "lpc_incl.h" instead of including this
directly */
#ifndef _BUFFER_H_
#define _BUFFER_H_
#ifndef NO_BUFFER_TYPE
typedef struct buffer_s {
/* first two elements of struct must be 'ref' followed by 'size' */
unsigned short ref;
unsigned int size;
#ifdef DEBUG
unsigned short extra_ref;
#endif
unsigned char item[1];
} buffer_t;
/*
* buffer.c
*/
extern buffer_t null_buf;
INLINE buffer_t *null_buffer PROT((void));
INLINE void free_buffer PROT((buffer_t *));
buffer_t *allocate_buffer PROT((int));
int write_buffer PROT((buffer_t *, int, char *, int));
char *read_buffer PROT((buffer_t *, int, int, int *));
#endif
#endif