aboutsummaryrefslogtreecommitdiff
path: root/Documentation/technical
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/technical')
-rw-r--r--Documentation/technical/api-argv-array.txt8
-rw-r--r--Documentation/technical/api-strbuf.txt16
-rw-r--r--Documentation/technical/api-string-list.txt9
3 files changed, 32 insertions, 1 deletions
diff --git a/Documentation/technical/api-argv-array.txt b/Documentation/technical/api-argv-array.txt
index 1a797812f..a959517b2 100644
--- a/Documentation/technical/api-argv-array.txt
+++ b/Documentation/technical/api-argv-array.txt
@@ -53,3 +53,11 @@ Functions
`argv_array_clear`::
Free all memory associated with the array and return it to the
initial, empty state.
+
+`argv_array_detach`::
+ Detach the argv array from the `struct argv_array`, transfering
+ ownership of the allocated array and strings.
+
+`argv_array_free_detached`::
+ Free the memory allocated by a `struct argv_array` that was later
+ detached and is now no longer needed.
diff --git a/Documentation/technical/api-strbuf.txt b/Documentation/technical/api-strbuf.txt
index 95a8bf384..84686b5c6 100644
--- a/Documentation/technical/api-strbuf.txt
+++ b/Documentation/technical/api-strbuf.txt
@@ -279,6 +279,22 @@ same behaviour as well.
Strip whitespace from a buffer. The second parameter controls if
comments are considered contents to be removed or not.
+`strbuf_split_buf`::
+`strbuf_split_str`::
+`strbuf_split_max`::
+`strbuf_split`::
+
+ Split a string or strbuf into a list of strbufs at a specified
+ terminator character. The returned substrings include the
+ terminator characters. Some of these functions take a `max`
+ parameter, which, if positive, limits the output to that
+ number of substrings.
+
+`strbuf_list_free`::
+
+ Free a list of strbufs (for example, the return values of the
+ `strbuf_split()` functions).
+
`launch_editor`::
Launch the user preferred editor to edit a file and fill the buffer
diff --git a/Documentation/technical/api-string-list.txt b/Documentation/technical/api-string-list.txt
index 94d7a2bd9..7386bcab3 100644
--- a/Documentation/technical/api-string-list.txt
+++ b/Documentation/technical/api-string-list.txt
@@ -38,7 +38,8 @@ member (you need this if you add things later) and you should set the
`unsorted_string_list_delete_item`.
. Can remove items not matching a criterion from a sorted or unsorted
- list using `filter_string_list`.
+ list using `filter_string_list`, or remove empty strings using
+ `string_list_remove_empty_items`.
. Finally it should free the list using `string_list_clear`.
@@ -75,6 +76,12 @@ Functions
to be deleted. Preserve the order of the items that are
retained.
+`string_list_remove_empty_items`::
+
+ Remove any empty strings from the list. If free_util is true,
+ call free() on the util members of any items that have to be
+ deleted. Preserve the order of the items that are retained.
+
`string_list_longest_prefix`::
Return the longest string within a string_list that is a