1
/* @(#)ag_iget.c 19.1 (ES0-DMD) 02/25/03 13:52:59 */
2
/*===========================================================================
3
Copyright (C) 1995 European Southern Observatory (ESO)
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the GNU General Public License as
7
published by the Free Software Foundation; either version 2 of
8
the License, or (at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public
16
License along with this program; if not, write to the Free
17
Software Foundation, Inc., 675 Massachusetss Ave, Cambridge,
20
Corresponding concerning ESO-MIDAS should be addressed as follows:
21
Internet e-mail: midas@eso.org
22
Postal address: European Southern Observatory
23
Data Management Division
24
Karl-Schwarzschild-Strasse 2
25
D 85748 Garching bei Muenchen
27
===========================================================================*/
29
/* @(#)ag_iget.c 19.1 (OAA-ASTRONET) 02/25/03 13:52:59 */
31
* HEADER : ag_iget.c - Vers 3.6.001 - Oct 1993 - L. Fini, OAA
32
* - Vers 3.6.000 - Oct 1991 - L. Fini, OAA
43
/*****************************************************************************/
44
/*++ AG_IGET (C callable) */
46
/* AG_IGET Get integer information */
49
/* Get integer pieces of information. Required information is specified */
50
/* by a command string. */
53
int AG_IGET (item,ival)
54
/* Returns number of values in ival. */
56
char *item; /* Information select string (see below). */
57
int ival[]; /* Return value(s). The array must be long */
58
/* enough to contain the required number of */
59
/* values specified in the list below. */
61
/* The select string contains a keyword which specifies the piece of informa-*/
62
/* tion required. Keywords can be truncated at the minimum number of charac- */
63
/* ters needed to recognize them (shown uppercase in the list below) but can */
64
/* be typed both in upper and lower case */
67
/* Name items Description */
69
/* BACKGround 1 Default background color of current device */
70
/* BLACk 1 Color code to get black color */
71
/* BLUE 1 Color code to get blue color */
72
/* COLOr 1 Current color code */
73
/* CLR1 1 Main color code */
74
/* CLR2 1 Secondary color code */
75
/* CLR3 1 Third choice color code */
76
/* CYAN 1 Color code to get cyan color */
77
/* DEVType 1 Device type (0: passive, 1:interactive) */
78
/* ERROr 1 Last error code */
79
/* FLG00 1 =1 if device is Interactive (else 0) */
80
/* FLG01 1 =1 if device locator can return pixel value (else 0) */
81
/* FLG02 1 =1 if device allows partial erasing (else 0) */
82
/* FLG03 1 =1 if alpha plane is separated from graphic planes */
83
/* FLG04 1 =1 if device must be explicitly erased at initializ. */
84
/* FLG05 1 =1 if command defined in AGLDEVS.DAT will be executed */
85
/* FLG06 1 =1 if device accept RGB color definition (else 0) */
86
/* FLG07 1 =1 if device can set RGB color background (else 0) */
87
/* GREEn 1 Color code to get green color */
88
/* LINX 1 =1 if linear transformation on X axis (else 0) */
89
/* LINY 1 =1 if linear transformation on Y axis (else 0) */
90
/* LOGX 1 =1 if linear transformation on X axis (else 0) */
91
/* LOGY 1 =1 if linear transformation on Y axis (else 0) */
92
/* LSTYLe 1 Current line style */
93
/* LWIDTh 1 Current line width */
94
/* MAGEnta 1 Color code to get magenta color */
95
/* MFMODE 1 Current metafile mode (0:no metafile; 1: SOFT; 2: HARD) */
96
/* MODE 1 =0 if current mode is NORMALIZED, =1 if USER, =2 if */
97
/* current mode is SPECIAL */
98
/* NCOLors 1 Number of colors (pens, gray tones) allowed by device */
99
/* NSYMbols 1 Number of symbols (markers) */
100
/* NSTYLes 1 Number of line styles supported (the default 0 not */
102
/* NWIDThs 1 Number of line widths supported (the default 0 not */
104
/* RED 1 Color code to get red color */
105
/* TWIDTh 1 Current text line width */
106
/* USER 10 Get up to 10 user specified data items. See AG_ISET. */
107
/* WHITe 1 Color code to get white color */
108
/* YELLow 1 Color code to get yellow color */
112
extern char* AG_SCAN();
113
static char *modnam = "IGET";
114
char keywd[MAXKEYLNG];
115
extern void AG_DMSG();
118
AG_DMSG(modnam,(char *)0);
120
AG_SCAN(item,';',MAXKEYLNG,keywd);
122
nvalues=AGL_gint(keywd,ival);
123
if ( AGL_status.errstat != AGLNOERR )