1 |
greg |
1.1 |
/* Copyright (c) 1986 Regents of the University of California */ |
2 |
|
|
|
3 |
|
|
/* SCCSid "$SunId$ LBL" */ |
4 |
|
|
|
5 |
|
|
/* |
6 |
|
|
* object.h - header file for routines using objects and object sets. |
7 |
|
|
* |
8 |
|
|
* 7/28/85 |
9 |
|
|
*/ |
10 |
|
|
|
11 |
|
|
/* |
12 |
|
|
* Object definitions require general specifications |
13 |
|
|
* which may include a number of different argument types. |
14 |
|
|
* The following structure aids in the storage of such |
15 |
|
|
* argument lists. |
16 |
|
|
*/ |
17 |
|
|
|
18 |
|
|
typedef struct { |
19 |
|
|
short nsargs; /* # of string arguments */ |
20 |
|
|
short nfargs; /* # of real arguments */ |
21 |
|
|
char **sarg; /* string arguments */ |
22 |
greg |
1.5 |
FLOAT *farg; /* real arguments */ |
23 |
greg |
1.1 |
#ifdef IARGS |
24 |
|
|
short niargs; /* # of integer arguments */ |
25 |
|
|
long *iarg; /* integer arguments */ |
26 |
|
|
#endif |
27 |
|
|
} FUNARGS; |
28 |
|
|
|
29 |
greg |
1.3 |
#define MAXSTR 128 /* maximum string length */ |
30 |
greg |
1.1 |
|
31 |
|
|
/* |
32 |
|
|
* An object is defined as an index into an array of |
33 |
|
|
* structures containing the object type and specification |
34 |
|
|
* and the modifier index. |
35 |
|
|
*/ |
36 |
|
|
|
37 |
greg |
1.4 |
#ifndef OBJECT |
38 |
|
|
#ifdef BIGMEM |
39 |
|
|
#define OBJECT int /* index to object array */ |
40 |
|
|
#else |
41 |
|
|
#define OBJECT short /* index to object array */ |
42 |
|
|
#endif |
43 |
|
|
#endif |
44 |
greg |
1.1 |
|
45 |
|
|
typedef struct { |
46 |
|
|
OBJECT omod; /* modifier number */ |
47 |
|
|
short otype; /* object type number */ |
48 |
|
|
char *oname; /* object name */ |
49 |
|
|
FUNARGS oargs; /* object specification */ |
50 |
|
|
char *os; /* object structure */ |
51 |
|
|
long lastrno; /* last ray this was used with */ |
52 |
|
|
} OBJREC; |
53 |
|
|
|
54 |
greg |
1.4 |
#ifndef MAXOBJBLK |
55 |
|
|
#ifdef BIGMEM |
56 |
|
|
#define MAXOBJBLK 4095 /* maximum number of object blocks */ |
57 |
|
|
#else |
58 |
greg |
1.1 |
#define MAXOBJBLK 511 /* maximum number of object blocks */ |
59 |
greg |
1.4 |
#endif |
60 |
|
|
#endif |
61 |
greg |
1.1 |
|
62 |
|
|
extern OBJREC *objblock[MAXOBJBLK]; /* the object blocks */ |
63 |
greg |
1.2 |
extern OBJECT nobjects; /* # of objects */ |
64 |
greg |
1.1 |
|
65 |
|
|
#define objptr(obj) (objblock[(obj)>>6]+((obj)&077)) |
66 |
|
|
|
67 |
|
|
#define OVOID (-1) /* void object */ |
68 |
|
|
#define VOIDID "void" /* void identifier */ |
69 |
|
|
|
70 |
|
|
/* |
71 |
|
|
* Object sets begin with the number of objects and proceed with |
72 |
|
|
* the objects in ascending order. |
73 |
|
|
*/ |
74 |
|
|
|
75 |
|
|
#define MAXSET 127 /* maximum object set size */ |