~ubuntu-branches/ubuntu/edgy/rpm/edgy

« back to all changes in this revision

Viewing changes to lib/stringbuf.h

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2002-01-22 20:56:57 UTC
  • Revision ID: james.westby@ubuntu.com-20020122205657-l74j50mr9z8ofcl5
Tags: upstream-4.0.3
ImportĀ upstreamĀ versionĀ 4.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _STRINGBUF_H_
 
2
#define _STRINGBUF_H_
 
3
 
 
4
/** \file lib/stringbuf.h
 
5
 *
 
6
 */
 
7
 
 
8
/**
 
9
 */
 
10
typedef /*@abstract@*/ struct StringBufRec *StringBuf;
 
11
 
 
12
#ifdef __cplusplus
 
13
extern "C" {
 
14
#endif
 
15
 
 
16
/**
 
17
 */
 
18
/*@only@*/ StringBuf newStringBuf(void)
 
19
        /*@*/;
 
20
 
 
21
/**
 
22
 */
 
23
/*@null@*/ StringBuf freeStringBuf( /*@only@*/ /*@null@*/ StringBuf sb)
 
24
        /*@modifies sb @*/;
 
25
 
 
26
/**
 
27
 */
 
28
/*@unused@*/
 
29
void truncStringBuf(StringBuf sb)
 
30
        /*@modifies sb @*/;
 
31
 
 
32
/**
 
33
 */
 
34
/*@observer@*/ char * getStringBuf(StringBuf sb)
 
35
        /*@*/;
 
36
 
 
37
/**
 
38
 */
 
39
void stripTrailingBlanksStringBuf(StringBuf sb)
 
40
        /*@modifies sb @*/;
 
41
 
 
42
/**
 
43
 */
 
44
#define appendStringBuf(sb, s)     appendStringBufAux(sb, s, 0)
 
45
 
 
46
/**
 
47
 */
 
48
#define appendLineStringBuf(sb, s) appendStringBufAux(sb, s, 1)
 
49
 
 
50
/**
 
51
 */
 
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_ */