summaryrefslogtreecommitdiffstats
path: root/include/stringlist.h
Commit message (Collapse)AuthorAgeFilesLines
* stringlist: the string argument should be constJan Luebbe2014-12-041-2/+2
| | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* stringlist: string_list_contains can use a const stringJan Luebbe2014-11-201-1/+1
| | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* string_list: Add string_list_for_each_entry macroSascha Hauer2014-07-031-0/+3
| | | | | | To ease iterating over a string_list. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* stringlist: fix cpp macro in headerSteffen Trumtrar2013-01-091-3/+3
| | | | | | | | | | | Both include/string.h and include/stringlist.h define the c preprocessor macro __STRING_H. This leads to a compile time error, in case both files are (indirectly) included. Rename the macro to __STRINGLIST_H in stringlist.h. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* stringlist: implement string_list_add_asprintfSascha Hauer2012-04-301-0/+1
| | | | | | | Useful for allocating a string list entry on the fly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* stringlist: use seperately allocated stringSascha Hauer2012-04-301-2/+4
| | | | | | | | | | Allocate the string in string list seperately instead of embedding a zero length string into struct stringlist. Besides looking cleaner this allows us to implement a string_list_asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* stringlist-functions: add sorted insertAlexander Aring2011-12-211-0/+2
| | | | | | | | | Add sorted insert in stringlist functions. Also added function to checked if string is already in string list. Signed-off-by: Alexander Aring <a.aring@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* list: remove duplicated list.hSascha Hauer2009-11-031-1/+1
| | | | | | | | We accidently have two list implementations in the tree: include/list.h and include/linux/list.h. This patch moves the latter (newer one) to include/linux/list.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add stringlist function. They can be used to build a listSascha Hauer2008-03-111-0/+27
of strings. For now mainly useful to print the resulting list in columns which is used in tab completion and ls.