mirror of
https://github.com/labwc/labwc.git
synced 2026-02-10 04:27:47 -05:00
include/: refactor header files
This commit is contained in:
parent
82dc192217
commit
53266a0d5a
8 changed files with 27 additions and 14 deletions
23
include/common/buf.h
Normal file
23
include/common/buf.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Very simple C buffer implementation
|
||||
*
|
||||
* Copyright Johan Malm 2020
|
||||
*/
|
||||
|
||||
#ifndef BUF_H
|
||||
#define BUF_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
struct buf {
|
||||
char *buf;
|
||||
int alloc;
|
||||
int len;
|
||||
};
|
||||
|
||||
void buf_init(struct buf *s);
|
||||
void buf_add(struct buf *s, const char *data);
|
||||
|
||||
#endif /* BUF_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue