File: stralloc.h

package info (click to toggle)
safecat 1.13-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 624 kB
  • ctags: 243
  • sloc: ansic: 2,042; makefile: 334; sh: 270
file content (29 lines) | stat: -rw-r--r-- 854 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef STRALLOC_H
#define STRALLOC_H

#include "gen_alloc.h"

GEN_ALLOC_typedef(stralloc,char,s,len,a)

extern int stralloc_ready();
extern int stralloc_readyplus();
extern int stralloc_copy();
extern int stralloc_cat();
extern int stralloc_copys();
extern int stralloc_cats();
extern int stralloc_copyb();
extern int stralloc_catb();
extern int stralloc_append(); /* beware: this takes a pointer to 1 char */
extern int stralloc_starts();

#define stralloc_0(sa) stralloc_append(sa,"")

extern int stralloc_catulong0();
extern int stralloc_catlong0();

#define stralloc_catlong(sa,l) (stralloc_catlong0((sa),(l),0))
#define stralloc_catuint0(sa,i,n) (stralloc_catulong0((sa),(unsigned long) (i),(n)))
#define stralloc_catint0(sa,i,n) (stralloc_catlong0((sa),(long) (i),(n)))
#define stralloc_catint(sa,i) (stralloc_catlong0((sa),(long) (i),0))

#endif