home *** CD-ROM | disk | FTP | other *** search
- /***( dllist.h )****************************************************************
- * *
- * Contains header info for generic doubly-linked list functions. *
- * *
- ********************************************************************************
- * *
- * Written: Dec 7, 1989 - SBF *
- * Updated: MMM DD, YYYY - XXX ( ) *
- * *
- *******************************************************************************/
-
- #define MAXNUMDLL 64 /* Maximum number of open lists */
-
- #define SEL_SINGLE 0 /* Single selection mode for dll_scroll() */
- #define SEL_MULTI 1 /* Multiple selection mode for dll_scroll() */
-
- #define ADD_SORT 0 /* Add entry in sorted order using compare function */
- #define ADD_NOSORT 1 /* Add entry with no sorting using compare function */
-
- # if defined (UNIX)
- typedef char generic; /* Generic pointer type */
- # else
- typedef void generic; /* Generic pointer type */
- # endif
-
- struct dll_entry /* Generic list structure */
- {
- struct dll_entry *dll_next; /* Pointer to next list entry */
- struct dll_entry *dll_prev; /* Pointer to previous list entry */
- generic *dll_ptr; /* Pointer to data */
- };
-
- struct dll_cb /* Control block structure to keep track of multiple lists */
- {
- struct dll_entry *dll_head; /* Pointer to head of list */
- struct dll_entry *dll_curr; /* Pointer to current list entry */
- PROTO (int (*dll_cmp), (generic *, generic *)); /* Ptr to comparison fn */
- int dll_size; /* Size of list data */
- };
-
- struct sel_entry
- {
- generic *sel_data;
- };
-
- PROTO (int dll_add, (int, generic *, int));
- PROTO (int dll_close, (int));
- PROTO (generic *dll_curr, (int));
- PROTO (int dll_del, (int));
- PROTO (generic *dll_find, (int, generic *));
- PROTO (struct dll_entry *dll_getpos, (int));
- PROTO (generic *dll_next, (int));
- PROTO (int dll_open, (int (*)(), int));
- PROTO (generic *dll_prev, (int));
- PROTO (int dll_rebuild, (int, int (*)()));
- PROTO (generic *dll_seek, (int, int, int));
- PROTO (int dll_setpos, (int, struct dll_entry *));
-
- PROTO (int dll_scroll, (int, int, int, int, int *, int, char *(*)(), int, int, int, int, int, ...));
- PROTO (int dll_scroll_close, (int *));
-
-