Payout
A thin wrapper around the SSP protocol from ITL
Main Page
Data Structures
Files
File List
Globals
StringBuffer.h
1
/*
2
* Taken from: https://sites.google.com/site/rickcreamer/Home/cc/c-implementation-of-stringbuffer-functionality
3
*/
4
5
#ifndef _STRINGBUFFER_H_
6
#define _STRINGBUFFER_H_
7
8
struct
StringBuffer
;
/* Forward declaration of StringBuffer symbol for typedef line */
9
typedef
struct
StringBuffer
SB
;
/* Forward typedef declaration so can use SB in struct definition */
10
11
struct
StringBuffer
{
12
size_t
count;
/* Number of strings appended */
13
size_t
capacity;
/* Length of ptrList */
14
char
**ptrList;
/* Array of char * pointers added w/ append() */
15
void (*append) (
SB
*sb,
char
*s );
/* The append() function pointer */
16
char
* (*toString) (
SB
*sb );
/* The toString() function pointer */
17
void (*dispose) (
SB
**sb );
/* The dispose() function pointer */
18
};
19
20
/* Only quasi-public function - remainder wrapped in StringBuffer struct members */
21
SB
*getStringBuffer();
22
23
#endif
StringBuffer
Definition:
StringBuffer.h:11
Generated by
1.8.11