Graphviz  2.41.20170921.2350
stack.h
Go to the documentation of this file.
1 /* $Id$ $Revision$ */
2 /* vim:set shiftwidth=4 ts=8: */
3 
4 /*************************************************************************
5  * Copyright (c) 2011 AT&T Intellectual Property
6  * All rights reserved. This program and the accompanying materials
7  * are made available under the terms of the Eclipse Public License v1.0
8  * which accompanies this distribution, and is available at
9  * http://www.eclipse.org/legal/epl-v10.html
10  *
11  * Contributors: See CVS logs. Details at http://www.graphviz.org/
12  *************************************************************************/
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #ifndef STACK_H
19 #define STACK_H
20 
21 #include <render.h>
22 
23  typedef struct {
25  int sz;
26  } nstack_t;
27 
28  extern nstack_t *mkStack(void);
29  extern void stackPush(nstack_t * s, Agnode_t * n);
30  extern Agnode_t *stackPop(nstack_t * s);
31  extern int stackSize(nstack_t * s);
32  extern int stackCheck(nstack_t * s, Agnode_t * n);
33  extern void freeStack(nstack_t * s);
34 
35 #define top(sp) ((sp)->top)
36 
37 #ifdef DEBUG
38  extern void printStack(nstack_t *);
39 #endif
40 
41 #endif
42 
43 #ifdef __cplusplus
44 }
45 #endif
Definition: stack.h:23
void stackPush(nstack_t *s, Agnode_t *n)
Definition: stack.c:35
void freeStack(nstack_t *s)
Definition: stack.c:30
Agnode_t * stackPop(nstack_t *s)
Definition: stack.c:43
Definition: grammar.c:79
int stackCheck(nstack_t *s, Agnode_t *n)
Definition: stack.c:67
int stackSize(nstack_t *s)
Definition: stack.c:59
nstack_t * mkStack()
Definition: stack.c:19
Agnode_t * top
Definition: stack.h:24
int sz
Definition: stack.h:25