From 5d931adb70e952557ae433c034240ac182753264 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 18 Feb 2009 10:28:16 +0000 Subject: Removed the unused queue code and memfrob() definition svn-id: r38464 --- engines/sci/include/resource.h | 39 --------------------------------- engines/sci/scicore/tools.cpp | 49 ------------------------------------------ 2 files changed, 88 deletions(-) (limited to 'engines') diff --git a/engines/sci/include/resource.h b/engines/sci/include/resource.h index 10a29c7aa8..45a937fd50 100644 --- a/engines/sci/include/resource.h +++ b/engines/sci/include/resource.h @@ -147,45 +147,6 @@ putInt16(byte* dest, int src) { ** (int) src: value to write */ -/*-- queues --*/ - -typedef struct _sci_queue_node { - void *data; - int type; - struct _sci_queue_node *next; -} sci_queue_node_t; - -typedef struct { - sci_queue_node_t *start; /* Where things go in */ - sci_queue_node_t *end; /* Where they come out */ -} sci_queue_t; - -sci_queue_t * -sci_init_queue(sci_queue_t *queue); -/* Initializes an SCI queue -** Parameters: (sci_queue_t *) queue: Pointer to the queue to initialize -** Returns : (sci_queue_t *) queue -*/ - -sci_queue_t * -sci_add_to_queue(sci_queue_t *queue, void *data, int type); -/* Adds an entry to an initialized SCI queue -** Parameters: (sci_queue_t *) queue: The queue to add to -** (void *) data: The data to contain -** (int) type: Some metadata, e.g. size of the data block -** Returns : (sci_queue_t *) queue -** The meaning of the 'type' field may be determined individually. -*/ - -void * -sci_get_from_queue(sci_queue_t *queue, int *type); -/* Reads an entry from an SCI queue -** Parameters: (sci_queue_t *) queue: The queue to remove from -** (int *) type: A pointer to a variable to write the metadata -** into, or NULL to omit this step -** Returns : (void *) The data block contained, or NULL if none was inside -*/ - /* --- */ void diff --git a/engines/sci/scicore/tools.cpp b/engines/sci/scicore/tools.cpp index 86967ff225..98be73cf17 100644 --- a/engines/sci/scicore/tools.cpp +++ b/engines/sci/scicore/tools.cpp @@ -72,10 +72,6 @@ # include #endif -#ifdef HAVE_MEMFROB -void *memfrob(void *s, size_t n); -#endif - int script_debug_flag = 0; /* Defaulting to running mode */ int sci_debug_flags = 0; /* Special flags */ @@ -421,51 +417,6 @@ sci_get_homedir(void) { } -sci_queue_t * -sci_init_queue(sci_queue_t *queue) { - queue->start = queue->end = NULL; - return queue; -} - -sci_queue_t * -sci_add_to_queue(sci_queue_t *queue, void *data, int type) { - sci_queue_node_t *node = (sci_queue_node_t*)sci_malloc(sizeof(sci_queue_node_t)); - - node->next = NULL; - node->data = data; - node->type = type; - - if (queue->start) - queue->start->next = node; - - queue->start = node; - - if (!queue->end) - queue->end = node; - - return queue; -} - -void * -sci_get_from_queue(sci_queue_t *queue, int *type) { - sci_queue_node_t *node = queue->end; - if (node) { - void *retval = node->data; - if (type) - *type = node->type; - - queue->end = node->next; - - if (queue->end == NULL) /* Queue empty? */ - queue->start = NULL; - - free(node); - return retval; - } - return NULL; -} - - /*-- Yielding to the scheduler --*/ #ifdef HAVE_SCHED_YIELD -- cgit v1.2.3