lclint annotations.
[tools/librpm-tizen.git] / lib / stringbuf.h
1 #ifndef _STRINGBUF_H_
2 #define _STRINGBUF_H_
3
4 typedef /*@abstract@*/ struct StringBufRec *StringBuf;
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9
10 /*@only@*/ StringBuf newStringBuf(void);
11 void freeStringBuf( /*@only@*/ StringBuf sb);
12 void truncStringBuf(StringBuf sb);
13 /*@observer@*/ char *getStringBuf(StringBuf sb);
14 void stripTrailingBlanksStringBuf(StringBuf sb);
15
16 #define appendStringBuf(sb, s)     appendStringBufAux(sb, s, 0)
17 #define appendLineStringBuf(sb, s) appendStringBufAux(sb, s, 1)
18
19 void appendStringBufAux(StringBuf sb, const char *s, int nl);
20
21 #ifdef __cplusplus
22 }
23 #endif
24
25 #endif  /* _STRINGBUF_H_ */