1
/* @(#)ag_vlos.c 19.1 (ES0-DMD) 02/25/03 13:53:02 */
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_vlos.c 19.1 (OAA-ASTRONET) 02/25/03 13:53:02 */
31
* HEADER : ag_vlos.c - Vers 3.6.000 - Oct 1991 - L. Fini, OAA
42
/*****************************************************************************/
43
/*++ AG_VLOS (C callable) */
45
/* AG_VLOS Get locator position. Also return a string */
48
/* Get the position from a locating device. This routine has a functionality */
49
/* very close to AG_VLOC. The only difference is that a sequence of chara- */
50
/* ters may be returned to the caller into a string. The string input is */
51
/* terminated when a "newline" or other control character is pressed. The */
52
/* newline or control character is NOT included in the string, and a null */
53
/* character is appended (when calling from C language routine). */
55
/* NOTE: if the locating device is moved during interaction (between some */
56
/* keypresses) the position result is unpredictable. */
59
void AG_VLOS (xv,yv,maxlen,chstrg,pixval)
61
float *xv,*yv; /* Input: required locator initial position. */
62
/* Some devices may ignore this values (it is */
63
/* an optional driver capability). */
64
/* Return: final locator position. */
65
/* Both values are referred to the current */
66
/* coordinate system: USER or NORMALIZED */
67
int maxlen; /* Maximum length of return string. If more */
68
/* than maxlen characters are typed, they are */
69
/* ignored. If the input is terminated due to */
70
/* a control character, the string is null */
72
char *chstrg; /* Typed string. String length in the calling */
73
/* program must be at least maxlen characters. */
74
int *pixval; /* Pixel value (color). Some devices will */
75
/* always return 0 (it is an optional driver */
79
static char *modnam = "VLOS";
80
extern void AG_DMSG();
82
AG_DMSG(modnam,(char *)0);
84
AGL_loc (xv,yv,maxlen,chstrg,pixval);
85
if(AGL_status.errstat!=AGLNOERR) AGL_siger(modnam);