Lines Matching refs:s
23 void ExpandableStringInitialize(struct ExpandableString *s) { in ExpandableStringInitialize() argument
24 memset(s, 0, sizeof(*s)); in ExpandableStringInitialize()
27 void ExpandableStringRelease(struct ExpandableString* s) { in ExpandableStringRelease() argument
28 free(s->data); in ExpandableStringRelease()
29 memset(s, 0, sizeof(*s)); in ExpandableStringRelease()
32 bool ExpandableStringAppend(struct ExpandableString* s, const char* text) { in ExpandableStringAppend() argument
34 size_t requiredSize = s->dataSize + textSize + 1; in ExpandableStringAppend()
35 char* data = (char*) realloc(s->data, requiredSize); in ExpandableStringAppend()
39 s->data = data; in ExpandableStringAppend()
40 memcpy(s->data + s->dataSize, text, textSize + 1); in ExpandableStringAppend()
41 s->dataSize += textSize; in ExpandableStringAppend()
45 bool ExpandableStringAssign(struct ExpandableString* s, const char* text) { in ExpandableStringAssign() argument
46 ExpandableStringRelease(s); in ExpandableStringAssign()
47 return ExpandableStringAppend(s, text); in ExpandableStringAssign()