-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbufferutil.h
More file actions
34 lines (28 loc) · 1.27 KB
/
bufferutil.h
File metadata and controls
34 lines (28 loc) · 1.27 KB
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
33
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* bufferutil.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: abaur <abaur@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/12/02 15:46:23 by abaur #+# #+# */
/* Updated: 2019/12/03 12:03:14 by abaur ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef BUFFERUTIL_H
# define BUFFERUTIL_H
# include <stdlib.h>
typedef struct s_buffer t_buffer;
struct s_buffer
{
size_t capacity;
void (*flushmethod)(char c);
char *content;
char *lcursor;
char *rcursor;
};
t_buffer *newbuffer(size_t capacity, char content);
int flushbuffer(t_buffer *buffer);
int buffaddl(t_buffer *buffer, char value);
int buffaddr(t_buffer *buffer, char value);
#endif