From 6cc43c5f0d56fbe59e4e718c18c482c76a7f61d0 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 9 Nov 2005 21:47:31 +0000 Subject: [PATCH] added pop method to osrf_list makefile builds mod_xmlbuilder code git-svn-id: svn://svn.open-ils.org/ILS/trunk@1986 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/Makefile | 12 ++++++------ OpenSRF/src/libstack/osrf_list.c | 6 ++++++ OpenSRF/src/libstack/osrf_list.h | 9 +++++++++ OpenSRF/src/utils/Makefile | 1 - 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/Open-ILS/src/Makefile b/Open-ILS/src/Makefile index 029afe618d..b723fb1902 100644 --- a/Open-ILS/src/Makefile +++ b/Open-ILS/src/Makefile @@ -6,11 +6,11 @@ export CFLAGS = -pipe -g -Wall -O2 -fPIC -I$(LIBXML2_HEADERS) -I$(APACHE2_HEAD export INCDIR = "$(INCLUDEDIR)/openils/" -all: mod_xmltools mod_ils_rest_gateway c_apps +all: mod_xmlbuilder mod_ils_rest_gateway c_apps install: perl-install web-install string-templates-install storage-bootstrap cgi-bootstrap xsl-install c_apps-install -web-install: webcore-install autojs-install mod_xmltools-install mod_ils_rest_gateway-install +web-install: webcore-install autojs-install mod_xmlbuilder-install mod_ils_rest_gateway-install # ----------------------------------------------------------------------------------- @@ -25,13 +25,13 @@ mod_ils_rest_gateway-install: make -C apachemods libfieldmapper-install make -C apachemods mod_ils_rest_gateway-install -mod_xmltools: +mod_xmlbuilder: @echo $@ - make -C apachemods mod_xmltools.so + make -C apachemods mod_xmlbuilder.so -mod_xmltools-install: +mod_xmlbuilder-install: @echo $@ - make -C apachemods mod_xmltools-install + make -C apachemods mod_xmlbuilder-install webcore-install: @echo $@ diff --git a/OpenSRF/src/libstack/osrf_list.c b/OpenSRF/src/libstack/osrf_list.c index a3d673ec59..7277720077 100644 --- a/OpenSRF/src/libstack/osrf_list.c +++ b/OpenSRF/src/libstack/osrf_list.c @@ -128,6 +128,12 @@ unsigned long osrfListGetCount( osrfList* list ) { } +void* osrfListPop( osrfList* list ) { + if(!list) return NULL; + return osrfListRemove( list, list->size - 1 ); +} + + osrfListIterator* osrfNewListIterator( osrfList* list ) { if(!list) return NULL; osrfListIterator* itr = safe_malloc(sizeof(osrfListIterator)); diff --git a/OpenSRF/src/libstack/osrf_list.h b/OpenSRF/src/libstack/osrf_list.h index 104407b1e4..cea3a945dc 100644 --- a/OpenSRF/src/libstack/osrf_list.h +++ b/OpenSRF/src/libstack/osrf_list.h @@ -64,6 +64,14 @@ osrfList* osrfNewList(); */ int osrfListPush( osrfList* list, void* item ); + +/** + * Removes the last item in the list + * See osrfListRemove for details on how the removed item is handled + * @return The item, unless 'freeItem' exists, then returns NULL + */ +void* osrfListPop( osrfList* list ); + /** Puts the given item into the list at the specified position. If there is already an item at the given position and the list has it's @@ -112,6 +120,7 @@ int osrfListFind( osrfList* list, void* addr ); void __osrfListSetSize( osrfList* list ); + /** @return The number of non-null items in the list */ diff --git a/OpenSRF/src/utils/Makefile b/OpenSRF/src/utils/Makefile index 7a80440bd4..d5ad508501 100644 --- a/OpenSRF/src/utils/Makefile +++ b/OpenSRF/src/utils/Makefile @@ -15,7 +15,6 @@ sha.o: sha.c sha.h string_array.o: string_array.c string_array.h - clean: /bin/rm -f *.o -- 2.43.2