ucspi-ssl  0.99e
TLS encryption for IPv6 communication
stralloc_catb.c
Go to the documentation of this file.
1 /* Public domain. */
2 
3 #include "stralloc.h"
4 #include "byte.h"
5 
6 int stralloc_catb(stralloc *sa,const char *s,unsigned int n)
7 {
8  if (!sa->s) return stralloc_copyb(sa,s,n);
9  if (!stralloc_readyplus(sa,n + 1)) return 0;
10  byte_copy(sa->s + sa->len,n,s);
11  sa->len += n;
12  sa->s[sa->len] = 'Z'; /* ``offensive programming'' */
13  return 1;
14 }
void byte_copy(void *, unsigned int, const void *)
int stralloc_catb(stralloc *sa, const char *s, unsigned int n)
Definition: stralloc_catb.c:6
int stralloc_readyplus(stralloc *, unsigned int)
int stralloc_copyb(stralloc *, const char *, unsigned int)
Definition: stralloc_opyb.c:6