~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to libsrc/agl/ag_iget.c

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* @(#)ag_iget.c        19.1 (ES0-DMD) 02/25/03 13:52:59 */
 
2
/*===========================================================================
 
3
  Copyright (C) 1995 European Southern Observatory (ESO)
 
4
 
 
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.
 
9
 
 
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.
 
14
 
 
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, 
 
18
  MA 02139, USA.
 
19
 
 
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 
 
26
                        GERMANY
 
27
===========================================================================*/
 
28
 
 
29
/* @(#)ag_iget.c        19.1  (OAA-ASTRONET) 02/25/03 13:52:59   */
 
30
/*
 
31
 * HEADER : ag_iget.c      - Vers 3.6.001  - Oct 1993 -  L. Fini, OAA
 
32
 *                         - Vers 3.6.000  - Oct 1991 -  L. Fini, OAA
 
33
 *
 
34
 *
 
35
 *                           C INTERFACE MODULE
 
36
 */
 
37
 
 
38
 
 
39
#include <aglenvr.h>
 
40
#include <aglstat.h>
 
41
 
 
42
 
 
43
/*****************************************************************************/
 
44
/*++                            AG_IGET (C callable)                         */
 
45
 
 
46
/* AG_IGET    Get integer information                                        */
 
47
 
 
48
 
 
49
/* Get integer pieces of information. Required information is specified      */
 
50
/* by a command string.                                                      */
 
51
 
 
52
 
 
53
int AG_IGET (item,ival)
 
54
                              /* Returns number of values in ival.           */
 
55
 
 
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.         */
 
60
 
 
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                                     */
 
65
 
 
66
/*        Number of                                                          */
 
67
/* Name     items    Description                                             */
 
68
 
 
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      */
 
101
/*                   included)                                               */
 
102
/* NWIDThs    1      Number of line widths supported (the default 0 not      */
 
103
/*                   included)                                               */
 
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                          */
 
109
/*                                                                           */
 
110
                                                                         /*--*/
 
111
{
 
112
extern char* AG_SCAN();
 
113
static char *modnam = "IGET";
 
114
char keywd[MAXKEYLNG];
 
115
extern void AG_DMSG();
 
116
int nvalues=0;
 
117
 
 
118
AG_DMSG(modnam,(char *)0);
 
119
 
 
120
AG_SCAN(item,';',MAXKEYLNG,keywd);
 
121
if(*keywd!='\0')  {
 
122
        nvalues=AGL_gint(keywd,ival);
 
123
        if ( AGL_status.errstat != AGLNOERR ) 
 
124
                AGL_siger(modnam);
 
125
}
 
126
return nvalues;
 
127
}