File: stralloc.h

package info (click to toggle)
fastforward 1%3A0.51-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,060 kB
  • sloc: ansic: 8,033; makefile: 483; sh: 160
file content (21 lines) | stat: -rw-r--r-- 724 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef STRALLOC_H
#define STRALLOC_H

#include "gen_alloc.h"

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

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

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

#endif