You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
355 B
C

#include "array.h"
#include "byte.h"
void array_catb(array* to,const char* from,uint64 len) {
long l;
if (to->allocated<0) return;
if (to->initialized+len<to->initialized) {
fail:
array_fail(to);
return;
}
l=to->initialized;
if (!array_allocate(to,1,to->initialized+len))
goto fail;
byte_copy(to->p+l,to->initialized-l,from);
}