include/queue.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  * Copyright 2002 Jeff Rush <jrush@taupro.com>
00003  * Original Copyright 1979-2002 Udanax.com
00004  *
00005  * This file is part of the Udanax xanalogical storage system.
00006  *
00007  * Udanax is free software; you can redistribute it and/or modify it
00008  * under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * Udanax is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with Udanax; if not, write to the Free Software Foundation,
00019  * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  **********************************************************************/
00021 
00030 /* Modification History:
00031  * $Log: queue.h,v $
00032  * Revision 1.5  2004/09/04 12:21:44  jrush
00033  * Fixed DOxygen commenting in a few places.
00034  *
00035  * Revision 1.4  2002/05/28 03:51:13  jrush
00036  * Updated sources to comply with a GPL licensing.
00037  *
00038  * Revision 1.3  2002/05/28 02:46:36  jrush
00039  * Converted a macro function into an inline function.
00040  *
00041  * Revision 1.2  2002/04/12 11:46:25  jrush
00042  * Major rearrangement of include contents, to reflect a hopefully more
00043  * logical layout as we refactor Udanax into classes.
00044  *
00045  * Revision 1.1  2002/04/12 09:47:24  jrush
00046  * Renamed queues.h to queue.h
00047  *
00048  * Revision 1.5  2002/04/06 15:00:34  jrush
00049  * Changed INT to just 'int'.
00050  *
00051  * Revision 1.4  2002/02/14 05:40:42  jrush
00052  * Cleaned up source:
00053  *
00054  * 1. ran thru the indent tool to achieve a standard look,
00055  * 2. added structured comments at top for use with DOxygen reporting
00056  *    as well as CVS keywords,
00057  * 3. added #ifndef/#defines to prevent duplicate inclusions,
00058  * 4. insured all struct/union defs have names,
00059  * 5. centralized prototypes in protos.h, removing incomplete ones,
00060  * 6. cleaned up use of bool/BOOLEAN type to suit C++ type,
00061  * 7. fixed initializer nesting in tumbler constants.
00062  *
00063  */
00064 
00065 #ifndef __UDANAX_QUEUES_H__
00066 #define __UDANAX_QUEUES_H__
00067 
00068 #undef NULL
00069 #if defined(__cplusplus)
00070 #define NULL 0
00071 #else
00072 #define NULL ((void *)0)
00073 #endif
00074 
00075 class queue {
00076 public:
00077     queue *qnext;  // Next item in queue
00078     queue *qprev;  // Previous item in queue
00079 
00080     queue *next(queue *qhead);
00081 };
00082 
00083 //#define qempty(x) (qnext((struct queue *)(x),(struct queue *)(x))==NULL)
00084 
00085 inline bool
00086 qempty(queue *x)
00087 {
00088     return x->next(x) == NULL;
00089 }
00090 
00091 #endif /* !__UDANAX_QUEUES_H__*/

Generated on Sun Aug 21 04:18:13 2005 for Udanax-Green by doxygen1.3.4