Initial revision
[LeanCalc.git] / calc / calc / label.h
1 /*
2  * label - label handling routines
3  *
4  * Copyright (C) 1999  David I. Bell
5  *
6  * Calc is open software; you can redistribute it and/or modify it under
7  * the terms of the version 2.1 of the GNU Lesser General Public License
8  * as published by the Free Software Foundation.
9  *
10  * Calc is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
13  * Public License for more details.
14  *
15  * A copy of version 2.1 of the GNU Lesser General Public License is
16  * distributed with calc under the filename COPYING-LGPL.  You should have
17  * received a copy with calc; if not, write to Free Software Foundation, Inc.
18  * 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
19  *
20  * @(#) $Revision$
21  * @(#) $Id$
22  * @(#) $Source$
23  *
24  * Under source code control:   1990/02/15 01:48:33
25  * File existed as early as:    before 1990
26  *
27  * Share and enjoy!  :-)        http://www.isthe.com/chongo/tech/comp/calc/
28  */
29
30
31 #if !defined(__LABEL_H__)
32 #define __LABEL_H__
33
34
35 #if defined(CALC_SRC)   /* if we are building from the calc source tree */
36 # include "calc/zmath.h"
37 #else
38 # include <calc/zmath.h>
39 #endif
40
41
42 #define NULL_LABEL      ((LABEL *) 0)
43
44
45 /*
46  * Label structures.
47  */
48 typedef struct {
49         long l_offset;            /* offset into code of label */
50         long l_chain;             /* offset into code of undefined chain */
51         char *l_name;             /* name of label if any */
52 } LABEL;
53
54
55 extern void initlabels(void);
56 extern void definelabel(char *name);
57 extern void addlabel(char *name);
58 extern void clearlabel(LABEL *lp);
59 extern void setlabel(LABEL *lp);
60 extern void uselabel(LABEL *lp);
61 extern void checklabels(void);
62
63
64 #endif /* !__LABEL_H__ */