aboutsummaryrefslogtreecommitdiff
path: root/src/PtrList.h
diff options
context:
space:
mode:
authorswhite <swhite@61ea717e-8e0c-4c3c-b38e-e9c67f54f1f1>2004-04-19 13:10:13 +0000
committerswhite <swhite@61ea717e-8e0c-4c3c-b38e-e9c67f54f1f1>2004-04-19 13:10:13 +0000
commitb55bae51688e9d97c6848b0a5e073dcc8851723f (patch)
tree2845f8afcfde0bccdba07b3f7ec0f1021705ad2a /src/PtrList.h
parent2cb1df63dcc158674fd15cae88e0939e683aec6f (diff)
Addresses Cactus bug 923
Made the download list to be organized by variable, then by data output type, then by slice. To facilitate list manipulation, added temporarily a list module 'PtrList', which perhaps may prove of more general use in the future. Pursuant to Cactus bug 907 Added parameter HTTPExtra::viewport_refresh_seconds to send Refresh header to web browser. Made ViewPort window to respond to viewport_refresh_seconds parameter General HTML improvements...checked with Amaya and lynx. Re-organized CSS info in HTTPD web pages. Got rid of httpuMimeType code which didn't do anything. git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPDExtra/trunk@54 61ea717e-8e0c-4c3c-b38e-e9c67f54f1f1
Diffstat (limited to 'src/PtrList.h')
-rw-r--r--src/PtrList.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/PtrList.h b/src/PtrList.h
new file mode 100644
index 0000000..60f3faf
--- /dev/null
+++ b/src/PtrList.h
@@ -0,0 +1,53 @@
+#ifndef __PTRLIST_HH__
+#define __PTRLIST_HH__
+
+#include <stddef.h>
+
+typedef enum { PLFALSE, PLTRUE } PLBOOL;
+
+typedef struct PtrList_tag PtrList;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+ /* Creation and deletion */
+PtrList * List_New( void );
+PtrList * List_NewWithPageSize( size_t pagesize );
+PtrList * List_MakeCopy( const PtrList * other );
+void List_Delete( PtrList * );
+ /* Counts the items */
+size_t List_NumberOfItems( const PtrList * );
+ /* Item accessors */
+void * List_Item( const PtrList *, size_t index );
+void List_SetItem( PtrList *, size_t index, void * ptr );
+ /* List manipulation */
+void List_Append( PtrList *, void * item );
+void List_Insert( PtrList *, size_t index, void * item );
+void * List_RemoveItem( PtrList *, size_t index );
+void List_SwapItems( PtrList *, size_t a_index, size_t b_index );
+ /* Actions on pointer of particular value */
+void List_Remove( PtrList *, void * item );
+PLBOOL List_GetIndexOf( const PtrList *, const void * item,
+ size_t * index );
+ /* Remove all items from list */
+void List_Empty( PtrList * list );
+ /* Copy another list */
+void List_CopyList( PtrList * list, const PtrList * other );
+ /* Special freeing utility */
+void List_FreeItemsInListAndEmpty( PtrList * );
+ /* Sort and Search */
+typedef int (*ListSortComparison)( const void *, const void * );
+
+void List_SortAccordingTo( PtrList *, ListSortComparison );
+
+typedef PLBOOL (*ListCondition)( const void * );
+
+void * List_FirstItemSuchThat( const PtrList *, ListCondition );
+PLBOOL List_FindFirstIndexSuchThat( const PtrList *,
+ ListCondition condition, size_t * index );
+#ifdef __cplusplus
+}
+#endif
+
+#endif