2 |
7u83 |
1 |
/*
|
|
|
2 |
Crown Copyright (c) 1997
|
|
|
3 |
|
|
|
4 |
This TenDRA(r) Computer Program is subject to Copyright
|
|
|
5 |
owned by the United Kingdom Secretary of State for Defence
|
|
|
6 |
acting through the Defence Evaluation and Research Agency
|
|
|
7 |
(DERA). It is made available to Recipients with a
|
|
|
8 |
royalty-free licence for its use, reproduction, transfer
|
|
|
9 |
to other parties and amendment for any purpose not excluding
|
|
|
10 |
product development provided that any such use et cetera
|
|
|
11 |
shall be deemed to be acceptance of the following conditions:-
|
|
|
12 |
|
|
|
13 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
14 |
reproduced upon any copies or amended versions of it;
|
|
|
15 |
|
|
|
16 |
(2) Any amended version of it shall be clearly marked to
|
|
|
17 |
show both the nature of and the organisation responsible
|
|
|
18 |
for the relevant amendment or amendments;
|
|
|
19 |
|
|
|
20 |
(3) Its onward transfer from a recipient to another
|
|
|
21 |
party shall be deemed to be that party's acceptance of
|
|
|
22 |
these conditions;
|
|
|
23 |
|
|
|
24 |
(4) DERA gives no warranty or assurance as to its
|
|
|
25 |
quality or suitability for any purpose and DERA accepts
|
|
|
26 |
no liability whatsoever in relation to any use to which
|
|
|
27 |
it may be put.
|
|
|
28 |
*/
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
/**********************************************************************
|
|
|
32 |
$Author: release $
|
|
|
33 |
$Date: 1998/01/17 15:56:05 $
|
|
|
34 |
$Revision: 1.1.1.1 $
|
|
|
35 |
$Log: bstack.h,v $
|
|
|
36 |
* Revision 1.1.1.1 1998/01/17 15:56:05 release
|
|
|
37 |
* First version to be checked into rolling release.
|
|
|
38 |
*
|
|
|
39 |
* Revision 1.1 1995/04/13 09:08:06 currie
|
|
|
40 |
* Initial revision
|
|
|
41 |
*
|
|
|
42 |
***********************************************************************/
|
|
|
43 |
/* Definition of stack for maintaining isymMac and isymstart.
|
|
|
44 |
|
|
|
45 |
This is required because entries in the symbol table such as blocks,
|
|
|
46 |
procedures and files have two entries in the symbol table corresponding
|
|
|
47 |
to their beginning and end. The "start" entry has an associated index which
|
|
|
48 |
is the index of the "end" plus 1. The "end" entry has an associated index
|
|
|
49 |
which is the index of the "start". Consequently a stack of these indices
|
|
|
50 |
can be built up and an index is pushed when the start of a block, proc or
|
|
|
51 |
file is reached and popped when an end is reached. The routines for this are
|
|
|
52 |
given in bstack.c */
|
|
|
53 |
|
|
|
54 |
#define STACKSIZE 100
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
typedef struct stackdef {
|
|
|
58 |
long symind [STACKSIZE];
|
|
|
59 |
long strind [STACKSIZE]; /* space for stack elements */
|
|
|
60 |
long pos; /* current position of top of stack */
|
|
|
61 |
struct stackdef * nextspace; /* if more space required */
|
|
|
62 |
} BSTACK;
|
|
|
63 |
|
|
|
64 |
/* An elemnt of the stack has the following type (result of popping a stack) */
|
|
|
65 |
typedef struct symstrdef {long sym;
|
|
|
66 |
long str;
|
|
|
67 |
} SYMSTR;
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
extern void push PROTO_S ( ( long, long, BSTACK * ) ) ;
|
|
|
71 |
extern SYMSTR pop PROTO_S ( ( BSTACK * ) ) ;
|