|
|
1.1 root 1: /*
2: * vis.h 1.3
3: *
4: * Header file for Spreadsheet Program `vis'
5: *
6: * A. F. Gettier
7: * Bell Laboratories
8: * Update made 11/1/82 11:14:53
9: * Retrieved 11/15/82 13:22:55
10: */
11: #define HELPFILE "/usr/lib/vis.help"
12:
13: #define DEFWIDTH 10
14: #define DEFSCALE 2
15:
16: #define loop for(;;)
17: #define copystr(x) strcpy(malloc((unsigned)(strlen(x)+1)),x)
18: #define NODE(x) (struct x *)malloc(sizeof(struct x))
19: #define multnode(type,num) (struct type *)malloc((unsigned)(sizeof(struct type)*num))
20:
21: char *malloc(), *strcpy(), *getexp(), *foldup(), *realloc();
22: char *dtoa(), *getfn(), *mktemp(), *getenv(), *collect();
23: char *cannon(), *strcat(), *strchr(), *makevar(), *strncpy();
24: double atof();
25: void pinit(), lexinit(), startlex(), scrinit(), prheading();
26: void hashenter(), hashinit(), qadd(), qempty(), qinit();
27: struct node *qread(), *newnode(), mathop();
28: struct node *getnode();
29: struct qheader *qcopy();
30:
31: #ifndef TRUE
32: #define TRUE (1)
33: #define FALSE 0
34: #endif
35: #define BIG 123456789E35
36: /*
37: * Structures Needed for the Program
38: */
39: enum rtntyp { UNDEF, UNRES, NUM, STRING };
40:
41: /*
42: * Structures required for the hashing
43: */
44:
45: struct hashentry {
46: char *symbol;
47: int key;
48: int value;
49: };
50:
51: struct hashhdr {
52: int size;
53: int entry;
54: struct hashentry *table;
55: };
56:
57: struct reswd {
58: char *name;
59: int value;
60: };
61:
62: /*
63: * Structures required for the queues
64: */
65:
66: struct qheader {
67: struct qentry *first;
68: struct qentry *last;
69: };
70:
71: struct qentry {
72: struct node *nodeptr;
73: struct qentry *next;
74: };
75:
76: /*
77: * Return structure from lexical analysis
78: */
79:
80: struct vdef {
81: int row, col;
82: char *tval;
83: };
84:
85: /*
86: * Parsing Structures
87: */
88:
89: struct range {
90: int fromrow, fromcol;
91: int torow, tocol;
92: };
93:
94: struct colstat {
95: int colnum;
96: int number
97: };
98:
99: /*
100: * Structures required to keep track of the nodes
101: */
102:
103: struct rowhdr {
104: int size;
105: struct rowlabel **table;
106: };
107:
108: struct colhdr {
109: int size;
110: struct collabel **table;
111: };
112:
113: struct rowlabel {
114: int rownum;
115: int position;
116: struct node *next;
117: };
118:
119: struct collabel {
120: int colnum;
121: int position;
122: int cell;
123: int width, scale;
124: int size;
125: };
126:
127: /*
128: * NODE STRUCTURE
129: */
130: struct node {
131: int row, col;
132: enum rtntyp type;
133: double value;
134: char *def;
135: char *svalue;
136: struct node *next;
137: struct qheader depend;
138: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.