+/Femto
toy text editor
git clone https://git.julia.blue/+/Femto
973c5b9
master
1#include "../inc/abuf.h" 2 3void abappend (abuf * ab ,const char * s ,int len ) { 4char * new = realloc (ab -> b ,ab -> len + len ); 5if (new == NULL ) {return ; } 6memcpy (& new [ab -> len ],s ,len ); 7ab -> len += len ; 8ab -> b = new ; 9} 10 11void abfree (abuf * ab ) {free (ab -> b ); }