28#define PRGNAME PACKAGE "/" VERSION
98 int l = strlen(node->data);
99 memcpy(p, node->data, l *
sizeof(
char));
113 Node *node, *nextNode;
114 for (node =
firstNode; node; node = nextNode) {
115 nextNode = node->
next;
133 bits = (
unsigned char*)malloc(
numBytes *
sizeof(
unsigned char));
145 for (
int i = 0; i <
numBits; i++)
155 return bits[i / 8] & (1 << (i % 8));
165 while (8 * i >= newNumBytes)
167 void *vp = realloc(
bits, newNumBytes *
sizeof(
unsigned char));
169 perror(
"realloc failed");
172 bits = (
unsigned char*)vp;
178 bits[i / 8] |= (1 << (i % 8));
180 bits[i / 8] &= ~(1 << (i % 8));
void intoStringBuffer(misc::StringBuffer *sb)
void set(int i, bool val)
int bytesForBits(int bits)
A class for fast concatenation of a large number of strings.
void clear()
Remove all strings appended to the string buffer.
void append(const char *str)
Append a NUL-terminated string to the buffer, with copying.
void appendNoCopy(char *str)
Append a NUL-terminated string to the buffer, without copying.
const char * getChars()
Return a NUL-terminated strings containing all appended strings.