Lines Matching refs:string

41 #include <string.h>
51 * called string-segments are used.
81 * string that can be stored, and for efficiency
83 * the average string that will be stored.
143 * Delete the list nodes that contained the string segments.
156 * Make a copy of a string in the specified string group, and return
160 * sg StringGroup * The group to store the string in.
161 * string const char * The string to be recorded.
165 * return char * The pointer to the copy of the string,
168 char *_sg_store_string(StringGroup *sg, const char *string, int remove_escapes)
170 char *copy; /* The recorded copy of string[] */
175 if(!sg || !string)
178 * Get memory for the string.
180 len = strlen(string);
184 * If needed, remove backslash escapes while copying the input string
185 * into the cache string.
190 const char *src = string; /* A pointer into the input string */
192 /* string. */
204 * If escapes have already been removed, copy the input string directly
208 strlcpy(copy, string, len + 1);
212 * Return a pointer to the copy of the string (or NULL if the allocation
219 * Allocate memory for a string of a given length.
222 * sg StringGroup * The group to store the string in.
223 * length int The required length of the string.
225 * return char * The pointer to the copy of the string,
230 StringSegment *node; /* A node of the list of string segments */
231 char *copy; /* The allocated string */
233 * If the string is longer than block_size, then we can't record it.
238 * See if there is room to record the string in one of the existing
239 * string segments. Do this by advancing the node pointer until we find
245 * If there wasn't room, allocate a new string segment.
258 * Attempt to allocate the string segment character array.
270 * Get memory for the string.
275 * Return a pointer to the string memory.
289 StringSegment *node; /* A node in the list of string segments */
291 * Mark all of the string segments as unoccupied.