This is dlstqueue.h in view mode; [Download] [Up]
/* dstring v1.0.0 Dynamic string library * Copyright (c) 1994 Bill Bereza * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * To reach the author * * email: * berezaw@river.it.gvsu.edu ac368@leo.nmc.edu * * $Log: dlstqueue.h,v $ * Revision 1.2 94/12/18 01:30:02 berezaw * fixed a sizeof in a malloc call * * Revision 1.1 94/12/17 21:54:37 berezaw * Initial revision * * * $Header: /Users/berezaw/src/dlist/RCS/dlstqueue.h,v 1.2 94/12/18 01:30:02 berezaw Exp $ */ #ifndef _DLSTQUEUE_H #define _DLSTQUEUE_H #include "dlststack.h" #include "dlist.h" #define DLSTQUEUE DLSTSTACK #define initdqueue(s) initdlist((s)) /* dinitqueue initializes a queue * * returns a pointer to the queue, NULL on error */ #define freedqueue(queue) freedlist((queue)) /* frees all space used by the queue */ #define dqueuesize(queue) dlistels((queue)) /* returns the number of elements in the queue */ #define dqueuebytes(queue) dlistbytes((queue)) /* returns the number of elements in the queue */ #define dqueueelsize(queue) dlistelsize((queue)) /* returns the number of elements in the queue */ #define dsenqueue(dstring, chr) daddel((dstring), (chr)) /* denqueue adds a character to the end of the queue * * returns the character added, else -1 on error */ #define dsenqueuev(dstring, chr, s) daddelv((dstring), (chr), (s)) /* denqueue adds a character to the end of the queue * * returns the character added, else -1 on error */ #define dsdequeue(dstring) dpopel((dstring)) /* dsdequeue removes a character from the front of the queue * * returns -1 on error, else character removed */ #define dsdequeuev(dstring,b) dpopelv((dstring),(b)) /* dsdequeue removes a character from the front of the queue * * returns -1 on error, else character removed */ #define dsfrontqueue(queue) dtopel((queue)) /* returns the character at the front of the queue, -1 on error */ #define dsbackqueue(queue) dbotel((queue)) /* returns the character at the back of the queue, -1 on error */ #endif /* DSTRQUEUE_H */
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.