summaryrefslogtreecommitdiff
path: root/string-list.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2014-11-24 21:22:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-11-25 00:04:12 (GMT)
commitfc66505c53f1a471e63b6122b2d629daca6e705b (patch)
treeff9bd3ca23d6be2ef5e18c3d13b46c76a862df5f /string-list.h
parent652e759330da379a8e09e03bbf99e03c10c228cc (diff)
downloadgit-fc66505c53f1a471e63b6122b2d629daca6e705b.zip
git-fc66505c53f1a471e63b6122b2d629daca6e705b.tar.gz
git-fc66505c53f1a471e63b6122b2d629daca6e705b.tar.bz2
string_list: document string_list_(insert,lookup)
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'string-list.h')
-rw-r--r--string-list.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/string-list.h b/string-list.h
index 494eb5d..40ffe0c 100644
--- a/string-list.h
+++ b/string-list.h
@@ -55,9 +55,19 @@ void string_list_remove_empty_items(struct string_list *list, int free_util);
int string_list_has_string(const struct string_list *list, const char *string);
int string_list_find_insert_index(const struct string_list *list, const char *string,
int negative_existing_index);
+/*
+ * Inserts the given string into the sorted list.
+ * If the string already exists, the list is not altered.
+ * Returns the string_list_item, the string is part of.
+ */
struct string_list_item *string_list_insert(struct string_list *list, const char *string);
struct string_list_item *string_list_insert_at_index(struct string_list *list,
int insert_at, const char *string);
+
+/*
+ * Checks if the given string is part of a sorted list. If it is part of the list,
+ * return the coresponding string_list_item, NULL otherwise.
+ */
struct string_list_item *string_list_lookup(struct string_list *list, const char *string);
/*