Debian Codegraph @

packages/seacas/libraries/svdi/cgi/cgi.h

raw
1 /*
2 * Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions
3 * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
4 * NTESS, the U.S. Government retains certain rights in this software.
5 *
6 * See packages/seacas/LICENSE for details
7 */
8 /* cgi.h - header file to define useful stuff for cgi
9 * 27 Oct 1989 - last date modified
10 * Pat McGee, [email protected]
11 */
12 /*
13 * 26 Oct 1989,TLC: brought up to date with Pat's data structure changes
14 * 27 Oct 1989,TLC: changed function id to _FN for UNICOS problems
15 */
16
17 /******************************************************************************/
18 /* */
19 /* type and constant declarations */
20 /* */
21 /******************************************************************************/
22 #pragma once
23
24 #include "fortyp.h"
25 #include "stdtyp.h"
26
27 /* define true and false */
28 #define FALSE 0
29 #define TRUE 1
30
31 /* macros for min and max */
32 #define max(A, B) ((A) > (B) ? (A) : (B))
33 #define min(A, B) ((A) < (B) ? (A) : (B))
34
35 #define MAX_DEVICES 3
36 #define MAX_IN_PARAMS 20
37 #define MAX_SURFACES 4
38 #define MAX_ERROR_CLASS 9
39
40 /* function identifiers */
41 #define ACTIVATE_FN -1
42 #define DEACTIVATE_FN -2
43 #define CI_FN 1
44 #define CT_FN 2
45 #define CXDFAC_FN 3
46 #define CPDS_FN 4
47 #define CENDPG_FN 5
48 #define CBC_FN 6
49 #define CVDCX_FN 7
50 #define CV_FN 8
51 #define CCL_FN 9
52 #define CDSCL_FN 10
53 #define CDQERR_FN 11
54 #define CERHCT_FN 12
55 #define CCIXP_FN 13
56 #define CESC_FN 14
57 #define CQID_FN 15
58 #define CQD_FN 16
59 #define CLF_FN 17
60 #define CLPR_FN 18
61 #define CQSP_FN 19
62 #define CLESC_FN 20
63 #define CQP_FN 21
64 #define CQCL_FN 22
65 #define CPL_FN 23
66 #define CDJPL_FN 24
67 #define CPM_FN 25
68 #define CTX_FN 26
69 #define CPG_FN 27
70 #define CCA_FN 28
71 #define CPXA_FN 29
72 #define CLNT_FN 30
73 #define CLNW_FN 31
74 #define CLNC_FN 32
75 #define CMKT_FN 33
76 #define CMKS_FN 34
77 #define CMKC_FN 35
78 #define CTXP_FN 36
79 #define CTXC_FN 37
80 #define CCHH_FN 38
81 #define CCHO_FN 39
82 #define CIS_FN 40
83 #define CFLC_FN 41
84 #define CCSM_FN 42
85 #define CCT_FN 43
86 #define CGTXX_FN 44
87 #define CQPRL_FN 45
88 #define CQLN_FN 46
89 #define CQLNT_FN 47
90 #define CQSLW_FN 48
91 #define CQMK_FN 49
92 #define CQMKT_FN 50
93 #define CQSMS_FN 51
94 #define CQCHH_FN 52
95 #define CQFL_FN 53
96 #define CQC_FN 54
97 #define CQLNA_FN 55
98 #define CQMKA_FN 56
99 #define CQTXA_FN 57
100 #define CQFLA_FN 58
101 #define CQCTE_FN 59
102 #define CILI_FN 60
103 #define CRQLC_FN 61
104 /* end of function identifiers */
105
106 #define MAX_FN_ID 61
107
108 /* escape identifiers */
109 /* ..moved these to cgidef.h */
110
111 /* device: contains a list of pointers to active surface defn's; for use by
112 * multiple CGI device routines (CGIACT, CGIDAC, CGION, CGIOFF), not by the
113 * regular CGI routines (CI, CT, etc.)
114 */
115 typedef struct
116 {
117 void (*device_fn)(anything **, int, anything **); /* which device is this list for */
118 short num_active_surfaces; /* how many active */
119 short num_on_surfaces; /* how many have output on */
120 anything *statelist[MAX_SURFACES];
121 /* within surfaces, all surfaces which have output on are */
122 /* found at the beginning of the list, followed by all */
123 /* surfaces which have output off. num_on_surfaces */
124 /* counts the number of surfaces which have output on, and */
125 /* therefore points to the first surface which has output off.*/
126 } device_struct;
127
128 typedef struct
129 { /* error list elements */
130 f_integer err_class; /* error class */
131 f_integer err_num; /* error number */
132 f_integer func_id; /* function id */
133 } error_report;
134
135 typedef struct
136 {
137 float x;
138 float y;
139 } point;
140
141 typedef struct
142 {
143 int x;
144 int y;
145 } dpoint;
146
147 typedef struct
148 {
149 utiny r;
150 utiny g;
151 utiny b;
152 } rgb;
153
154 typedef int cenum; /* CGI enumeration type */
155
156 typedef enum csm_enum { dc_csm, ic_csm } csm_enum;
157
158 void cgi_def_ini(void);
159
160 /* end cgi.h */