home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / git-4.3 / git-4 / git-4.3.11 / src / xstack.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-22  |  1.5 KB  |  48 lines

  1. /* xstack.h -- Prototypes and #defines for the stuff in xstack.c.  */
  2.  
  3. /* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
  4.  
  5.    This program is free software; you can redistribute it and/or modify
  6.    it under the terms of the GNU General Public License as published by
  7.    the Free Software Foundation; either version 2, or (at your option)
  8.    any later version.
  9.  
  10.    This program is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.    GNU General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU General Public License
  16.    along with this program; if not, write to the Free Software
  17.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. /* Written by Tudor Hulubei and Andrei Pitis.  */
  20.  
  21.  
  22. #ifndef _GIT_XSTACK_H
  23. #define _GIT_XSTACK_H
  24.  
  25.  
  26. #include "stdc.h"
  27.  
  28.  
  29. typedef struct
  30. {
  31.     void *data;         /* the stack data.  */
  32.     int esize;          /* # of bytes in a stack element.  */
  33.     int point;          /* # of elements in the stack.  */
  34. } xstack_t;
  35.  
  36.  
  37. xstack_t *xstack_init PROTO ((int));
  38. void      xstack_end  PROTO ((xstack_t *));
  39.  
  40. void  xstack_push     PROTO ((xstack_t *, void *));
  41. void *xstack_pop      PROTO ((xstack_t *, void *));
  42. void *xstack_preview  PROTO ((xstack_t *, void *, int));
  43. void  xstack_truncate PROTO ((xstack_t *, int));
  44. int   xstack_point    PROTO ((xstack_t *));
  45.  
  46.  
  47. #endif  /* _GIT_XSTACK_H */
  48.