rpm  4.5
stringbuf.h
Go to the documentation of this file.
1 #ifndef _STRINGBUF_H_
2 #define _STRINGBUF_H_
3 
10 typedef /*@abstract@*/ struct StringBufRec *StringBuf;
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
18 /*@only@*/ StringBuf newStringBuf(void)
19  /*@*/;
20 
23 /*@null@*/ StringBuf freeStringBuf( /*@only@*/ /*@null@*/ StringBuf sb)
24  /*@modifies sb @*/;
25 
28 /*@unused@*/
29 void truncStringBuf(StringBuf sb)
30  /*@modifies sb @*/;
31 
34 /*@observer@*/ char * getStringBuf(StringBuf sb)
35  /*@*/;
36 
39 void stripTrailingBlanksStringBuf(StringBuf sb)
40  /*@modifies sb @*/;
41 
44 #define appendStringBuf(sb, s) appendStringBufAux(sb, s, 0)
45 
48 #define appendLineStringBuf(sb, s) appendStringBufAux(sb, s, 1)
49 
52 void appendStringBufAux(StringBuf sb, const char * s, int nl)
53  /*@modifies sb @*/;
54 
55 #ifdef __cplusplus
56 }
57 #endif
58 
59 #endif /* _STRINGBUF_H_ */