libowfat/stralloc/stralloc_append.c
leitner 5eb1cdf888 cleanups in stralloc and buffer:
int -> long for sizes
    char -> unsigned char for strings
2004-11-25 21:29:35 +00:00

14 lines
316 B
C

#include "stralloc.h"
/* stralloc_append adds one byte in[0] to the end of the string stored
* in sa. It is the same as stralloc_catb(&sa,in,1). */
int stralloc_append(stralloc *sa,const unsigned char *in) {
if (stralloc_readyplus(sa,1)) {
sa->s[sa->len]=*in;
++sa->len;
return 1;
}
return 0;
}