[xiph-commits] r7192 - icecast/branches/icecast-singleq/src
karl at dactyl.lonelymoon.com
karl
Tue Jul 20 09:10:09 PDT 2004
Author: karl
Date: Tue Jul 20 09:10:09 2004
New Revision: 7192
Modified:
icecast/branches/icecast-singleq/src/refbuf.c
icecast/branches/icecast-singleq/src/refbuf.h
Log:
remove unused code and structures
Modified: icecast/branches/icecast-singleq/src/refbuf.c
===================================================================
--- icecast/branches/icecast-singleq/src/refbuf.c 2004-07-20 09:17:23 UTC (rev 7191)
+++ icecast/branches/icecast-singleq/src/refbuf.c 2004-07-20 16:10:06 UTC (rev 7192)
@@ -80,94 +80,3 @@
}
}
-void refbuf_queue_add(refbuf_queue_t **queue, refbuf_t *refbuf)
-{
- refbuf_queue_t *node;
- refbuf_queue_t *item = (refbuf_queue_t *)malloc(sizeof(refbuf_queue_t));
-
- item->refbuf = refbuf;
- item->next = NULL;
-
- if (*queue == NULL) {
- *queue = item;
- (*queue)->total_length = item->refbuf->len;
- } else {
- node = *queue;
- while (node->next) node = node->next;
- node->next = item;
- (*queue)->total_length += item->refbuf->len;
- }
-}
-
-refbuf_t *refbuf_queue_remove(refbuf_queue_t **queue)
-{
- refbuf_queue_t *item;
- refbuf_t *refbuf;
-
- if (*queue == NULL) return NULL;
-
- item = *queue;
- *queue = item->next;
- item->next = NULL;
-
- refbuf = item->refbuf;
- item->refbuf = NULL;
-
- if(*queue)
- (*queue)->total_length = item->total_length - refbuf->len;
-
- free(item);
-
-
- return refbuf;
-}
-refbuf_t * refbuf_queue_get(refbuf_queue_t **queue, int item)
-{
- refbuf_queue_t *node = *queue;
- int size = 0;
- while (node) {
- if (size == item) {
- return node->refbuf;
- }
- node = node->next;
- size++;
- }
- return NULL;
-}
-
-
-void refbuf_queue_insert(refbuf_queue_t **queue, refbuf_t *refbuf)
-{
- refbuf_queue_t *item = (refbuf_queue_t *)malloc(sizeof(refbuf_queue_t));
-
- item->refbuf = refbuf;
- item->next = *queue;
- if(item->next)
- item->total_length = item->next->total_length + item->refbuf->len;
- else
- item->total_length = item->refbuf->len;
- *queue = item;
-}
-
-int refbuf_queue_size(refbuf_queue_t **queue)
-{
- refbuf_queue_t *node = *queue;
- int size = 0;
-
- while (node) {
- node = node->next;
- size++;
- }
-
- return size;
-}
-
-int refbuf_queue_length(refbuf_queue_t **queue)
-{
- if(*queue)
- return (*queue)->total_length;
- else
- return 0;
-}
-
-
Modified: icecast/branches/icecast-singleq/src/refbuf.h
===================================================================
--- icecast/branches/icecast-singleq/src/refbuf.h 2004-07-20 09:17:23 UTC (rev 7191)
+++ icecast/branches/icecast-singleq/src/refbuf.h 2004-07-20 16:10:06 UTC (rev 7192)
@@ -28,14 +28,6 @@
unsigned long _count;
} refbuf_t;
-typedef struct _refbuf_queue_tag
-{
- refbuf_t *refbuf;
- long total_length;
-
- struct _refbuf_queue_tag *next;
-} refbuf_queue_t;
-
void refbuf_initialize(void);
void refbuf_shutdown(void);
@@ -43,15 +35,5 @@
void refbuf_addref(refbuf_t *self);
void refbuf_release(refbuf_t *self);
-void refbuf_queue_add(refbuf_queue_t **queue, refbuf_t *refbuf);
-refbuf_t *refbuf_queue_remove(refbuf_queue_t **queue);
-void refbuf_queue_insert(refbuf_queue_t **queue, refbuf_t *refbuf);
-
-/* Size in buffers */
-int refbuf_queue_size(refbuf_queue_t **queue);
-/* Size in bytes */
-int refbuf_queue_length(refbuf_queue_t **queue);
-refbuf_t * refbuf_queue_get(refbuf_queue_t **queue, int item);
-
#endif /* __REFBUF_H__ */
More information about the commits
mailing list