From 560d424b6d7cd4205b062ad95f1b104bd4f8bcc3 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 17 Dec 2010 16:51:59 -0500 Subject: env: re-add support for auto-completion Currently, only basic completion is supported (no globs), but this is what we had previously. Signed-off-by: Mike Frysinger --- include/common.h | 1 + include/search.h | 7 +++++++ 2 files changed, 8 insertions(+) (limited to 'include') diff --git a/include/common.h b/include/common.h index 0d1c8724a9..d8c912d092 100644 --- a/include/common.h +++ b/include/common.h @@ -632,6 +632,7 @@ static inline IPaddr_t getenv_IPaddr (char *var) /* lib/qsort.c */ void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *)); +int strcmp_compar(const void *, const void *); /* lib/time.c */ void udelay (unsigned long); diff --git a/include/search.h b/include/search.h index 81ced7f48e..a7c1293770 100644 --- a/include/search.h +++ b/include/search.h @@ -74,6 +74,13 @@ extern void hdestroy_r(struct hsearch_data *__htab); extern int hsearch_r(ENTRY __item, ACTION __action, ENTRY ** __retval, struct hsearch_data *__htab); +/* + * Search for an entry matching `MATCH'. Otherwise, Same semantics + * as hsearch_r(). + */ +extern int hmatch_r(const char *__match, int __last_idx, ENTRY ** __retval, + struct hsearch_data *__htab); + /* Search and delete entry matching ITEM.key in internal hash table. */ extern int hdelete_r(const char *__key, struct hsearch_data *__htab); -- cgit