| 1 |
/* |
| 2 |
* Copyright(C) 1999-2021, 2023 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 |
/* sdcgi - standard single device cgi routines |
| 9 |
* 27 Oct 1989 - last date modified |
| 10 |
* %Z% %M% version %I% of %G% %U% |
| 11 |
* Pat McGee, [email protected] |
| 12 |
*/ |
| 13 |
/* History: |
| 14 |
* 27 Oct 1989,TLC: changed function id names to _FN |
| 15 |
*/ |
| 16 |
|
| 17 |
#include "sdcgi.h" |
| 18 |
#include "cgi.h" |
| 19 |
#include "fortyp.h" |
| 20 |
#include "stdtyp.h" |
| 21 |
#include <stdio.h> |
| 22 |
|
| 23 |
/* ifdefc.h - ifdef file for cgi routines |
| 24 |
* This file is used to define the system dependent ways C is |
| 25 |
* called from FORTRAN. Underscores are used by default. |
| 26 |
* |
| 27 |
* SUN DEC/ULTRIX ALLIANT : C routines must have underscores |
| 28 |
* SGI CONVEX : C routines must have underscores |
| 29 |
* |
| 30 |
* VAX HP IBM/aix : C routines do not have underscores |
| 31 |
* |
| 32 |
* CRAY/UNICOS : C routines must be capitalized, |
| 33 |
* and no underscores |
| 34 |
* |
| 35 |
* This file also defines the system dependent macro "f2cchar". |
| 36 |
* |
| 37 |
* This include file is used by SDCGI.C and VDICGI.C |
| 38 |
*/ |
| 39 |
|
| 40 |
#if defined(ADDC_) |
| 41 |
#endif |
| 42 |
#if !defined(CRA) && !defined(ADDC_) && !defined(COUGAR) |
| 43 |
#define ci_ ci |
| 44 |
#define ct_ ct |
| 45 |
#define cxdfac_ cxdfac |
| 46 |
#define cpds_ cpds |
| 47 |
#define cendpg_ cendpg |
| 48 |
#define cbc_ cbc |
| 49 |
#define cvdcx_ cvdcx |
| 50 |
#define cv_ cv |
| 51 |
#define ccl_ ccl |
| 52 |
#define cdqerr_ cdqerr |
| 53 |
#define cerhct_ cerhct |
| 54 |
#define ccixp_ ccixp |
| 55 |
#define cesc1_ cesc1 |
| 56 |
#define cesc2_ cesc2 |
| 57 |
#define cqid_ cqid |
| 58 |
#define cqd_ cqd |
| 59 |
#define clf_ clf |
| 60 |
#define clpr_ clpr |
| 61 |
#define cqsp_ cqsp |
| 62 |
#define clesc_ clesc |
| 63 |
#define cqp_ cqp |
| 64 |
#define cpl_ cpl |
| 65 |
#define cdjpl_ cdjpl |
| 66 |
#define cdscl_ cdscl |
| 67 |
#define cqcl_ cqcl |
| 68 |
#define cpm_ cpm |
| 69 |
#define ctx1_ ctx1 |
| 70 |
#define ctx2_ ctx2 |
| 71 |
#define cpg_ cpg |
| 72 |
#define cca_ cca |
| 73 |
#define clnt_ clnt |
| 74 |
#define clnw_ clnw |
| 75 |
#define clnc_ clnc |
| 76 |
#define cmkt_ cmkt |
| 77 |
#define cmkc_ cmkc |
| 78 |
#define ctxp_ ctxp |
| 79 |
#define ctxc_ ctxc |
| 80 |
#define cchh_ cchh |
| 81 |
#define ccho_ ccho |
| 82 |
#define cis_ cis |
| 83 |
#define cflc_ cflc |
| 84 |
#define ccsm_ ccsm |
| 85 |
#define cct_ cct |
| 86 |
#define cgtxx1_ cgtxx1 |
| 87 |
#define cgtxx2_ cgtxx2 |
| 88 |
#define cqprl_ cqprl |
| 89 |
#define cqln_ cqln |
| 90 |
#define cqlnt_ cqlnt |
| 91 |
#define cqchh1_ cqchh1 |
| 92 |
#define cqchh2_ cqchh2 |
| 93 |
#define cqfl_ cqfl |
| 94 |
#define cqc_ cqc |
| 95 |
#define cqlna_ cqlna |
| 96 |
#define cqtxa_ cqtxa |
| 97 |
#define cqcte_ cqcte |
| 98 |
#define cili_ cili |
| 99 |
#define crqlc_ crqlc |
| 100 |
#define cpxa_ cpxa |
| 101 |
#endif |
| 102 |
#if defined(CRA) |
| 103 |
#define ci_ CI |
| 104 |
#define ct_ CT |
| 105 |
#define cxdfac_ CXDFAC |
| 106 |
#define cpds_ CPDS |
| 107 |
#define cendpg_ CENDPG |
| 108 |
#define cbc_ CBC |
| 109 |
#define cvdcx_ CVDCX |
| 110 |
#define cv_ CV |
| 111 |
#define ccl_ CCL |
| 112 |
#define cdqerr_ CDQERR |
| 113 |
#define cerhct_ CERHCT |
| 114 |
#define ccixp_ CCIXP |
| 115 |
#define cesc1_ CESC1 |
| 116 |
#define cesc2_ CESC2 |
| 117 |
#define cqid_ CQID |
| 118 |
#define cqd_ CQD |
| 119 |
#define clf_ CLF |
| 120 |
#define clpr_ CLPR |
| 121 |
#define cqsp_ CQSP |
| 122 |
#define clesc_ CLESC |
| 123 |
#define cqp_ CQP |
| 124 |
#define cpl_ CPL |
| 125 |
#define cdjpl_ CDJPL |
| 126 |
#define cdscl_ CDSCL |
| 127 |
#define cqcl_ CQCL |
| 128 |
#define cpm_ CPM |
| 129 |
#define ctx1_ CTX1 |
| 130 |
#define ctx2_ CTX2 |
| 131 |
#define cpg_ CPG |
| 132 |
#define cca_ CCA |
| 133 |
#define clnt_ CLNT |
| 134 |
#define clnw_ CLNW |
| 135 |
#define clnc_ CLNC |
| 136 |
#define cmkt_ CMKT |
| 137 |
#define cmkc_ CMKC |
| 138 |
#define ctxp_ CTXP |
| 139 |
#define ctxc_ CTXC |
| 140 |
#define cchh_ CCHH |
| 141 |
#define ccho_ CCHO |
| 142 |
#define cis_ CIS |
| 143 |
#define cflc_ CFLC |
| 144 |
#define ccsm_ CCSM |
| 145 |
#define cct_ CCT |
| 146 |
#define cgtxx1_ CGTXX1 |
| 147 |
#define cgtxx2_ CGTXX2 |
| 148 |
#define cqprl_ CQPRL |
| 149 |
#define cqln_ CQLN |
| 150 |
#define cqlnt_ CQLNT |
| 151 |
#define cqchh1_ CQCHH1 |
| 152 |
#define cqchh2_ CQCHH2 |
| 153 |
#define cqfl_ CQFL |
| 154 |
#define cqc_ CQC |
| 155 |
#define cqlna_ CQLNA |
| 156 |
#define cqtxa_ CQTXA |
| 157 |
#define cqcte_ CQCTE |
| 158 |
#define cili_ CILI |
| 159 |
#define crqlc_ CRQLC |
| 160 |
#define cpxa_ CPXA |
| 161 |
#endif |
| 162 |
#ifdef Build64 |
| 163 |
#if defined(ADDC_) |
| 164 |
#define cesc1_ cesc14_ |
| 165 |
#define ctx1_ ctx14_ |
| 166 |
#define cgtxx1_ cgtxx14_ |
| 167 |
#define cqchh1_ cqchh14_ |
| 168 |
#else |
| 169 |
#define cesc1 cesc14 |
| 170 |
#define ctx1 ctx14 |
| 171 |
#define cgtxx1 cgtxx14 |
| 172 |
#define cqchh1 cqchh14 |
| 173 |
#endif |
| 174 |
#endif |
| 175 |
|
| 176 |
/* f2cchar macro definition */ |
| 177 |
#if !defined(CRA) && !defined(ardent) |
| 178 |
#define f2cchar(fptr) (fptr) |
| 179 |
#endif /* default, CRA and ardent are exceptions */ |
| 180 |
#if defined(CRA) && !defined(ardent) |
| 181 |
#include <fortran.h> |
| 182 |
#define f2cchar(fptr) (_fcdtocp((_fcd)fptr)) |
| 183 |
#endif |
| 184 |
#if defined(ardent) |
| 185 |
struct FortranStr |
| 186 |
{ |
| 187 |
char *str; |
| 188 |
int len; |
| 189 |
char id; |
| 190 |
}; |
| 191 |
|
| 192 |
typedef struct FortranStr Fortran_Str; /* Make the declarations in the */ |
| 193 |
/* source more tractable. */ |
| 194 |
#define f2cchar(fptr) (fptr->str) |
| 195 |
#endif /* ardent */ |
| 196 |
|
| 197 |
/* end ifdefc.h */ |
| 198 |
|
| 199 |
/******************************************************************************/ |
| 200 |
/******************************************************************************/ |
| 201 |
/* */ |
| 202 |
/* Standard CGI functions */ |
| 203 |
/* */ |
| 204 |
/******************************************************************************/ |
| 205 |
/******************************************************************************/ |
| 206 |
|
| 207 |
/******************************************************************************/ |
| 208 |
/* */ |
| 209 |
/* Global variables */ |
| 210 |
/* */ |
| 211 |
/******************************************************************************/ |
| 212 |
/* these are also used in mdcgi.c, where they are externs */ |
| 213 |
device_struct devices[MAX_DEVICES]; /* list of currently initialized */ |
| 214 |
anything *in_params[MAX_IN_PARAMS]; /* params sent to driver */ |
| 215 |
short num_devices = 0; /* how many items in devices*/ |
| 216 |
anything *sol_surf = NULL; /* current solicitation surface, */ |
| 217 |
|
| 218 |
/******************************************************************************/ |
| 219 |
/* */ |
| 220 |
/* ci - initialize CGI */ |
| 221 |
/* */ |
| 222 |
/******************************************************************************/ |
| 223 |
void ci_(f_integer *pds) |
| 224 |
{ |
| 225 |
static short func_id = CI_FN; |
| 226 |
|
| 227 |
if (num_devices == 0) { |
| 228 |
/* find the default device and initialize it */ |
| 229 |
cgi_def_ini(); |
| 230 |
} /* end if no initialized devices */ |
| 231 |
|
| 232 |
/* set up parameter array */ |
| 233 |
in_params[0] = (anything *)&func_id; |
| 234 |
in_params[1] = (anything *)pds; |
| 235 |
|
| 236 |
for (short i = 0; i < num_devices; ++i) { |
| 237 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 238 |
} /* end for all devices */ |
| 239 |
} /* end CI */ |
| 240 |
|
| 241 |
/******************************************************************************/ |
| 242 |
/* */ |
| 243 |
/* ct - terminate CGI */ |
| 244 |
/* */ |
| 245 |
/******************************************************************************/ |
| 246 |
void ct_(void) |
| 247 |
{ |
| 248 |
static short func_id = CT_FN; |
| 249 |
|
| 250 |
/* set up parameter array */ |
| 251 |
in_params[0] = (anything *)&func_id; |
| 252 |
|
| 253 |
for (short i = 0; i < num_devices; ++i) { |
| 254 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 255 |
} /* end for all devices */ |
| 256 |
} /* end ct */ |
| 257 |
|
| 258 |
/******************************************************************************/ |
| 259 |
/* */ |
| 260 |
/* cxdfac - execute deferred actions */ |
| 261 |
/* */ |
| 262 |
/******************************************************************************/ |
| 263 |
void cxdfac_(void) |
| 264 |
{ |
| 265 |
static short func_id = CXDFAC_FN; |
| 266 |
|
| 267 |
/* set up parameter array */ |
| 268 |
in_params[0] = (anything *)&func_id; |
| 269 |
|
| 270 |
for (short i = 0; i < num_devices; ++i) { |
| 271 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 272 |
} /* end for all devices */ |
| 273 |
} /* end cxdfac */ |
| 274 |
|
| 275 |
/******************************************************************************/ |
| 276 |
/* */ |
| 277 |
/* cpds - prepare drawing surface */ |
| 278 |
/* */ |
| 279 |
/******************************************************************************/ |
| 280 |
void cpds_(f_integer *clear) |
| 281 |
{ |
| 282 |
static short func_id = CPDS_FN; |
| 283 |
|
| 284 |
/* set up parameter array */ |
| 285 |
in_params[0] = (anything *)&func_id; |
| 286 |
in_params[1] = (anything *)clear; |
| 287 |
|
| 288 |
for (short i = 0; i < num_devices; ++i) { |
| 289 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 290 |
} /* end for all devices */ |
| 291 |
} /* end cpds */ |
| 292 |
|
| 293 |
/******************************************************************************/ |
| 294 |
/* */ |
| 295 |
/* cendpg - end page */ |
| 296 |
/* */ |
| 297 |
/******************************************************************************/ |
| 298 |
void cendpg_(void) |
| 299 |
{ |
| 300 |
static short func_id = CENDPG_FN; |
| 301 |
|
| 302 |
/* set up parameter array */ |
| 303 |
in_params[0] = (anything *)&func_id; |
| 304 |
|
| 305 |
for (short i = 0; i < num_devices; ++i) { |
| 306 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 307 |
} /* end for all devices */ |
| 308 |
} /* end cendpg */ |
| 309 |
|
| 310 |
/******************************************************************************/ |
| 311 |
/* */ |
| 312 |
/* cbc - set background color */ |
| 313 |
/* */ |
| 314 |
/******************************************************************************/ |
| 315 |
void cbc_(f_integer *red, f_integer *green, f_integer *blue) |
| 316 |
{ |
| 317 |
static short func_id = CBC_FN; |
| 318 |
|
| 319 |
/* set up parameter array */ |
| 320 |
in_params[0] = (anything *)&func_id; |
| 321 |
in_params[1] = (anything *)red; |
| 322 |
in_params[2] = (anything *)green; |
| 323 |
in_params[3] = (anything *)blue; |
| 324 |
|
| 325 |
for (short i = 0; i < num_devices; ++i) { |
| 326 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 327 |
} /* end for all devices */ |
| 328 |
} /* end cbc */ |
| 329 |
|
| 330 |
/******************************************************************************/ |
| 331 |
/* */ |
| 332 |
/* cvdcx - VDC Extent */ |
| 333 |
/* */ |
| 334 |
/******************************************************************************/ |
| 335 |
void cvdcx_(f_real *x1, f_real *y1, f_real *x2, f_real *y2) |
| 336 |
{ |
| 337 |
static short func_id = CVDCX_FN; |
| 338 |
|
| 339 |
/* set up parameter array */ |
| 340 |
in_params[0] = (anything *)&func_id; |
| 341 |
in_params[1] = (anything *)x1; |
| 342 |
in_params[2] = (anything *)y1; |
| 343 |
in_params[3] = (anything *)x2; |
| 344 |
in_params[4] = (anything *)y2; |
| 345 |
|
| 346 |
for (short i = 0; i < num_devices; ++i) { |
| 347 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 348 |
} /* end for all devices */ |
| 349 |
} /* end cvdcx */ |
| 350 |
|
| 351 |
/******************************************************************************/ |
| 352 |
/* */ |
| 353 |
/* cv - Device Viewport */ |
| 354 |
/* */ |
| 355 |
/******************************************************************************/ |
| 356 |
void cv_(f_real *x1, f_real *y1, f_real *x2, f_real *y2) |
| 357 |
{ |
| 358 |
static short func_id = CV_FN; |
| 359 |
|
| 360 |
/* set up parameter array */ |
| 361 |
in_params[0] = (anything *)&func_id; |
| 362 |
in_params[1] = (anything *)x1; |
| 363 |
in_params[2] = (anything *)y1; |
| 364 |
in_params[3] = (anything *)x2; |
| 365 |
in_params[4] = (anything *)y2; |
| 366 |
|
| 367 |
for (short i = 0; i < num_devices; ++i) { |
| 368 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 369 |
} /* end for all devices */ |
| 370 |
} /* end cv */ |
| 371 |
|
| 372 |
/******************************************************************************/ |
| 373 |
/* */ |
| 374 |
/* ccl - Clip Indicator */ |
| 375 |
/* */ |
| 376 |
/******************************************************************************/ |
| 377 |
void ccl_(f_integer *clipi) |
| 378 |
{ |
| 379 |
static short func_id = CCL_FN; |
| 380 |
|
| 381 |
/* set up parameter array */ |
| 382 |
in_params[0] = (anything *)&func_id; |
| 383 |
in_params[1] = (anything *)clipi; |
| 384 |
|
| 385 |
for (short i = 0; i < num_devices; ++i) { |
| 386 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 387 |
} /* end for all devices */ |
| 388 |
} /* end ccl */ |
| 389 |
|
| 390 |
/******************************************************************************/ |
| 391 |
/* */ |
| 392 |
/* cdscl - Drawing Surface Clip Indicator */ |
| 393 |
/* */ |
| 394 |
/******************************************************************************/ |
| 395 |
void cdscl_(f_integer *clipi) |
| 396 |
{ |
| 397 |
static short func_id = CDSCL_FN; |
| 398 |
|
| 399 |
/* set up parameter array */ |
| 400 |
in_params[0] = (anything *)&func_id; |
| 401 |
in_params[1] = (anything *)clipi; |
| 402 |
|
| 403 |
for (short i = 0; i < num_devices; ++i) { |
| 404 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 405 |
} /* end for all devices */ |
| 406 |
} /* end cdsl */ |
| 407 |
|
| 408 |
/******************************************************************************/ |
| 409 |
/* */ |
| 410 |
/* cdqerr - dequeue error reports */ |
| 411 |
/* */ |
| 412 |
/******************************************************************************/ |
| 413 |
void cdqerr_(f_integer *nreq, f_integer *vstat, f_integer *nrem, f_integer *nret, f_integer *errcl, |
| 414 |
f_integer *errnm, f_integer *funcid) |
| 415 |
{ |
| 416 |
static short func_id = CDQERR_FN; |
| 417 |
short surf_found = 0; /* which active_surface was found */ |
| 418 |
|
| 419 |
/* set up parameter array */ |
| 420 |
in_params[0] = (anything *)&func_id; |
| 421 |
in_params[1] = (anything *)nreq; |
| 422 |
in_params[2] = (anything *)vstat; |
| 423 |
in_params[3] = (anything *)nrem; |
| 424 |
in_params[4] = (anything *)nret; |
| 425 |
in_params[5] = (anything *)errcl; |
| 426 |
in_params[6] = (anything *)errnm; |
| 427 |
in_params[7] = (anything *)funcid; |
| 428 |
|
| 429 |
/* search active devices for this surface */ |
| 430 |
short dev_found = -1; |
| 431 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 432 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 433 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 434 |
dev_found = dev; |
| 435 |
surf_found = surf; |
| 436 |
break; |
| 437 |
} /* end if found on list */ |
| 438 |
} /* end for */ |
| 439 |
} /* end for all devices */ |
| 440 |
|
| 441 |
if (dev_found != -1) { |
| 442 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 443 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 444 |
} /* end if surface not found */ |
| 445 |
|
| 446 |
} /* end cdqerr */ |
| 447 |
|
| 448 |
/******************************************************************************/ |
| 449 |
/* */ |
| 450 |
/* cerhct - error handling control */ |
| 451 |
/* */ |
| 452 |
/******************************************************************************/ |
| 453 |
void cerhct_(f_integer *n, f_integer *erclas, f_integer *hflag) |
| 454 |
{ |
| 455 |
static short func_id = CERHCT_FN; |
| 456 |
|
| 457 |
/* set up parameter array */ |
| 458 |
in_params[0] = (anything *)&func_id; |
| 459 |
in_params[1] = (anything *)n; |
| 460 |
in_params[2] = (anything *)erclas; |
| 461 |
in_params[3] = (anything *)hflag; |
| 462 |
|
| 463 |
for (short i = 0; i < num_devices; ++i) { |
| 464 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 465 |
} /* end for all devices */ |
| 466 |
} /* end cerht */ |
| 467 |
|
| 468 |
/******************************************************************************/ |
| 469 |
/* */ |
| 470 |
/* ccixp - color index precision */ |
| 471 |
/* */ |
| 472 |
/******************************************************************************/ |
| 473 |
void ccixp_(f_integer *cip) |
| 474 |
{ |
| 475 |
static short func_id = CCIXP_FN; |
| 476 |
|
| 477 |
/* set up parameter array */ |
| 478 |
in_params[0] = (anything *)&func_id; |
| 479 |
in_params[1] = (anything *)cip; |
| 480 |
|
| 481 |
for (short i = 0; i < num_devices; ++i) { |
| 482 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 483 |
} /* end for all devices */ |
| 484 |
} /* end ccixp */ |
| 485 |
|
| 486 |
/******************************************************************************/ |
| 487 |
/* */ |
| 488 |
/* cesc - escape function */ |
| 489 |
/* */ |
| 490 |
/******************************************************************************/ |
| 491 |
void cesc1_(f_integer *funcid, f_integer *ldr, char *data, f_integer *drec_size) |
| 492 |
{ |
| 493 |
char *data1; |
| 494 |
static short func_id = CESC_FN; |
| 495 |
|
| 496 |
data1 = f2cchar(data); /* convert Fortran char ptr to C ptr */ |
| 497 |
|
| 498 |
if (num_devices == 0) { |
| 499 |
/* find the default device and initialize it */ |
| 500 |
cgi_def_ini(); |
| 501 |
} /* end if no initialized devices */ |
| 502 |
|
| 503 |
/* set up parameter array */ |
| 504 |
in_params[0] = (anything *)&func_id; |
| 505 |
in_params[1] = (anything *)funcid; |
| 506 |
in_params[2] = (anything *)ldr; |
| 507 |
in_params[3] = (anything *)data1; |
| 508 |
in_params[4] = (anything *)drec_size; |
| 509 |
|
| 510 |
for (short i = 0; i < num_devices; ++i) { |
| 511 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 512 |
} /* end for all devices */ |
| 513 |
} /* end cesc */ |
| 514 |
|
| 515 |
/******************************************************************************/ |
| 516 |
/* */ |
| 517 |
/* cqid - inquire device identification */ |
| 518 |
/* */ |
| 519 |
/******************************************************************************/ |
| 520 |
void cqid_(f_integer *maxchr, f_integer *vstat, f_integer *dclass, char *devid) |
| 521 |
{ |
| 522 |
static short func_id = CQID_FN; |
| 523 |
short surf_found = 0; /* which active_surface was found */ |
| 524 |
|
| 525 |
/* set up parameter array */ |
| 526 |
in_params[0] = (anything *)&func_id; |
| 527 |
in_params[1] = (anything *)maxchr; |
| 528 |
in_params[2] = (anything *)vstat; |
| 529 |
in_params[3] = (anything *)dclass; |
| 530 |
in_params[4] = (anything *)devid; |
| 531 |
|
| 532 |
/* search active devices for this surface */ |
| 533 |
short dev_found = -1; |
| 534 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 535 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 536 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 537 |
dev_found = dev; |
| 538 |
surf_found = surf; |
| 539 |
break; |
| 540 |
} /* end if found on list */ |
| 541 |
} /* end for */ |
| 542 |
} /* end for all devices */ |
| 543 |
|
| 544 |
if (dev_found != -1) { |
| 545 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 546 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 547 |
} /* end if surface not found */ |
| 548 |
|
| 549 |
} /* end cqid */ |
| 550 |
|
| 551 |
/******************************************************************************/ |
| 552 |
/* */ |
| 553 |
/* cqd - inquire device description */ |
| 554 |
/* */ |
| 555 |
/******************************************************************************/ |
| 556 |
void cqd_(f_integer *vstat, f_integer *hscopy, f_integer *disp, f_integer *bcolor, f_integer *dynbc, |
| 557 |
f_integer *dynvdm, f_integer *dx1, f_integer *dy1, f_integer *dx2, f_integer *dy2, |
| 558 |
f_real *width, f_real *height, f_integer *pixloc) |
| 559 |
{ |
| 560 |
static short func_id = CQD_FN; |
| 561 |
short surf_found = 0; /* which active_surface was found */ |
| 562 |
|
| 563 |
/* set up parameter array */ |
| 564 |
in_params[0] = (anything *)&func_id; |
| 565 |
in_params[1] = (anything *)vstat; |
| 566 |
in_params[2] = (anything *)hscopy; |
| 567 |
in_params[3] = (anything *)disp; |
| 568 |
in_params[4] = (anything *)bcolor; |
| 569 |
in_params[5] = (anything *)dynbc; |
| 570 |
in_params[6] = (anything *)dynvdm; |
| 571 |
in_params[7] = (anything *)dx1; |
| 572 |
in_params[8] = (anything *)dy1; |
| 573 |
in_params[9] = (anything *)dx2; |
| 574 |
in_params[10] = (anything *)dy2; |
| 575 |
in_params[11] = (anything *)width; |
| 576 |
in_params[12] = (anything *)height; |
| 577 |
in_params[13] = (anything *)pixloc; |
| 578 |
|
| 579 |
/* search active devices for this surface */ |
| 580 |
short dev_found = -1; |
| 581 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 582 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 583 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 584 |
dev_found = dev; |
| 585 |
surf_found = surf; |
| 586 |
break; |
| 587 |
} /* end if found on list */ |
| 588 |
} /* end for */ |
| 589 |
} /* end for all devices */ |
| 590 |
|
| 591 |
if (dev_found != -1) { |
| 592 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 593 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 594 |
} /* end if surface not found */ |
| 595 |
|
| 596 |
} /* end cqd */ |
| 597 |
|
| 598 |
/******************************************************************************/ |
| 599 |
/* */ |
| 600 |
/* clf - Lookup Function Support */ |
| 601 |
/* */ |
| 602 |
/******************************************************************************/ |
| 603 |
void clf_(f_integer *n, f_integer *funccl, f_integer *funcid, f_integer *vstat, f_integer *supprt) |
| 604 |
{ |
| 605 |
static short func_id = CLF_FN; |
| 606 |
short surf_found = 0; /* which active_surface was found */ |
| 607 |
|
| 608 |
/* set up parameter array */ |
| 609 |
in_params[0] = (anything *)&func_id; |
| 610 |
in_params[1] = (anything *)n; |
| 611 |
in_params[2] = (anything *)funccl; |
| 612 |
in_params[3] = (anything *)funcid; |
| 613 |
in_params[4] = (anything *)vstat; |
| 614 |
in_params[5] = (anything *)supprt; |
| 615 |
|
| 616 |
/* search active devices for this surface */ |
| 617 |
short dev_found = -1; |
| 618 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 619 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 620 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 621 |
dev_found = dev; |
| 622 |
surf_found = surf; |
| 623 |
break; |
| 624 |
} /* end if found on list */ |
| 625 |
} /* end for */ |
| 626 |
} /* end for all devices */ |
| 627 |
|
| 628 |
if (dev_found != -1) { |
| 629 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 630 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 631 |
} /* end if surface not found */ |
| 632 |
|
| 633 |
} /* end clf */ |
| 634 |
|
| 635 |
/******************************************************************************/ |
| 636 |
/* */ |
| 637 |
/* clpr - Lookup Profile Support */ |
| 638 |
/* */ |
| 639 |
/******************************************************************************/ |
| 640 |
void clpr_(f_integer *n, char *profid, f_integer *profid_size, f_integer *vstat, f_integer *supprt) |
| 641 |
{ |
| 642 |
static short func_id = CLPR_FN; |
| 643 |
short surf_found = 0; /* which active_surface was found */ |
| 644 |
|
| 645 |
/* set up parameter array */ |
| 646 |
in_params[0] = (anything *)&func_id; |
| 647 |
in_params[1] = (anything *)n; |
| 648 |
in_params[2] = (anything *)profid; |
| 649 |
in_params[3] = (anything *)profid_size; |
| 650 |
in_params[4] = (anything *)vstat; |
| 651 |
in_params[5] = (anything *)supprt; |
| 652 |
|
| 653 |
/* search active devices for this surface */ |
| 654 |
short dev_found = -1; |
| 655 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 656 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 657 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 658 |
dev_found = dev; |
| 659 |
surf_found = surf; |
| 660 |
break; |
| 661 |
} /* end if found on list */ |
| 662 |
} /* end for */ |
| 663 |
} /* end for all devices */ |
| 664 |
|
| 665 |
if (dev_found != -1) { |
| 666 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 667 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 668 |
} /* end if surface not found */ |
| 669 |
|
| 670 |
} /* end clpr */ |
| 671 |
|
| 672 |
/******************************************************************************/ |
| 673 |
/* */ |
| 674 |
/* cqsp - inquire supported precisions */ |
| 675 |
/* */ |
| 676 |
/******************************************************************************/ |
| 677 |
void cqsp_(f_integer *vstat, f_integer *nvip, f_integer *vip, f_integer *nvrp, f_integer *vrfmt, |
| 678 |
f_integer *vrexp, f_integer *vrfrac, f_integer *nip, f_integer *ip, f_integer *nrp, |
| 679 |
f_integer *rfmt, f_integer *rexp, f_integer *rfrac, f_integer *nixp, f_integer *ixp, |
| 680 |
f_integer *ncp, f_integer *cp, f_integer *ncixp, f_integer *cixp) |
| 681 |
{ |
| 682 |
static short func_id = CQSP_FN; |
| 683 |
short surf_found = 0; /* which active_surface was found */ |
| 684 |
|
| 685 |
/* set up parameter array */ |
| 686 |
in_params[0] = (anything *)&func_id; |
| 687 |
in_params[1] = (anything *)vstat; |
| 688 |
in_params[2] = (anything *)nvip; |
| 689 |
in_params[3] = (anything *)vip; |
| 690 |
in_params[4] = (anything *)nvrp; |
| 691 |
in_params[5] = (anything *)vrfmt; |
| 692 |
in_params[6] = (anything *)vrexp; |
| 693 |
in_params[7] = (anything *)vrfrac; |
| 694 |
in_params[8] = (anything *)nip; |
| 695 |
in_params[9] = (anything *)ip; |
| 696 |
in_params[10] = (anything *)nrp; |
| 697 |
in_params[11] = (anything *)rfmt; |
| 698 |
in_params[12] = (anything *)rexp; |
| 699 |
in_params[13] = (anything *)rfrac; |
| 700 |
in_params[14] = (anything *)nixp; |
| 701 |
in_params[15] = (anything *)ixp; |
| 702 |
in_params[16] = (anything *)ncp; |
| 703 |
in_params[17] = (anything *)cp; |
| 704 |
in_params[18] = (anything *)ncixp; |
| 705 |
in_params[19] = (anything *)cixp; |
| 706 |
|
| 707 |
/* search active devices for this surface */ |
| 708 |
short dev_found = -1; |
| 709 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 710 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 711 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 712 |
dev_found = dev; |
| 713 |
surf_found = surf; |
| 714 |
break; |
| 715 |
} /* end if found on list */ |
| 716 |
} /* end for */ |
| 717 |
} /* end for all devices */ |
| 718 |
|
| 719 |
if (dev_found != -1) { |
| 720 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 721 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 722 |
} /* end if surface not found */ |
| 723 |
|
| 724 |
} /* end cqsp */ |
| 725 |
|
| 726 |
/******************************************************************************/ |
| 727 |
/* */ |
| 728 |
/* clesc - Lookup Escape Support */ |
| 729 |
/* */ |
| 730 |
/******************************************************************************/ |
| 731 |
void clesc_(f_integer *n, f_integer *escid, f_integer *vstat, f_integer *supprt) |
| 732 |
{ |
| 733 |
static short func_id = CLESC_FN; |
| 734 |
short surf_found = 0; /* which active_surface was found */ |
| 735 |
|
| 736 |
/* set up parameter array */ |
| 737 |
in_params[0] = (anything *)&func_id; |
| 738 |
in_params[1] = (anything *)n; |
| 739 |
in_params[2] = (anything *)escid; |
| 740 |
in_params[3] = (anything *)vstat; |
| 741 |
in_params[4] = (anything *)supprt; |
| 742 |
|
| 743 |
/* search active devices for this surface */ |
| 744 |
short dev_found = -1; |
| 745 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 746 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 747 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 748 |
dev_found = dev; |
| 749 |
surf_found = surf; |
| 750 |
break; |
| 751 |
} /* end if found on list */ |
| 752 |
} /* end for */ |
| 753 |
} /* end for all devices */ |
| 754 |
|
| 755 |
if (dev_found != -1) { |
| 756 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 757 |
temp_surface[0] = devices[dev_found].statelist[surf_found]; |
| 758 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 759 |
} /* end if surface not found */ |
| 760 |
|
| 761 |
} /* end clesc */ |
| 762 |
|
| 763 |
/******************************************************************************/ |
| 764 |
/* */ |
| 765 |
/* cqp - inquire current precisions */ |
| 766 |
/* */ |
| 767 |
/******************************************************************************/ |
| 768 |
void cqp_(f_integer *vstat, f_integer *vip, f_integer *vrfmt, f_integer *vrexp, f_integer *vrfrac, |
| 769 |
f_integer *ip, f_integer *rfmt, f_integer *rexp, f_integer *rfrac, f_integer *ixp, |
| 770 |
f_integer *cp, f_integer *cixp) |
| 771 |
{ |
| 772 |
static short func_id = CQP_FN; |
| 773 |
short surf_found = 0; /* which active_surface was found */ |
| 774 |
|
| 775 |
/* set up parameter array */ |
| 776 |
in_params[0] = (anything *)&func_id; |
| 777 |
in_params[1] = (anything *)vstat; |
| 778 |
in_params[2] = (anything *)vip; |
| 779 |
in_params[3] = (anything *)vrfmt; |
| 780 |
in_params[4] = (anything *)vrexp; |
| 781 |
in_params[5] = (anything *)vrfrac; |
| 782 |
in_params[6] = (anything *)ip; |
| 783 |
in_params[7] = (anything *)rfmt; |
| 784 |
in_params[8] = (anything *)rexp; |
| 785 |
in_params[9] = (anything *)rfrac; |
| 786 |
in_params[10] = (anything *)ixp; |
| 787 |
in_params[11] = (anything *)cp; |
| 788 |
in_params[12] = (anything *)cixp; |
| 789 |
|
| 790 |
/* search active devices for this surface */ |
| 791 |
short dev_found = -1; |
| 792 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 793 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 794 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 795 |
dev_found = dev; |
| 796 |
surf_found = surf; |
| 797 |
break; |
| 798 |
} /* end if found on list */ |
| 799 |
} /* end for */ |
| 800 |
} /* end for all devices */ |
| 801 |
|
| 802 |
if (dev_found != -1) { |
| 803 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 804 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 805 |
} /* end if surface not found */ |
| 806 |
|
| 807 |
} /* end cqp */ |
| 808 |
|
| 809 |
/******************************************************************************/ |
| 810 |
/* */ |
| 811 |
/* cqcl - inquire clipping */ |
| 812 |
/* */ |
| 813 |
/******************************************************************************/ |
| 814 |
void cqcl_(f_integer *vstat, f_integer *clip1, f_integer *clipr, f_integer *sclip1, |
| 815 |
f_integer *sclipr) |
| 816 |
{ |
| 817 |
static short func_id = CQCL_FN; |
| 818 |
short surf_found = 0; /* which active_surface was found */ |
| 819 |
|
| 820 |
/* set up parameter array */ |
| 821 |
in_params[0] = (anything *)&func_id; |
| 822 |
in_params[1] = (anything *)vstat; |
| 823 |
in_params[2] = (anything *)clip1; |
| 824 |
in_params[3] = (anything *)clipr; |
| 825 |
in_params[4] = (anything *)sclip1; |
| 826 |
in_params[5] = (anything *)sclipr; |
| 827 |
|
| 828 |
/* search active devices for this surface */ |
| 829 |
short dev_found = -1; |
| 830 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 831 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 832 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 833 |
dev_found = dev; |
| 834 |
surf_found = surf; |
| 835 |
break; |
| 836 |
} /* end if found on list */ |
| 837 |
} /* end for */ |
| 838 |
} /* end for all devices */ |
| 839 |
|
| 840 |
if (dev_found != -1) { |
| 841 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 842 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 843 |
} /* end if surface not found */ |
| 844 |
|
| 845 |
} /* end cqcl */ |
| 846 |
|
| 847 |
/******************************************************************************/ |
| 848 |
/* */ |
| 849 |
/* cpl - polyline */ |
| 850 |
/* */ |
| 851 |
/******************************************************************************/ |
| 852 |
void cpl_(f_integer *np, f_real *px, f_real *py) |
| 853 |
{ |
| 854 |
static short func_id = CPL_FN; |
| 855 |
|
| 856 |
/* set up parameter array */ |
| 857 |
in_params[0] = (anything *)&func_id; |
| 858 |
in_params[1] = (anything *)np; |
| 859 |
in_params[2] = (anything *)px; |
| 860 |
in_params[3] = (anything *)py; |
| 861 |
|
| 862 |
for (short i = 0; i < num_devices; ++i) { |
| 863 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 864 |
} /* end for all devices */ |
| 865 |
} /* end cpl */ |
| 866 |
|
| 867 |
/******************************************************************************/ |
| 868 |
/* */ |
| 869 |
/* cdjpl - disjoint polyline */ |
| 870 |
/* */ |
| 871 |
/******************************************************************************/ |
| 872 |
void cdjpl_(f_integer *np, f_real *px, f_real *py) |
| 873 |
{ |
| 874 |
static short func_id = CDJPL_FN; |
| 875 |
|
| 876 |
/* set up parameter array */ |
| 877 |
in_params[0] = (anything *)&func_id; |
| 878 |
in_params[1] = (anything *)np; |
| 879 |
in_params[2] = (anything *)px; |
| 880 |
in_params[3] = (anything *)py; |
| 881 |
|
| 882 |
for (short i = 0; i < num_devices; ++i) { |
| 883 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 884 |
} /* end for all devices */ |
| 885 |
} /* end cdjpl */ |
| 886 |
|
| 887 |
/******************************************************************************/ |
| 888 |
/* */ |
| 889 |
/* cpm - polymarker */ |
| 890 |
/* */ |
| 891 |
/******************************************************************************/ |
| 892 |
void cpm_(f_integer *np, f_real *px, f_real *py) |
| 893 |
{ |
| 894 |
static short func_id = CPM_FN; |
| 895 |
|
| 896 |
/* set up parameter array */ |
| 897 |
in_params[0] = (anything *)&func_id; |
| 898 |
in_params[1] = (anything *)np; |
| 899 |
in_params[2] = (anything *)px; |
| 900 |
in_params[3] = (anything *)py; |
| 901 |
|
| 902 |
for (short i = 0; i < num_devices; ++i) { |
| 903 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 904 |
} /* end for all devices */ |
| 905 |
} /* end cpm */ |
| 906 |
|
| 907 |
/******************************************************************************/ |
| 908 |
/* */ |
| 909 |
/* ctx - text */ |
| 910 |
/* */ |
| 911 |
/******************************************************************************/ |
| 912 |
void ctx1_(f_real *x, f_real *y, f_integer *flag, char *text, f_integer *text_size) |
| 913 |
{ |
| 914 |
char *text1; |
| 915 |
static short func_id = CTX_FN; |
| 916 |
|
| 917 |
text1 = f2cchar(text); /* convert Fortran char ptr to C ptr */ |
| 918 |
|
| 919 |
/* set up parameter array */ |
| 920 |
in_params[0] = (anything *)&func_id; |
| 921 |
in_params[1] = (anything *)x; |
| 922 |
in_params[2] = (anything *)y; |
| 923 |
in_params[3] = (anything *)flag; |
| 924 |
in_params[4] = (anything *)text1; |
| 925 |
in_params[5] = (anything *)text_size; |
| 926 |
|
| 927 |
for (short i = 0; i < num_devices; ++i) { |
| 928 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 929 |
} /* end for all devices */ |
| 930 |
} /* end ctx */ |
| 931 |
|
| 932 |
/******************************************************************************/ |
| 933 |
/* */ |
| 934 |
/* cpg - polygon */ |
| 935 |
/* */ |
| 936 |
/******************************************************************************/ |
| 937 |
void cpg_(f_integer *np, f_real *px, f_real *py) |
| 938 |
{ |
| 939 |
static short func_id = CPG_FN; |
| 940 |
|
| 941 |
/* set up parameter array */ |
| 942 |
in_params[0] = (anything *)&func_id; |
| 943 |
in_params[1] = (anything *)np; |
| 944 |
in_params[2] = (anything *)px; |
| 945 |
in_params[3] = (anything *)py; |
| 946 |
|
| 947 |
for (short i = 0; i < num_devices; ++i) { |
| 948 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 949 |
} /* end for all devices */ |
| 950 |
} /* end cpg */ |
| 951 |
|
| 952 |
/******************************************************************************/ |
| 953 |
/* */ |
| 954 |
/* cca - cell array */ |
| 955 |
/* */ |
| 956 |
/******************************************************************************/ |
| 957 |
void cca_(f_real *x1, f_real *y1, f_real *x2, f_real *y2, f_real *x3, f_real *y3, f_integer *nx, |
| 958 |
f_integer *ny, f_integer *lcp, f_integer *cells) |
| 959 |
{ |
| 960 |
static short func_id = CCA_FN; |
| 961 |
|
| 962 |
/* set up parameter array */ |
| 963 |
in_params[0] = (anything *)&func_id; |
| 964 |
in_params[1] = (anything *)x1; |
| 965 |
in_params[2] = (anything *)y1; |
| 966 |
in_params[3] = (anything *)x2; |
| 967 |
in_params[4] = (anything *)y2; |
| 968 |
in_params[5] = (anything *)x3; |
| 969 |
in_params[6] = (anything *)y3; |
| 970 |
in_params[7] = (anything *)nx; |
| 971 |
in_params[8] = (anything *)ny; |
| 972 |
in_params[9] = (anything *)lcp; |
| 973 |
in_params[10] = (anything *)cells; |
| 974 |
|
| 975 |
for (short i = 0; i < num_devices; ++i) { |
| 976 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 977 |
} /* end for all devices */ |
| 978 |
} /* end cca */ |
| 979 |
|
| 980 |
/******************************************************************************/ |
| 981 |
/* */ |
| 982 |
/* clnt - line type */ |
| 983 |
/* */ |
| 984 |
/******************************************************************************/ |
| 985 |
void clnt_(f_integer *lntyp) |
| 986 |
{ |
| 987 |
static short func_id = CLNT_FN; |
| 988 |
|
| 989 |
/* set up parameter array */ |
| 990 |
in_params[0] = (anything *)&func_id; |
| 991 |
in_params[1] = (anything *)lntyp; |
| 992 |
|
| 993 |
for (short i = 0; i < num_devices; ++i) { |
| 994 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 995 |
} /* end for all devices */ |
| 996 |
} /* end clnt */ |
| 997 |
|
| 998 |
/******************************************************************************/ |
| 999 |
/* */ |
| 1000 |
/* clnw - line width */ |
| 1001 |
/* */ |
| 1002 |
/******************************************************************************/ |
| 1003 |
void clnw_(f_real *lnwid) |
| 1004 |
{ |
| 1005 |
static short func_id = CLNW_FN; |
| 1006 |
|
| 1007 |
/* set up parameter array */ |
| 1008 |
in_params[0] = (anything *)&func_id; |
| 1009 |
in_params[1] = (anything *)lnwid; |
| 1010 |
|
| 1011 |
for (short i = 0; i < num_devices; ++i) { |
| 1012 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 1013 |
} /* end for all devices */ |
| 1014 |
} /* end clnw */ |
| 1015 |
|
| 1016 |
/******************************************************************************/ |
| 1017 |
/* */ |
| 1018 |
/* clnc - line color */ |
| 1019 |
/* */ |
| 1020 |
/******************************************************************************/ |
| 1021 |
void clnc_(f_integer *lnclr) |
| 1022 |
{ |
| 1023 |
static short func_id = CLNC_FN; |
| 1024 |
|
| 1025 |
/* set up parameter array */ |
| 1026 |
in_params[0] = (anything *)&func_id; |
| 1027 |
in_params[1] = (anything *)lnclr; |
| 1028 |
|
| 1029 |
for (short i = 0; i < num_devices; ++i) { |
| 1030 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 1031 |
} /* end for all devices */ |
| 1032 |
} /* end clnc */ |
| 1033 |
|
| 1034 |
/******************************************************************************/ |
| 1035 |
/* */ |
| 1036 |
/* cmkt - marker type */ |
| 1037 |
/* */ |
| 1038 |
/******************************************************************************/ |
| 1039 |
void cmkt_(f_integer *mktyp) |
| 1040 |
{ |
| 1041 |
static short func_id = CMKT_FN; |
| 1042 |
|
| 1043 |
/* set up parameter array */ |
| 1044 |
in_params[0] = (anything *)&func_id; |
| 1045 |
in_params[1] = (anything *)mktyp; |
| 1046 |
|
| 1047 |
for (short i = 0; i < num_devices; ++i) { |
| 1048 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 1049 |
} /* end for all devices */ |
| 1050 |
} /* end cmkt*/ |
| 1051 |
|
| 1052 |
/******************************************************************************/ |
| 1053 |
/* */ |
| 1054 |
/* cmkc - marker color */ |
| 1055 |
/* */ |
| 1056 |
/******************************************************************************/ |
| 1057 |
void cmkc_(f_integer *mkclr) |
| 1058 |
{ |
| 1059 |
static short func_id = CMKC_FN; |
| 1060 |
|
| 1061 |
/* set up parameter array */ |
| 1062 |
in_params[0] = (anything *)&func_id; |
| 1063 |
in_params[1] = (anything *)mkclr; |
| 1064 |
|
| 1065 |
for (short i = 0; i < num_devices; ++i) { |
| 1066 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 1067 |
} /* end for all devices */ |
| 1068 |
} /* end cmkc*/ |
| 1069 |
|
| 1070 |
/******************************************************************************/ |
| 1071 |
/* */ |
| 1072 |
/* ctxp - text precision */ |
| 1073 |
/* */ |
| 1074 |
/******************************************************************************/ |
| 1075 |
void ctxp_(f_integer *txp) |
| 1076 |
{ |
| 1077 |
static short func_id = CTXP_FN; |
| 1078 |
|
| 1079 |
/* set up parameter array */ |
| 1080 |
in_params[0] = (anything *)&func_id; |
| 1081 |
in_params[1] = (anything *)txp; |
| 1082 |
|
| 1083 |
for (short i = 0; i < num_devices; ++i) { |
| 1084 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 1085 |
} /* end for all devices */ |
| 1086 |
} /* end ctxp */ |
| 1087 |
|
| 1088 |
/******************************************************************************/ |
| 1089 |
/* */ |
| 1090 |
/* ctxc - text color */ |
| 1091 |
/* */ |
| 1092 |
/******************************************************************************/ |
| 1093 |
void ctxc_(f_integer *txclr) |
| 1094 |
{ |
| 1095 |
static short func_id = CTXC_FN; |
| 1096 |
|
| 1097 |
/* set up parameter array */ |
| 1098 |
in_params[0] = (anything *)&func_id; |
| 1099 |
in_params[1] = (anything *)txclr; |
| 1100 |
|
| 1101 |
for (short i = 0; i < num_devices; ++i) { |
| 1102 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 1103 |
} /* end for all devices */ |
| 1104 |
} /* end ctxc */ |
| 1105 |
|
| 1106 |
/******************************************************************************/ |
| 1107 |
/* */ |
| 1108 |
/* cchh - character height */ |
| 1109 |
/* */ |
| 1110 |
/******************************************************************************/ |
| 1111 |
void cchh_(f_real *chhit) |
| 1112 |
{ |
| 1113 |
static short func_id = CCHH_FN; |
| 1114 |
|
| 1115 |
/* set up parameter array */ |
| 1116 |
in_params[0] = (anything *)&func_id; |
| 1117 |
in_params[1] = (anything *)chhit; |
| 1118 |
|
| 1119 |
for (short i = 0; i < num_devices; ++i) { |
| 1120 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 1121 |
} /* end for all devices */ |
| 1122 |
} /* end cchh */ |
| 1123 |
|
| 1124 |
/******************************************************************************/ |
| 1125 |
/* */ |
| 1126 |
/* ccho - character orientation */ |
| 1127 |
/* */ |
| 1128 |
/******************************************************************************/ |
| 1129 |
void ccho_(f_integer *xup, f_integer *yup, f_integer *xbase, f_integer *ybase) |
| 1130 |
{ |
| 1131 |
static short func_id = CCHO_FN; |
| 1132 |
|
| 1133 |
/* set up parameter array */ |
| 1134 |
in_params[0] = (anything *)&func_id; |
| 1135 |
in_params[1] = (anything *)xup; |
| 1136 |
in_params[2] = (anything *)yup; |
| 1137 |
in_params[3] = (anything *)xbase; |
| 1138 |
in_params[4] = (anything *)ybase; |
| 1139 |
|
| 1140 |
for (short i = 0; i < num_devices; ++i) { |
| 1141 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 1142 |
} /* end for all devices */ |
| 1143 |
} /* end ccho */ |
| 1144 |
|
| 1145 |
/******************************************************************************/ |
| 1146 |
/* */ |
| 1147 |
/* cis - interior style */ |
| 1148 |
/* */ |
| 1149 |
/******************************************************************************/ |
| 1150 |
void cis_(f_integer *instyl) |
| 1151 |
{ |
| 1152 |
static short func_id = CIS_FN; |
| 1153 |
|
| 1154 |
/* set up parameter array */ |
| 1155 |
in_params[0] = (anything *)&func_id; |
| 1156 |
in_params[1] = (anything *)instyl; |
| 1157 |
|
| 1158 |
for (short i = 0; i < num_devices; ++i) { |
| 1159 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 1160 |
} /* end for all devices */ |
| 1161 |
} /* end cis*/ |
| 1162 |
|
| 1163 |
/******************************************************************************/ |
| 1164 |
/* */ |
| 1165 |
/* cflc - fill colour specifier */ |
| 1166 |
/* */ |
| 1167 |
/******************************************************************************/ |
| 1168 |
void cflc_(f_integer *fclr) |
| 1169 |
{ |
| 1170 |
static short func_id = CFLC_FN; |
| 1171 |
|
| 1172 |
/* set up parameter array */ |
| 1173 |
in_params[0] = (anything *)&func_id; |
| 1174 |
in_params[1] = (anything *)fclr; |
| 1175 |
|
| 1176 |
for (short i = 0; i < num_devices; ++i) { |
| 1177 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 1178 |
} /* end for all devices */ |
| 1179 |
} /* end cflc*/ |
| 1180 |
|
| 1181 |
/******************************************************************************/ |
| 1182 |
/* */ |
| 1183 |
/* ccsm - color selection mode */ |
| 1184 |
/* */ |
| 1185 |
/******************************************************************************/ |
| 1186 |
void ccsm_(f_integer *csmode) |
| 1187 |
{ |
| 1188 |
static short func_id = CCSM_FN; |
| 1189 |
|
| 1190 |
/* set up parameter array */ |
| 1191 |
in_params[0] = (anything *)&func_id; |
| 1192 |
in_params[1] = (anything *)csmode; |
| 1193 |
|
| 1194 |
for (short i = 0; i < num_devices; ++i) { |
| 1195 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 1196 |
} /* end for all devices */ |
| 1197 |
} /* end ccsm */ |
| 1198 |
|
| 1199 |
/******************************************************************************/ |
| 1200 |
/* */ |
| 1201 |
/* cct - color table */ |
| 1202 |
/* */ |
| 1203 |
/******************************************************************************/ |
| 1204 |
void cct_(f_integer *starti, f_integer *nclrs, f_integer *clrs) |
| 1205 |
{ |
| 1206 |
static short func_id = CCT_FN; |
| 1207 |
|
| 1208 |
/* set up parameter array */ |
| 1209 |
in_params[0] = (anything *)&func_id; |
| 1210 |
in_params[1] = (anything *)starti; |
| 1211 |
in_params[2] = (anything *)nclrs; |
| 1212 |
in_params[3] = (anything *)clrs; |
| 1213 |
|
| 1214 |
for (short i = 0; i < num_devices; ++i) { |
| 1215 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 1216 |
} /* end for all devices */ |
| 1217 |
} /* end cct */ |
| 1218 |
|
| 1219 |
/******************************************************************************/ |
| 1220 |
/* */ |
| 1221 |
/* cgtxx - get text extent */ |
| 1222 |
/* */ |
| 1223 |
/******************************************************************************/ |
| 1224 |
void cgtxx1_(f_real *x, f_real *y, char *string, f_integer *vstat, f_integer *vconc, f_real *xconc, |
| 1225 |
f_real *yconc, f_real *x1, f_real *y1, f_real *x2, f_real *y2, f_real *x3, f_real *y3, |
| 1226 |
f_real *x4, f_real *y4, f_integer *string_size) |
| 1227 |
{ |
| 1228 |
char *string1; |
| 1229 |
static short func_id = CGTXX_FN; |
| 1230 |
short surf_found = 0; /* which active_surface was found */ |
| 1231 |
|
| 1232 |
string1 = f2cchar(string); /* convert Fortran char ptr to C ptr */ |
| 1233 |
|
| 1234 |
/* set up parameter array */ |
| 1235 |
in_params[0] = (anything *)&func_id; |
| 1236 |
in_params[1] = (anything *)x; |
| 1237 |
in_params[2] = (anything *)y; |
| 1238 |
in_params[3] = (anything *)string1; |
| 1239 |
in_params[4] = (anything *)vstat; |
| 1240 |
in_params[5] = (anything *)vconc; |
| 1241 |
in_params[6] = (anything *)xconc; |
| 1242 |
in_params[7] = (anything *)yconc; |
| 1243 |
in_params[8] = (anything *)x1; |
| 1244 |
in_params[9] = (anything *)y1; |
| 1245 |
in_params[10] = (anything *)x2; |
| 1246 |
in_params[11] = (anything *)y2; |
| 1247 |
in_params[12] = (anything *)x3; |
| 1248 |
in_params[13] = (anything *)y3; |
| 1249 |
in_params[14] = (anything *)x4; |
| 1250 |
in_params[15] = (anything *)y4; |
| 1251 |
in_params[16] = (anything *)string_size; |
| 1252 |
|
| 1253 |
/* search active devices for this surface */ |
| 1254 |
short dev_found = -1; |
| 1255 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 1256 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 1257 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 1258 |
dev_found = dev; |
| 1259 |
surf_found = surf; |
| 1260 |
break; |
| 1261 |
} /* end if found on list */ |
| 1262 |
} /* end for */ |
| 1263 |
} /* end for all devices */ |
| 1264 |
|
| 1265 |
if (dev_found != -1) { |
| 1266 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 1267 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 1268 |
} /* end if surface not found */ |
| 1269 |
|
| 1270 |
} /* end cgtxx */ |
| 1271 |
|
| 1272 |
/******************************************************************************/ |
| 1273 |
/* */ |
| 1274 |
/* cqprl - inquire primitive support levels */ |
| 1275 |
/* */ |
| 1276 |
/******************************************************************************/ |
| 1277 |
void cqprl_(f_integer *vstat, f_integer *maxpl, f_integer *maxdpl, f_integer *maxpg, |
| 1278 |
f_integer *maxpgs, f_integer *maxpm, f_integer *maxcf, f_integer *maxchr, |
| 1279 |
f_integer *maxcel, f_integer *celfil, f_integer *celaln, f_integer *comptx, |
| 1280 |
f_integer *clofig) |
| 1281 |
{ |
| 1282 |
static short func_id = CQPRL_FN; |
| 1283 |
short surf_found = 0; /* which active_surface was found */ |
| 1284 |
|
| 1285 |
/* set up parameter array */ |
| 1286 |
in_params[0] = (anything *)&func_id; |
| 1287 |
in_params[1] = (anything *)vstat; |
| 1288 |
in_params[2] = (anything *)maxpl; |
| 1289 |
in_params[3] = (anything *)maxdpl; |
| 1290 |
in_params[4] = (anything *)maxpg; |
| 1291 |
in_params[5] = (anything *)maxpgs; |
| 1292 |
in_params[6] = (anything *)maxpm; |
| 1293 |
in_params[7] = (anything *)maxcf; |
| 1294 |
in_params[8] = (anything *)maxchr; |
| 1295 |
in_params[9] = (anything *)maxcel; |
| 1296 |
in_params[10] = (anything *)celfil; |
| 1297 |
in_params[11] = (anything *)celaln; |
| 1298 |
in_params[12] = (anything *)comptx; |
| 1299 |
in_params[13] = (anything *)clofig; |
| 1300 |
|
| 1301 |
/* search active devices for this surface */ |
| 1302 |
short dev_found = -1; |
| 1303 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 1304 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 1305 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 1306 |
dev_found = dev; |
| 1307 |
surf_found = surf; |
| 1308 |
break; |
| 1309 |
} /* end if found on list */ |
| 1310 |
} /* end for */ |
| 1311 |
} /* end for all devices */ |
| 1312 |
|
| 1313 |
if (dev_found != -1) { |
| 1314 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 1315 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 1316 |
} /* end if surface not found */ |
| 1317 |
|
| 1318 |
} /* end cqprl */ |
| 1319 |
|
| 1320 |
/******************************************************************************/ |
| 1321 |
/* */ |
| 1322 |
/* cqln - inquire line capability */ |
| 1323 |
/* */ |
| 1324 |
/******************************************************************************/ |
| 1325 |
void cqln_(f_integer *vstat, f_integer *npdefb, f_integer *nsetb, f_integer *maxbi, |
| 1326 |
f_integer *dynmod, f_integer *nomwid, f_integer *minwid, f_integer *maxwid) |
| 1327 |
{ |
| 1328 |
static short func_id = CQLN_FN; |
| 1329 |
short surf_found = 0; /* which active_surface was found */ |
| 1330 |
|
| 1331 |
/* set up parameter array */ |
| 1332 |
in_params[0] = (anything *)&func_id; |
| 1333 |
in_params[1] = (anything *)vstat; |
| 1334 |
in_params[2] = (anything *)npdefb; |
| 1335 |
in_params[3] = (anything *)nsetb; |
| 1336 |
in_params[4] = (anything *)maxbi; |
| 1337 |
in_params[5] = (anything *)dynmod; |
| 1338 |
in_params[6] = (anything *)nomwid; |
| 1339 |
in_params[7] = (anything *)minwid; |
| 1340 |
in_params[8] = (anything *)maxwid; |
| 1341 |
|
| 1342 |
/* search active devices for this surface */ |
| 1343 |
short dev_found = -1; |
| 1344 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 1345 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 1346 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 1347 |
dev_found = dev; |
| 1348 |
surf_found = surf; |
| 1349 |
break; |
| 1350 |
} /* end if found on list */ |
| 1351 |
} /* end for */ |
| 1352 |
} /* end for all devices */ |
| 1353 |
|
| 1354 |
if (dev_found != -1) { |
| 1355 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 1356 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 1357 |
} /* end if surface not found */ |
| 1358 |
|
| 1359 |
} /* end cqln*/ |
| 1360 |
|
| 1361 |
/******************************************************************************/ |
| 1362 |
/* */ |
| 1363 |
/* cqlnt - inquire list of available line types */ |
| 1364 |
/* */ |
| 1365 |
/******************************************************************************/ |
| 1366 |
void cqlnt_(f_integer *nreq, f_integer *first, f_integer *vstat, f_integer *ntotal, |
| 1367 |
f_integer *nlist, f_integer *lntyp) |
| 1368 |
{ |
| 1369 |
static short func_id = CQLNT_FN; |
| 1370 |
short surf_found = 0; /* which active_surface was found */ |
| 1371 |
|
| 1372 |
/* set up parameter array */ |
| 1373 |
in_params[0] = (anything *)&func_id; |
| 1374 |
in_params[1] = (anything *)nreq; |
| 1375 |
in_params[2] = (anything *)first; |
| 1376 |
in_params[3] = (anything *)vstat; |
| 1377 |
in_params[4] = (anything *)ntotal; |
| 1378 |
in_params[5] = (anything *)nlist; |
| 1379 |
in_params[6] = (anything *)lntyp; |
| 1380 |
|
| 1381 |
/* search active devices for this surface */ |
| 1382 |
short dev_found = -1; |
| 1383 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 1384 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 1385 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 1386 |
dev_found = dev; |
| 1387 |
surf_found = surf; |
| 1388 |
break; |
| 1389 |
} /* end if found on list */ |
| 1390 |
} /* end for */ |
| 1391 |
} /* end for all devices */ |
| 1392 |
|
| 1393 |
if (dev_found != -1) { |
| 1394 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 1395 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 1396 |
} /* end if surface not found */ |
| 1397 |
|
| 1398 |
} /* end cqlnt*/ |
| 1399 |
|
| 1400 |
/******************************************************************************/ |
| 1401 |
/* */ |
| 1402 |
/* cqchh - inquire list of available character heights */ |
| 1403 |
/* */ |
| 1404 |
/******************************************************************************/ |
| 1405 |
void cqchh1_(char *font, f_integer *txp, f_integer *nreq, f_integer *first, f_integer *vstat, |
| 1406 |
f_integer *ntotal, f_integer *nlist, f_integer *chhit, f_integer *font_size) |
| 1407 |
{ |
| 1408 |
char *font1; |
| 1409 |
static short func_id = CQCHH_FN; |
| 1410 |
short surf_found = 0; /* which active_surface was found */ |
| 1411 |
|
| 1412 |
font1 = f2cchar(font); /* convert Fortran char ptr to C ptr */ |
| 1413 |
|
| 1414 |
/* set up parameter array */ |
| 1415 |
in_params[0] = (anything *)&func_id; |
| 1416 |
in_params[1] = (anything *)font1; |
| 1417 |
in_params[2] = (anything *)txp; |
| 1418 |
in_params[3] = (anything *)nreq; |
| 1419 |
in_params[4] = (anything *)first; |
| 1420 |
in_params[5] = (anything *)vstat; |
| 1421 |
in_params[6] = (anything *)ntotal; |
| 1422 |
in_params[7] = (anything *)nlist; |
| 1423 |
in_params[8] = (anything *)chhit; |
| 1424 |
in_params[9] = (anything *)font_size; |
| 1425 |
|
| 1426 |
/* search active devices for this surface */ |
| 1427 |
short dev_found = -1; |
| 1428 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 1429 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 1430 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 1431 |
dev_found = dev; |
| 1432 |
surf_found = surf; |
| 1433 |
break; |
| 1434 |
} /* end if found on list */ |
| 1435 |
} /* end for */ |
| 1436 |
} /* end for all devices */ |
| 1437 |
|
| 1438 |
if (dev_found != -1) { |
| 1439 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 1440 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 1441 |
} /* end if surface not found */ |
| 1442 |
|
| 1443 |
} /* end cqchh */ |
| 1444 |
|
| 1445 |
/******************************************************************************/ |
| 1446 |
/* */ |
| 1447 |
/* cqfl - inquire fill capability */ |
| 1448 |
/* */ |
| 1449 |
/******************************************************************************/ |
| 1450 |
void cqfl_(f_integer *vstat, f_integer *npdefb, f_integer *nsetb, f_integer *maxbi, |
| 1451 |
f_integer *dynmod, f_integer *ninsty, f_integer *instyl, f_integer *npdefp, |
| 1452 |
f_integer *nsetp, f_integer *maxpi, f_integer *pdiv, f_integer *maxpx, f_integer *maxpy, |
| 1453 |
f_integer *ptrans) |
| 1454 |
{ |
| 1455 |
static short func_id = CQFL_FN; |
| 1456 |
short surf_found = 0; /* which active_surface was found */ |
| 1457 |
|
| 1458 |
/* set up parameter array */ |
| 1459 |
in_params[0] = (anything *)&func_id; |
| 1460 |
in_params[1] = (anything *)vstat; |
| 1461 |
in_params[2] = (anything *)npdefb; |
| 1462 |
in_params[3] = (anything *)nsetb; |
| 1463 |
in_params[4] = (anything *)maxbi; |
| 1464 |
in_params[5] = (anything *)dynmod; |
| 1465 |
in_params[6] = (anything *)ninsty; |
| 1466 |
in_params[7] = (anything *)instyl; |
| 1467 |
in_params[8] = (anything *)npdefp; |
| 1468 |
in_params[9] = (anything *)nsetp; |
| 1469 |
in_params[10] = (anything *)maxpi; |
| 1470 |
in_params[11] = (anything *)pdiv; |
| 1471 |
in_params[12] = (anything *)maxpx; |
| 1472 |
in_params[13] = (anything *)maxpy; |
| 1473 |
in_params[14] = (anything *)ptrans; |
| 1474 |
|
| 1475 |
/* search active devices for this surface */ |
| 1476 |
short dev_found = -1; |
| 1477 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 1478 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 1479 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 1480 |
dev_found = dev; |
| 1481 |
surf_found = surf; |
| 1482 |
break; |
| 1483 |
} /* end if found on list */ |
| 1484 |
} /* end for */ |
| 1485 |
} /* end for all devices */ |
| 1486 |
|
| 1487 |
if (dev_found != -1) { |
| 1488 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 1489 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 1490 |
} /* end if surface not found */ |
| 1491 |
|
| 1492 |
} /* end cqfl */ |
| 1493 |
|
| 1494 |
/******************************************************************************/ |
| 1495 |
/* */ |
| 1496 |
/* cqc - inquire colour capabilities */ |
| 1497 |
/* */ |
| 1498 |
/******************************************************************************/ |
| 1499 |
void cqc_(f_integer *vstat, f_integer *nsimul, f_integer *navail, f_integer *nint, f_integer *cmode, |
| 1500 |
f_integer *dynmod, f_integer *overit, f_integer *monoc) |
| 1501 |
{ |
| 1502 |
static short func_id = CQC_FN; |
| 1503 |
short surf_found = 0; /* which active_surface was found */ |
| 1504 |
|
| 1505 |
/* set up parameter array */ |
| 1506 |
in_params[0] = (anything *)&func_id; |
| 1507 |
in_params[1] = (anything *)vstat; |
| 1508 |
in_params[2] = (anything *)nsimul; |
| 1509 |
in_params[3] = (anything *)navail; |
| 1510 |
in_params[4] = (anything *)nint; |
| 1511 |
in_params[5] = (anything *)cmode; |
| 1512 |
in_params[6] = (anything *)dynmod; |
| 1513 |
in_params[7] = (anything *)overit; |
| 1514 |
in_params[8] = (anything *)monoc; |
| 1515 |
|
| 1516 |
/* search active devices for this surface */ |
| 1517 |
short dev_found = -1; |
| 1518 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 1519 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 1520 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 1521 |
dev_found = dev; |
| 1522 |
surf_found = surf; |
| 1523 |
break; |
| 1524 |
} /* end if found on list */ |
| 1525 |
} /* end for */ |
| 1526 |
} /* end for all devices */ |
| 1527 |
|
| 1528 |
if (dev_found != -1) { |
| 1529 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 1530 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 1531 |
} /* end if surface not found */ |
| 1532 |
|
| 1533 |
} /* end cqc */ |
| 1534 |
|
| 1535 |
/******************************************************************************/ |
| 1536 |
/* */ |
| 1537 |
/* cqlna - inquire line attributes */ |
| 1538 |
/* */ |
| 1539 |
/******************************************************************************/ |
| 1540 |
void cqlna_(f_integer *vstat, f_integer *lnbi, f_integer *lntyp, f_integer *lwmode, |
| 1541 |
f_integer *lnwid, f_integer *csmode, f_integer *lnclr, f_integer *lcmode) |
| 1542 |
{ |
| 1543 |
static short func_id = CQLNA_FN; |
| 1544 |
short surf_found = 0; /* which active_surface was found */ |
| 1545 |
|
| 1546 |
/* set up parameter array */ |
| 1547 |
in_params[0] = (anything *)&func_id; |
| 1548 |
in_params[1] = (anything *)vstat; |
| 1549 |
in_params[2] = (anything *)lnbi; |
| 1550 |
in_params[3] = (anything *)lntyp; |
| 1551 |
in_params[4] = (anything *)lwmode; |
| 1552 |
in_params[5] = (anything *)lnwid; |
| 1553 |
in_params[6] = (anything *)csmode; |
| 1554 |
in_params[7] = (anything *)lnclr; |
| 1555 |
in_params[8] = (anything *)lcmode; |
| 1556 |
|
| 1557 |
/* search active devices for this surface */ |
| 1558 |
short dev_found = -1; |
| 1559 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 1560 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 1561 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 1562 |
dev_found = dev; |
| 1563 |
surf_found = surf; |
| 1564 |
break; |
| 1565 |
} /* end if found on list */ |
| 1566 |
} /* end for */ |
| 1567 |
} /* end for all devices */ |
| 1568 |
|
| 1569 |
if (dev_found != -1) { |
| 1570 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 1571 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 1572 |
} /* end if surface not found */ |
| 1573 |
|
| 1574 |
} /* end cqlna */ |
| 1575 |
|
| 1576 |
/******************************************************************************/ |
| 1577 |
/* */ |
| 1578 |
/* cqtxa - inquire text attributes */ |
| 1579 |
/* */ |
| 1580 |
/******************************************************************************/ |
| 1581 |
void cqtxa_(f_integer *vstat, f_integer *txbi, f_integer *fonti, f_integer *fontp, f_real *chexp, |
| 1582 |
f_real *chspac, f_integer *csmode, f_integer *txclr[3], f_real *chhit, |
| 1583 |
f_real *orient[4], f_integer *txpath, f_integer *horal, f_real *contha, |
| 1584 |
f_integer *veral, f_real *contva, f_integer *chsi, f_integer *achsi) |
| 1585 |
{ |
| 1586 |
static short func_id = CQTXA_FN; |
| 1587 |
short surf_found = 0; /* which active_surface was found */ |
| 1588 |
|
| 1589 |
/* set up parameter array */ |
| 1590 |
in_params[0] = (anything *)&func_id; |
| 1591 |
in_params[1] = (anything *)vstat; |
| 1592 |
in_params[2] = (anything *)txbi; |
| 1593 |
in_params[3] = (anything *)fonti; |
| 1594 |
in_params[4] = (anything *)fontp; |
| 1595 |
in_params[5] = (anything *)chexp; |
| 1596 |
in_params[6] = (anything *)chspac; |
| 1597 |
in_params[7] = (anything *)csmode; |
| 1598 |
in_params[8] = (anything *)txclr; |
| 1599 |
in_params[9] = (anything *)chhit; |
| 1600 |
in_params[10] = (anything *)orient; |
| 1601 |
in_params[11] = (anything *)txpath; |
| 1602 |
in_params[12] = (anything *)horal; |
| 1603 |
in_params[13] = (anything *)contha; |
| 1604 |
in_params[14] = (anything *)veral; |
| 1605 |
in_params[15] = (anything *)contva; |
| 1606 |
in_params[16] = (anything *)chsi; |
| 1607 |
in_params[17] = (anything *)achsi; |
| 1608 |
|
| 1609 |
/* search active devices for this surface */ |
| 1610 |
short dev_found = -1; |
| 1611 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 1612 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 1613 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 1614 |
dev_found = dev; |
| 1615 |
surf_found = surf; |
| 1616 |
break; |
| 1617 |
} /* end if found on list */ |
| 1618 |
} /* end for */ |
| 1619 |
} /* end for all devices */ |
| 1620 |
|
| 1621 |
if (dev_found != -1) { |
| 1622 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 1623 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 1624 |
} /* end if surface not found */ |
| 1625 |
|
| 1626 |
} /* end cqtxa*/ |
| 1627 |
|
| 1628 |
/******************************************************************************/ |
| 1629 |
/* */ |
| 1630 |
/* cqcte - inquire list of colour table entries */ |
| 1631 |
/* */ |
| 1632 |
/******************************************************************************/ |
| 1633 |
void cqcte_(f_integer *nreq, f_integer *first, f_integer *vstat, f_integer *ntotal, |
| 1634 |
f_integer *nlist, f_integer *colors) |
| 1635 |
{ |
| 1636 |
static short func_id = CQCTE_FN; |
| 1637 |
short surf_found = 0; /* which active_surface was found */ |
| 1638 |
|
| 1639 |
/* set up parameter array */ |
| 1640 |
in_params[0] = (anything *)&func_id; |
| 1641 |
in_params[1] = (anything *)nreq; |
| 1642 |
in_params[2] = (anything *)first; |
| 1643 |
in_params[3] = (anything *)vstat; |
| 1644 |
in_params[4] = (anything *)ntotal; |
| 1645 |
in_params[5] = (anything *)nlist; |
| 1646 |
in_params[6] = (anything *)colors; |
| 1647 |
|
| 1648 |
/* search active devices for this surface */ |
| 1649 |
short dev_found = -1; |
| 1650 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 1651 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 1652 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 1653 |
dev_found = dev; |
| 1654 |
surf_found = surf; |
| 1655 |
break; |
| 1656 |
} /* end if found on list */ |
| 1657 |
} /* end for */ |
| 1658 |
} /* end for all devices */ |
| 1659 |
|
| 1660 |
if (dev_found != -1) { |
| 1661 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 1662 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 1663 |
} /* end if surface not found */ |
| 1664 |
|
| 1665 |
} /* end cqcte */ |
| 1666 |
|
| 1667 |
/******************************************************************************/ |
| 1668 |
/* */ |
| 1669 |
/* cili - initialize logical input device */ |
| 1670 |
/* */ |
| 1671 |
/******************************************************************************/ |
| 1672 |
void cili_(f_integer *iclass, f_integer *idev) |
| 1673 |
{ |
| 1674 |
static short func_id = CILI_FN; |
| 1675 |
short surf_found = 0; /* which active_surface was found */ |
| 1676 |
|
| 1677 |
/* set up parameter array */ |
| 1678 |
in_params[0] = (anything *)&func_id; |
| 1679 |
in_params[1] = (anything *)iclass; |
| 1680 |
in_params[2] = (anything *)idev; |
| 1681 |
|
| 1682 |
/* search active devices for this surface */ |
| 1683 |
short dev_found = -1; |
| 1684 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 1685 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 1686 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 1687 |
dev_found = dev; |
| 1688 |
surf_found = surf; |
| 1689 |
break; |
| 1690 |
} /* end if found on list */ |
| 1691 |
} /* end for */ |
| 1692 |
} /* end for all devices */ |
| 1693 |
|
| 1694 |
if (dev_found != -1) { |
| 1695 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 1696 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 1697 |
} /* end if surface not found */ |
| 1698 |
|
| 1699 |
} /* end cili*/ |
| 1700 |
|
| 1701 |
/******************************************************************************/ |
| 1702 |
/* */ |
| 1703 |
/* crqlc - request locator */ |
| 1704 |
/* */ |
| 1705 |
/******************************************************************************/ |
| 1706 |
void crqlc_(f_integer *idev, f_real *timeout, f_integer *vstat, f_integer *rstat, f_integer *mvalid, |
| 1707 |
f_integer *triggr, f_real *x, f_real *y) |
| 1708 |
{ |
| 1709 |
static short func_id = CRQLC_FN; |
| 1710 |
short surf_found = 0; /* which active_surface was found */ |
| 1711 |
|
| 1712 |
/* set up parameter array */ |
| 1713 |
in_params[0] = (anything *)&func_id; |
| 1714 |
in_params[1] = (anything *)idev; |
| 1715 |
in_params[2] = (anything *)timeout; |
| 1716 |
in_params[3] = (anything *)vstat; |
| 1717 |
in_params[4] = (anything *)rstat; |
| 1718 |
in_params[5] = (anything *)mvalid; |
| 1719 |
in_params[6] = (anything *)triggr; |
| 1720 |
in_params[7] = (anything *)x; |
| 1721 |
in_params[8] = (anything *)y; |
| 1722 |
|
| 1723 |
/* search active devices for this surface */ |
| 1724 |
short dev_found = -1; |
| 1725 |
for (short dev = 0; (dev < num_devices) && (dev_found == -1); ++dev) { |
| 1726 |
for (short surf = 0; surf < devices[dev].num_active_surfaces; ++surf) { |
| 1727 |
if (sol_surf == devices[dev].statelist[surf]) { |
| 1728 |
dev_found = dev; |
| 1729 |
surf_found = surf; |
| 1730 |
break; |
| 1731 |
} /* end if found on list */ |
| 1732 |
} /* end for */ |
| 1733 |
} /* end for all devices */ |
| 1734 |
|
| 1735 |
if (dev_found != -1) { |
| 1736 |
anything *temp_surface[] = {devices[dev_found].statelist[surf_found]}; |
| 1737 |
(*devices[dev_found].device_fn)(in_params, 1, temp_surface); |
| 1738 |
} /* end if surface not found */ |
| 1739 |
|
| 1740 |
} /* end cqrlc */ |
| 1741 |
|
| 1742 |
/******************************************************************************/ |
| 1743 |
/* */ |
| 1744 |
/* cpxa - pixel array */ |
| 1745 |
/* */ |
| 1746 |
/******************************************************************************/ |
| 1747 |
void cpxa_(f_real *x, f_real *y, f_integer *nx, f_integer *ny, f_integer *xscal, f_integer *yscal, |
| 1748 |
f_integer *xdir, f_integer *ydir, f_integer *pxclrs) |
| 1749 |
{ |
| 1750 |
static short func_id = CPXA_FN; |
| 1751 |
|
| 1752 |
/* set up parameter array */ |
| 1753 |
in_params[0] = (anything *)&func_id; |
| 1754 |
in_params[1] = (anything *)x; |
| 1755 |
in_params[2] = (anything *)y; |
| 1756 |
in_params[3] = (anything *)nx; |
| 1757 |
in_params[4] = (anything *)ny; |
| 1758 |
in_params[5] = (anything *)xscal; |
| 1759 |
in_params[6] = (anything *)yscal; |
| 1760 |
in_params[7] = (anything *)xdir; |
| 1761 |
in_params[8] = (anything *)ydir; |
| 1762 |
in_params[9] = (anything *)pxclrs; |
| 1763 |
|
| 1764 |
for (short i = 0; i < num_devices; ++i) { |
| 1765 |
(*devices[i].device_fn)(in_params, devices[i].num_on_surfaces, devices[i].statelist); |
| 1766 |
} /* end for all devices */ |
| 1767 |
} /* end cpxa */ |