加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
buffer.h 728 Bytes
一键复制 编辑 原始数据 按行查看 历史
luanhailiang 提交于 2012-08-09 20:44 . My mudos
/* 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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化