Lines Matching refs:s
57 [[maybe_unused]] static void ExpandableStringInitialize(struct ExpandableString* s) { in ExpandableStringInitialize() argument
58 memset(s, 0, sizeof(*s)); in ExpandableStringInitialize()
61 [[maybe_unused]] static void ExpandableStringRelease(struct ExpandableString* s) { in ExpandableStringRelease() argument
62 free(s->data); in ExpandableStringRelease()
63 memset(s, 0, sizeof(*s)); in ExpandableStringRelease()
66 [[maybe_unused]] static bool ExpandableStringAppend(struct ExpandableString* s, const char* text) { in ExpandableStringAppend() argument
68 size_t requiredSize = s->dataSize + textSize + 1; in ExpandableStringAppend()
69 char* data = (char*)realloc(s->data, requiredSize); in ExpandableStringAppend()
73 s->data = data; in ExpandableStringAppend()
74 memcpy(s->data + s->dataSize, text, textSize + 1); in ExpandableStringAppend()
75 s->dataSize += textSize; in ExpandableStringAppend()
79 [[maybe_unused]] static bool ExpandableStringAssign(struct ExpandableString* s, const char* text) { in ExpandableStringAssign() argument
80 ExpandableStringRelease(s); in ExpandableStringAssign()
81 return ExpandableStringAppend(s, text); in ExpandableStringAssign()