Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not 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

  1. #include "array.h"
  2. #include "byte.h"
  3. void array_catb(array* to,const char* from,uint64 len) {
  4. long l;
  5. if (to->allocated<0) return;
  6. if (to->initialized+len<to->initialized) {
  7. fail:
  8. array_fail(to);
  9. return;
  10. }
  11. l=to->initialized;
  12. if (!array_allocate(to,1,to->initialized+len))
  13. goto fail;
  14. byte_copy(to->p+l,to->initialized-l,from);
  15. }