home *** CD-ROM | disk | FTP | other *** search
/ ftptest.leeds.ac.uk / 2015.02.ftptest.leeds.ac.uk.tar / ftptest.leeds.ac.uk / bionet / CAE-GROUP / SCL-WIN3x / FED_PLUS.EXE / STACK.H < prev    next >
C/C++ Source or Header  |  1994-07-23  |  2KB  |  87 lines

  1. #ifndef STACK_H
  2. #define    STACK_H
  3.  
  4. /* $Id: stack.h,v 1.3 1993/10/15 18:49:23 libes Exp $ */
  5.  
  6. /*
  7.  * This work was supported by the United States Government, and is
  8.  * not subject to copyright.
  9.  *
  10.  * $Log: stack.h,v $
  11.  * Revision 1.3  1993/10/15  18:49:23  libes
  12.  * CADDETC certified
  13.  *
  14.  * Revision 1.2  1992/08/18  17:15:40  libes
  15.  * rm'd extraneous error messages
  16.  *
  17.  * Revision 1.1  1992/05/28  03:56:02  libes
  18.  * Initial revision
  19.  */
  20.  
  21. /*************/
  22. /* constants */
  23. /*************/
  24.  
  25. #define STACK_NULL    (Stack *)NULL
  26.  
  27. /*****************/
  28. /* packages used */
  29. /*****************/
  30.  
  31. #include "linklist.h"
  32.  
  33. /************/
  34. /* typedefs */
  35. /************/
  36.  
  37. typedef Linked_List    Stack;
  38.  
  39. /****************/
  40. /* modules used */
  41. /****************/
  42.  
  43. /***************************/
  44. /* hidden type definitions */
  45. /***************************/
  46.  
  47. /********************/
  48. /* global variables */
  49. /********************/
  50.  
  51. #ifdef STACK_C
  52. # define GLOBAL
  53. # define INITIALLY(value) = value
  54. #else
  55. # define GLOBAL extern
  56. # define INITIALLY(value)
  57. #endif    /*  STACK_C  */
  58.  
  59. #undef GLOBAL
  60. #undef INITIALLY
  61.  
  62. /*******************************/
  63. /* macro function definitions  */   
  64. /*******************************/
  65.  
  66. /* function aliases */
  67. #define STACKinitialize()
  68. #define STACKcreate()        LISTcreate()
  69. #define STACKempty(stack)    LISTempty(stack)
  70. #define    STACKpush(stack, item)    LISTadd_first((stack), (item))
  71. #define STACKpop(stack)        LISTremove_first(stack)
  72. #define STACKpeek(stack)    LISTpeek_first(stack)
  73.  
  74. /***********************/
  75. /* function prototypes */
  76. /***********************/
  77.  
  78. /*******************************/
  79. /* inline function definitions */
  80. /*******************************/
  81.  
  82. #if supports_inline_functions || defined(STACK_C)
  83.  
  84. #endif /* supports_inline_functions || defined(STACK_C) */
  85.  
  86. #endif    /*  STACK_H  */
  87.