source: trunk/minix/commands/bc/global.h@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 2.8 KB
Line 
1/* global.h: The global variables for bc. */
2
3/* This file is part of bc written for MINIX.
4 Copyright (C) 1991, 1992 Free Software Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License , or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19
20 You may contact the author by:
21 e-mail: phil@cs.wwu.edu
22 us-mail: Philip A. Nelson
23 Computer Science Department, 9062
24 Western Washington University
25 Bellingham, WA 98226-9062
26
27*************************************************************************/
28
29
30/* For the current "break level" and if statements. */
31EXTERN int break_label;
32EXTERN int if_label;
33EXTERN int continue_label;
34
35/* Label numbers. */
36EXTERN int next_label;
37
38/* Used for "code" generation. */
39EXTERN char genstr[80];
40EXTERN int out_count;
41EXTERN char did_gen;
42
43/* Interactive and other flags. */
44EXTERN char interactive;
45EXTERN char compile_only;
46EXTERN char use_math;
47EXTERN char warn_not_std;
48EXTERN char std_only;
49
50/* global variables for the bc machine. All will be dynamic in size.*/
51/* Function storage. main is (0) and functions (1-f_count) */
52
53EXTERN bc_function *functions;
54EXTERN char **f_names;
55EXTERN int f_count;
56
57/* Variable stoarge and reverse names. */
58
59EXTERN bc_var **variables;
60EXTERN char **v_names;
61EXTERN int v_count;
62
63/* Array Variable storage and reverse names. */
64
65EXTERN bc_var_array **arrays;
66EXTERN char **a_names;
67EXTERN int a_count;
68
69/* Execution stack. */
70EXTERN estack_rec *ex_stack;
71
72/* Function return stack. */
73EXTERN fstack_rec *fn_stack;
74
75/* Other "storage". */
76EXTERN int i_base;
77EXTERN int o_base;
78EXTERN int scale;
79EXTERN char c_code;
80EXTERN int out_col;
81EXTERN char runtime_error;
82EXTERN program_counter pc;
83
84/* Input Line numbers and other error information. */
85EXTERN int line_no;
86EXTERN int had_error;
87
88/* For larger identifiers, a tree, and how many "storage" locations
89 have been allocated. */
90
91EXTERN int next_array;
92EXTERN int next_func;
93EXTERN int next_var;
94
95EXTERN id_rec *name_tree;
96
97/* For error message production */
98EXTERN char **g_argv;
99EXTERN int g_argc;
100EXTERN char is_std_in;
101
102/* defined in number.c */
103extern bc_num _zero_;
104extern bc_num _one_;
105
106/* For use with getopt. Do not declare them here.*/
107extern int optind;
108
Note: See TracBrowser for help on using the repository browser.