Michael Haggerty writes:
> OK, so the bottom line would be to have two versions of the function.
> One takes a (const char *) and *requires* strdup_strings to be set on
> its input list:
>
> int string_list_split(struct string_list *list, const char *string,
> int delim, int m
On 09/10/2012 07:47 AM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> ... Consider something like
>>
>> struct string_list *split_file_into_words(FILE *f)
>> {
>> char buf[1024];
>> struct string_list *list = new string list;
>> list->strdup_strings = 1;
>
Michael Haggerty writes:
> ... Consider something like
>
> struct string_list *split_file_into_words(FILE *f)
> {
> char buf[1024];
> struct string_list *list = new string list;
> list->strdup_strings = 1;
> while (not EOF) {
> read_line_into_b
On 09/09/2012 11:35 AM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> Split a string into a string_list on a separator character.
>>
>> This is similar to the strbuf_split_*() functions except that it works
>> with the more powerful string_list interface. If strdup_strings is
>> false, i
Michael Haggerty writes:
> Split a string into a string_list on a separator character.
>
> This is similar to the strbuf_split_*() functions except that it works
> with the more powerful string_list interface. If strdup_strings is
> false, it reuses the memory from the input string (thereby need
Split a string into a string_list on a separator character.
This is similar to the strbuf_split_*() functions except that it works
with the more powerful string_list interface. If strdup_strings is
false, it reuses the memory from the input string (thereby needing no
string memory allocations, th
6 matches
Mail list logo