organisation des des fichiers
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#include "../include/append_buffer.h"
|
||||
|
||||
void abAppend(struct abuf *ab, const char *s, int len) {
|
||||
char *new = realloc(ab->b, ab->len + len);
|
||||
|
||||
if (new == NULL) {
|
||||
return;
|
||||
}
|
||||
memcpy(&new[ab->len], s, len);
|
||||
ab->b = new;
|
||||
ab->len += len;
|
||||
}
|
||||
|
||||
void abFree(struct abuf *ab) { free(ab->b); }
|
||||
Reference in New Issue
Block a user