myfifo.h.svn-base

btmux/src/.svn/text-base/myfifo.h.svn-base · 923 B

From the archive btonline-btechmux-0.6-rc1.tbz2

Download the archive   « Back to the archive contents

/*
 * $Id: myfifo.h,v 1.1 2005/06/13 20:50:47 murrayma Exp $
 *
 * Author: Markus Stenberg <fingon@iki.fi>
 *
 *  Copyright (c) 1996 Markus Stenberg
 *       All rights reserved
 *
 * Created: Sun Dec  1 11:46:22 1996 fingon
 * Last modified: Sun Dec  1 12:43:04 1996 fingon
 *
 */

#ifndef MYFIFO_H
#define MYFIFO_H

typedef struct myfifo_entry_struct {
    void *data;
    struct myfifo_entry_struct *next;
    struct myfifo_entry_struct *prev;
} myfifo_e;

typedef struct myfifo_struct {
    myfifo_e *first;		/* First entry (last put in) */
    myfifo_e *last;		/* Last entry (first to get out) */
    int count;			/* Number of entries in the queue */
} myfifo;

/* myfifo.c */
int myfifo_length(myfifo ** foo);
void *myfifo_pop(myfifo ** foo);
void myfifo_push(myfifo ** foo, void *data);
void myfifo_trav(myfifo ** foo, void (*func) ());
void myfifo_trav_r(myfifo ** foo, void (*func) ());

#endif				/* MYFIFO_H */

Site Stats

Snippets: 1791
Codebases: 571