~ubuntu-branches/ubuntu/precise/graphviz/precise-security

« back to all changes in this revision

Viewing changes to lib/circogen/stack.h

  • Committer: Bazaar Package Importer
  • Author(s): David Claughton
  • Date: 2010-03-24 22:45:18 UTC
  • mfrom: (1.2.7 upstream) (6.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100324224518-do441tthbqjaqjzd
Tags: 2.26.3-4
Add patch to fix segfault in circo. Backported from upstream snapshot
release.  Thanks to Francis Russell for his work on this.
(Closes: #575255)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: stack.h,v 1.2 2005/02/24 00:57:33 ellson Exp $ $Revision: 1.2 $ */
2
 
/* vim:set shiftwidth=4 ts=8: */
3
 
 
4
 
/**********************************************************
5
 
*      This software is part of the graphviz package      *
6
 
*                http://www.graphviz.org/                 *
7
 
*                                                         *
8
 
*            Copyright (c) 1994-2004 AT&T Corp.           *
9
 
*                and is licensed under the                *
10
 
*            Common Public License, Version 1.0           *
11
 
*                      by AT&T Corp.                      *
12
 
*                                                         *
13
 
*        Information and Software Systems Research        *
14
 
*              AT&T Research, Florham Park NJ             *
15
 
**********************************************************/
16
 
 
17
 
#ifdef __cplusplus
18
 
extern "C" {
19
 
#endif
20
 
 
21
 
#ifndef STACK_H
22
 
#define STACK_H
23
 
 
24
 
#include  <render.h>
25
 
 
26
 
    typedef struct {
27
 
        Agnode_t *top;
28
 
        int sz;
29
 
    } nstack_t;
30
 
 
31
 
    extern nstack_t *mkStack(void);
32
 
    extern void stackPush(nstack_t * s, Agnode_t * n);
33
 
    extern Agnode_t *stackPop(nstack_t * s);
34
 
    extern int stackSize(nstack_t * s);
35
 
    extern int stackCheck(nstack_t * s, Agnode_t * n);
36
 
    extern void freeStack(nstack_t * s);
37
 
 
38
 
#define top(sp)  ((sp)->top)
39
 
 
40
 
#ifdef DEBUG
41
 
    extern void printStack(nstack_t *);
42
 
#endif
43
 
 
44
 
#endif
45
 
 
46
 
#ifdef __cplusplus
47
 
}
48
 
#endif