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