ucspi-ssl  0.99e
TLS encryption for IPv6 communication
stralloc.h
Go to the documentation of this file.
1 /* Public domain. */
2 
3 #ifndef STRALLOC_H
4 #define STRALLOC_H
5 
6 #include "gen_alloc.h"
7 
8 GEN_ALLOC_typedef(stralloc,char,s,len,a)
9 
10 extern int stralloc_ready(stralloc *,unsigned int);
11 extern int stralloc_readyplus(stralloc *,unsigned int);
12 extern int stralloc_copy(stralloc *,const stralloc *);
13 extern int stralloc_cat(stralloc *,const stralloc *);
14 extern int stralloc_copys(stralloc *,const char *);
15 extern int stralloc_cats(stralloc *,const char *);
16 extern int stralloc_copyb(stralloc *,const char *,unsigned int);
17 extern int stralloc_catb(stralloc *,const char *,unsigned int);
18 extern int stralloc_append(stralloc *,const char *); /* beware: this takes a pointer to 1 char */
19 extern int stralloc_starts(stralloc *,const char *);
20 
21 #define stralloc_0(sa) stralloc_append(sa,"")
22 
23 extern int stralloc_catulong0(stralloc *,unsigned long,unsigned int);
24 extern int stralloc_catlong0(stralloc *,long,unsigned int);
25 
26 #define stralloc_catlong(sa,l) (stralloc_catlong0((sa),(l),0))
27 #define stralloc_catuint0(sa,i,n) (stralloc_catulong0((sa),(i),(n)))
28 #define stralloc_catint0(sa,i,n) (stralloc_catlong0((sa),(i),(n)))
29 #define stralloc_catint(sa,i) (stralloc_catlong0((sa),(i),0))
30 
31 #endif
int stralloc_copy(stralloc *, const stralloc *)
Definition: stralloc_copy.c:4
int stralloc_cats(stralloc *, const char *)
Definition: stralloc_cats.c:7
int stralloc_starts(stralloc *, const char *)
GEN_ALLOC_typedef(stralloc, char, s, len, a) extern int stralloc_ready(stralloc *
int stralloc_append(stralloc *, const char *)
int stralloc_readyplus(stralloc *, unsigned int)
int stralloc_catulong0(stralloc *, unsigned long, unsigned int)
int stralloc_copyb(stralloc *, const char *, unsigned int)
Definition: stralloc_opyb.c:6
int stralloc_cat(stralloc *, const stralloc *)
Definition: stralloc_cat.c:6
int stralloc_catb(stralloc *, const char *, unsigned int)
Definition: stralloc_catb.c:6
int stralloc_copys(stralloc *, const char *)
Definition: stralloc_opys.c:7
int stralloc_catlong0(stralloc *, long, unsigned int)