organisation des des fichiers

This commit is contained in:
Arthur Barraux
2024-09-23 17:51:59 +02:00
parent ca215da58e
commit c613eb6978
20 changed files with 538 additions and 449 deletions
+13
View File
@@ -0,0 +1,13 @@
#include "../include/row_op.h"
void editorAppendRow(struct editorConfig *E, char *s, size_t len) {
int at;
E->row = realloc(E->row, sizeof(erow) * (E->numrows + 1));
at = E->numrows;
E->row[at].size = len;
E->row[at].chars = malloc(len + 1);
memcpy(E->row[at].chars, s, len);
E->row[at].chars[len] = '\0';
++E->numrows;
}