1
C @(#)unxdaosubs.for 19.1 (ES0-DMD) 02/25/03 13:23:51
2
C===========================================================================
3
C Copyright (C) 1995 European Southern Observatory (ESO)
5
C This program is free software; you can redistribute it and/or
6
C modify it under the terms of the GNU General Public License as
7
C published by the Free Software Foundation; either version 2 of
8
C the License, or (at your option) any later version.
10
C This program is distributed in the hope that it will be useful,
11
C but WITHOUT ANY WARRANTY; without even the implied warranty of
12
C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
C GNU General Public License for more details.
15
C You should have received a copy of the GNU General Public
16
C License along with this program; if not, write to the Free
17
C Software Foundation, Inc., 675 Massachusetss Ave, Cambridge,
20
C Corresponding concerning ESO-MIDAS should be addressed as follows:
21
C Internet e-mail: midas@eso.org
22
C Postal address: European Southern Observatory
23
C Data Management Division
24
C Karl-Schwarzschild-Strasse 2
25
C D 85748 Garching bei Muenchen
30
C===========================================================================
37
C=================================================================
39
SUBROUTINE CLFILE (LUN)
45
C=========================================================================
50
WRITE (6,*) 'Good bye.'
55
C==========================================================================
60
WRITE (6,*) 'Sorry about that.'
65
C==============================================================================
67
SUBROUTINE INFILE (LUN, FILE, ISTAT)
74
OPEN (LUN, FILE=EXPAND(FILE), STATUS='OLD', ERR=999)
81
C========================================================
83
CHARACTER*(*) FUNCTION EXPAND(FILE)
92
IF (FILE(I:I) .EQ. ':') THEN
93
CALL GETENV (FILE(1:I-1), EXPAND)
95
IF (EXPAND(J:J) .NE. ' ') K=J
98
EXPAND = EXPAND(1:K)//'/'//FILE(I+1:30)
107
C======================================================
109
SUBROUTINE OUTFIL (LUN, FILE, ISTAT)
118
1000 INQUIRE (FILE=EXPAND(FILE), EXIST=EXIST)
120
CALL STUPID ('This file already exists: '//FILE)
122
CALL GETNAM ('NEW OUTPUT FILE NAME:', ANSWER)
123
IF (ANSWER .EQ. 'OVERWRITE') THEN
124
OPEN (LUN, FILE=EXPAND(FILE), STATUS='OLD')
125
CLOSE (LUN, STATUS='DELETE')
131
OPEN (LUN, FILE=EXPAND(FILE), STATUS='NEW', IOSTAT=ISTAT)
135
C====================================================
137
CHARACTER*(*) FUNCTION CASE (STRING)
141
C FOR UNIX, LEAVE THE CASES OF THE CHARACTERS ALONE!
148
C====================================================
150
SUBROUTINE OVRWRT (LINE, IWHICH)
158
IF (IWHICH .EQ. 1) THEN
161
ELSE IF (IWHICH .EQ. 2) THEN
162
IF (LEN(LINE) .LT. 79) THEN
165
WRITE (6,2) OUTPUT, CHAR(13)
166
WRITE (6,2) OUTPUT, CHAR(13)
169
WRITE (6,2) LINE, CHAR(13)
171
ELSE IF (IWHICH .EQ. 3) THEN
175
WRITE (6,4) LINE, CHAR(13)