1 | |
---|
2 | /* file SSUSRDEF.H |
---|
3 | * ========== |
---|
4 | * |
---|
5 | * version 2, 22-MAY-2006 |
---|
6 | * |
---|
7 | * prototypes of module SHSYMBOL.C |
---|
8 | * K. Stammler, 22-MAY-91 |
---|
9 | */ |
---|
10 | |
---|
11 | |
---|
12 | /* |
---|
13 | * |
---|
14 | * SeismicHandler, seismic analysis software |
---|
15 | * Copyright (C) 1996, Klaus Stammler, Federal Institute for Geosciences |
---|
16 | * and Natural Resources (BGR), Germany |
---|
17 | * |
---|
18 | * This program is free software; you can redistribute it and/or modify |
---|
19 | * it under the terms of the GNU General Public License as published by |
---|
20 | * the Free Software Foundation; either version 2 of the License, or |
---|
21 | * (at your option) any later version. |
---|
22 | * |
---|
23 | * This program is distributed in the hope that it will be useful, |
---|
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
26 | * GNU General Public License for more details. |
---|
27 | * |
---|
28 | * You should have received a copy of the GNU General Public License |
---|
29 | * along with this program; if not, write to the Free Software |
---|
30 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
---|
31 | * |
---|
32 | */ |
---|
33 | |
---|
34 | |
---|
35 | #ifndef __SSUSRDEF |
---|
36 | #define __SSUSRDEF |
---|
37 | |
---|
38 | #ifndef __SHCONST |
---|
39 | #include "shconst.h" |
---|
40 | #endif |
---|
41 | #ifndef __CPUSRDEF |
---|
42 | #include "cpusrdef.h" |
---|
43 | #endif |
---|
44 | |
---|
45 | /*------------------------------------------------------------------------*/ |
---|
46 | |
---|
47 | |
---|
48 | void ss_define( unsigned set, char *name, char *value, int *status ); |
---|
49 | |
---|
50 | /* creates a new symbol "name" in set "set" and sets it to value "value" */ |
---|
51 | |
---|
52 | /* parameters of routine */ |
---|
53 | /* unsigned int set; input; set number */ |
---|
54 | /* char *name; input; name of new symbol */ |
---|
55 | /* char *value; input; value of new symbol */ |
---|
56 | /* int *status; output; return status */ |
---|
57 | |
---|
58 | |
---|
59 | /*------------------------------------------------------------------------*/ |
---|
60 | |
---|
61 | |
---|
62 | void ss_delete( unsigned set, char *name, int *status ); |
---|
63 | |
---|
64 | /* deletes an existing symbol */ |
---|
65 | |
---|
66 | /* parameters of routine */ |
---|
67 | /* unsigned int set; input; set number */ |
---|
68 | /* char *name; input; name of new symbol */ |
---|
69 | /* int *status; output; return status */ |
---|
70 | |
---|
71 | |
---|
72 | /*------------------------------------------------------------------------*/ |
---|
73 | |
---|
74 | |
---|
75 | void ss_delall( unsigned set, int *status ); |
---|
76 | |
---|
77 | /* deletes all symbol in set */ |
---|
78 | |
---|
79 | /* parameters of routine */ |
---|
80 | /* unsigned int set; input; set number */ |
---|
81 | /* int *status; output; return status */ |
---|
82 | |
---|
83 | |
---|
84 | /*------------------------------------------------------------------------*/ |
---|
85 | |
---|
86 | |
---|
87 | void ss_change( unsigned set, char *name, char *value, int *status ); |
---|
88 | |
---|
89 | /* changes the value of an existing symbol "name" to "value" */ |
---|
90 | |
---|
91 | /* parameters of routine */ |
---|
92 | /* unsigned int set; input; set number */ |
---|
93 | /* char *name; input; name of new symbol */ |
---|
94 | /* char *value; input; value of new symbol */ |
---|
95 | /* int *status; output; return status */ |
---|
96 | |
---|
97 | |
---|
98 | /*------------------------------------------------------------------------*/ |
---|
99 | |
---|
100 | |
---|
101 | void ss_getval( unsigned set, char *name, int maxlth, char *value, int *status ); |
---|
102 | |
---|
103 | /* returns value of existing symbol */ |
---|
104 | |
---|
105 | /* parameters of routine */ |
---|
106 | /* unsigned int set; input; set number */ |
---|
107 | /* char *name; input; name of symbol */ |
---|
108 | /* int maxlth; input; maximum length of output string */ |
---|
109 | /* char *value; output; value of symbol */ |
---|
110 | /* int *status; output; return status */ |
---|
111 | |
---|
112 | |
---|
113 | /*------------------------------------------------------------------------*/ |
---|
114 | |
---|
115 | |
---|
116 | int ss_exist( unsigned set, char *name ); |
---|
117 | |
---|
118 | /* checks whether "name" is defined in "set" or not */ |
---|
119 | |
---|
120 | /* parameters of routine */ |
---|
121 | /* unsigned int set; input; symbol set */ |
---|
122 | /* char *name; input; name of symbol */ |
---|
123 | /* returns TRUE if symbol defined */ |
---|
124 | |
---|
125 | /*------------------------------------------------------------------------*/ |
---|
126 | |
---|
127 | |
---|
128 | void ss_setpar( PARAM *par, int inputlev ); |
---|
129 | |
---|
130 | /* sets current command parameters */ |
---|
131 | |
---|
132 | /* parameters of routine */ |
---|
133 | /* PARAM *par; input; new command parameters */ |
---|
134 | /* int inputlev; input; input level */ |
---|
135 | |
---|
136 | |
---|
137 | /*------------------------------------------------------------------------*/ |
---|
138 | |
---|
139 | |
---|
140 | void ss_default( unsigned no, char *value, int *status ); |
---|
141 | |
---|
142 | /* sets default value of parameter number "no" to "value" */ |
---|
143 | |
---|
144 | /* parameters of routine */ |
---|
145 | /* unsigned int no; input; parameter number */ |
---|
146 | /* char *value; input; default value */ |
---|
147 | /* int *status; output; return status */ |
---|
148 | |
---|
149 | |
---|
150 | /*------------------------------------------------------------------------*/ |
---|
151 | |
---|
152 | |
---|
153 | void ss_getpar( char *nostr, int maxlth, char *value, int *status ); |
---|
154 | |
---|
155 | /* returns the value of the desired command parameter */ |
---|
156 | |
---|
157 | /* parameters of routine */ |
---|
158 | /* char *nostr; input; number of parameter */ |
---|
159 | /* int maxlth; input; maximum string length */ |
---|
160 | /* char *value; output; value returned */ |
---|
161 | /* int *status; output; return status */ |
---|
162 | |
---|
163 | |
---|
164 | /*------------------------------------------------------------------------*/ |
---|
165 | |
---|
166 | |
---|
167 | int ss_query( void ); |
---|
168 | |
---|
169 | /* returns query value (default parameters are queried or not) */ |
---|
170 | |
---|
171 | |
---|
172 | /*------------------------------------------------------------------------*/ |
---|
173 | |
---|
174 | |
---|
175 | int ss_inplev( void ); |
---|
176 | |
---|
177 | /* returns current input level */ |
---|
178 | |
---|
179 | |
---|
180 | /*------------------------------------------------------------------------*/ |
---|
181 | |
---|
182 | |
---|
183 | void ss_push( int ltc, int lgc, int lcc, SHFLAGS flg, int *status ); |
---|
184 | |
---|
185 | /* saves all command parameters and symbols of set 0 to a file |
---|
186 | * |
---|
187 | * parameters of routine |
---|
188 | * int ltc input; local text channels |
---|
189 | * int lgc input; local graphic channels |
---|
190 | * int lcc input; local console channels |
---|
191 | * SHFLAGS flg; input; local flags |
---|
192 | * int *status; output; return status |
---|
193 | */ |
---|
194 | |
---|
195 | |
---|
196 | /*------------------------------------------------------------------------*/ |
---|
197 | |
---|
198 | |
---|
199 | void ss_pop( int *ltc, int *lgc, int *lcc, SHFLAGS *flg, int *status ); |
---|
200 | |
---|
201 | /* restores all command parameters and symbols of set 0 from a file |
---|
202 | * |
---|
203 | * parameters of routine |
---|
204 | * int *ltc; output; local text channels |
---|
205 | * int *lgc; output; local graphic channels |
---|
206 | * int *lcc; output; local console channels |
---|
207 | * SHFLAGS *flg; output; local processing flags |
---|
208 | * int *status; output; return status |
---|
209 | */ |
---|
210 | |
---|
211 | |
---|
212 | /*------------------------------------------------------------------------*/ |
---|
213 | |
---|
214 | |
---|
215 | void ss_crefilnam( int cnt, char *name ); |
---|
216 | |
---|
217 | /* creates save file name */ |
---|
218 | |
---|
219 | /* parameters of routine */ |
---|
220 | /* int cnt; input; number of file */ |
---|
221 | /* char *name; output; filename created */ |
---|
222 | |
---|
223 | |
---|
224 | /*------------------------------------------------------------------------*/ |
---|
225 | |
---|
226 | |
---|
227 | void ss_dump( FILE *fp, int set ); |
---|
228 | |
---|
229 | /* dumps symbols or cmdpars to file */ |
---|
230 | |
---|
231 | /* parameters of routine */ |
---|
232 | /* FILE *fp; input; output file */ |
---|
233 | /* int set; input; set number (if -1 dump cmdpars) */ |
---|
234 | |
---|
235 | |
---|
236 | /*------------------------------------------------------------------------*/ |
---|
237 | |
---|
238 | #endif /* __SSUSRDEF */ |
---|