1
/* @(#)ag_vkil.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_vkil.c 19.1 (OAA-ASTRONET) 02/25/03 13:53:02 */
31
* HEADER : ag_vkil.c - Vers 3.6.000 - Oct 1991 - L. Fini, OAA
44
/*****************************************************************************/
45
/* killvw (AGL internal use) */
47
/* Kill the current viewport */
54
if(AGL_status.vwpoint==NULL) {
55
AGL_status.errstat=(NOVWPERR);
59
#ifndef NO_METAFILE_SUPPORT
60
if(DY(metafile) != NULL)
61
fclose(DY(metafile)); /* Close current metafile */
64
CHANNEL = DY(curchan);
65
SENDFUNCT(AGLDVCOM); /* Empty viewport buffer */
67
if(--ACTREQST(AGL_status.devid) == 0) /* Decrement device request counter */
68
AGL_dstop(AGL_status.devid); /* Close device */
70
AGL_fvwp(AGL_status.curvwp);
71
AGL_status.errstat=(ERRCODE);
75
/*****************************************************************************/
76
/*++ AG_VKIL (C callable) */
78
/* AG_VKIL Kill current viewport */
81
/* Kill the current viewport. If a metafile is currently associated to the */
82
/* viewport it is closed. */
87
static char *modnam = "VKIL";
88
extern void AG_DMSG();
90
AG_DMSG(modnam,(char *)0);
92
AGL_vflsh(); /* Empty viewport buffer */
94
if(AGL_status.errstat != AGLNOERR) AGL_siger(modnam);