]> jfr.im git - solanum.git/blob - librb/include/rb_rawbuf.h
Remove ancient portability code (#361)
[solanum.git] / librb / include / rb_rawbuf.h
1 /*
2 * ircd-ratbox: A slightly useful ircd.
3 * rawbuf.h: A header for rawbuf.c
4 *
5 * Copyright (C) 2007 Aaron Sethman <androsyn@ratbox.org>
6 * Copyright (C) 2007 ircd-ratbox development team
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
21 * USA
22 *
23 */
24
25 #ifndef RB_LIB_H
26 # error "Do not use rawbuf.h directly"
27 #endif
28
29 #ifndef INCLUDED_RAWBUF_H__
30 #define INCLUDED_RAWBUF_H__
31
32
33
34 typedef struct _rawbuf rawbuf_t;
35 typedef struct _rawbuf_head rawbuf_head_t;
36
37 void rb_init_rawbuffers(int heapsize);
38 void rb_free_rawbuffer(rawbuf_head_t *);
39 rawbuf_head_t *rb_new_rawbuffer(void);
40 int rb_rawbuf_get(rawbuf_head_t *, void *data, int len);
41 void rb_rawbuf_append(rawbuf_head_t *, void *data, int len);
42 int rb_rawbuf_flush(rawbuf_head_t *, rb_fde_t *F);
43 int rb_rawbuf_length(rawbuf_head_t * rb);
44
45 #endif