diff --git a/src/xpdev/link_list.c b/src/xpdev/link_list.c index ea89bb8bd1ffd52036948976dc470159f10a4c8c..1c4dc7dd044d3ff87dbcda55a1baf31603a8937e 100644 --- a/src/xpdev/link_list.c +++ b/src/xpdev/link_list.c @@ -327,6 +327,12 @@ str_list_t listSubStringList(const list_node_t* node, long max) return(str_list); } +void* listFreeStringList(str_list_t list) +{ + strListFree(&list); + return(list); +} + DLLEXPORT list_node_t* DLLCALL listFirstNode(const link_list_t* list) { if(list==NULL) diff --git a/src/xpdev/link_list.h b/src/xpdev/link_list.h index 9c69c201667d1ca77b955e9d4b964f9ac3b9a827..529471ce62460975ede21be02fe703885692b7e9 100644 --- a/src/xpdev/link_list.h +++ b/src/xpdev/link_list.h @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2005 Rob Swindell - http://www.synchro.net/copyright.html * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public License * @@ -117,6 +117,9 @@ str_list_t listStringList(const link_list_t*); /* Return an allocated string list (which must be freed), subset of strings in linked list */ str_list_t listSubStringList(const list_node_t*, long max); +/* Free a string list returned from either of the above functions */ +void* listFreeStringList(str_list_t); + /* Extract subset (up to max number of nodes) in linked list (src_node) and place into dest_list */ /* dest_list == NULL, then allocate a return a new linked list */ DLLEXPORT link_list_t* DLLCALL listExtract(link_list_t* dest_list, const list_node_t* src_node, long max);