File: buffer.h

package info (click to toggle)
imapfilter 1%3A2.0.10-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 424 kB
  • ctags: 479
  • sloc: ansic: 4,048; sh: 218; makefile: 137
file content (23 lines) | stat: -rw-r--r-- 440 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef BUFFER_H
#define BUFFER_H


#include <stdio.h>


/* Temporary buffer. */
typedef struct buffer {
	char *data;		/* Text or binary data. */
	size_t len;		/* Length of text or binary data. */
	size_t size;		/* Maximum size of data. */
} buffer;


/*	buffer.c	*/
void buffer_init(buffer *buf, size_t n);
void buffer_free(buffer *buf);
void buffer_reset(buffer *buf);
void buffer_check(buffer *buf, size_t n);


#endif				/* BUFFER_H */