src/myfifo.h

Go to the documentation of this file.
00001 
00002 /*
00003  * $Id: myfifo.h,v 1.1 2005/06/13 20:50:47 murrayma Exp $
00004  *
00005  * Author: Markus Stenberg <fingon@iki.fi>
00006  *
00007  *  Copyright (c) 1996 Markus Stenberg
00008  *       All rights reserved
00009  *
00010  * Created: Sun Dec  1 11:46:22 1996 fingon
00011  * Last modified: Sun Dec  1 12:43:04 1996 fingon
00012  *
00013  */
00014 
00015 #ifndef MYFIFO_H
00016 #define MYFIFO_H
00017 
00018 typedef struct myfifo_entry_struct {
00019     void *data;
00020     struct myfifo_entry_struct *next;
00021     struct myfifo_entry_struct *prev;
00022 } myfifo_e;
00023 
00024 typedef struct myfifo_struct {
00025     myfifo_e *first;            /* First entry (last put in) */
00026     myfifo_e *last;             /* Last entry (first to get out) */
00027     int count;                  /* Number of entries in the queue */
00028 } myfifo;
00029 
00030 /* myfifo.c */
00031 int myfifo_length(myfifo ** foo);
00032 void *myfifo_pop(myfifo ** foo);
00033 void myfifo_push(myfifo ** foo, void *data);
00034 void myfifo_trav(myfifo ** foo, void (*func) ());
00035 void myfifo_trav_r(myfifo ** foo, void (*func) ());
00036 
00037 #endif                          /* MYFIFO_H */

Generated on Mon May 28 04:25:18 2007 for BattletechMUX by  doxygen 1.4.7