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

« back to all changes in this revision

Viewing changes to contrib/pepsys/libsrc/askfil.for

  • 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
C @(#)askfil.for        19.1 (ES0-DMD) 02/25/03 13:28:45
 
2
C===========================================================================
 
3
C Copyright (C) 1995 European Southern Observatory (ESO)
 
4
C
 
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.
 
9
C
 
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.
 
14
C
 
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, 
 
18
C MA 02139, USA.
 
19
C
 
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 
 
26
C                       GERMANY
 
27
C===========================================================================
 
28
C
 
29
C  @(#)askfil.for       19.1  (ESO-IPG)  02/25/03  13:28:45
 
30
      SUBROUTINE ASKFIL(QUERY,REPLY)
 
31
C
 
32
C       Copyright (C) Andrew T. Young, 1990
 
33
C       Copyright (C) European Southern Observatory, 1992
 
34
C
 
35
C  ASKS THE QUERY ON THE TERMINAL SCREEN AND    28 Sep.,'88
 
36
C  ACCEPTS REPLY FROM KEYBOARD.
 
37
C       Asks for file names; accept lower case.
 
38
C
 
39
C  QUITS IF REPLY IS 'Q' OR 'QUIT'.
 
40
C
 
41
      IMPLICIT NONE
 
42
C
 
43
      INTEGER ISTAT, NACTEL, IUNIT, NULLS, LWORD
 
44
C
 
45
      CHARACTER *(*) QUERY,REPLY, A*1
 
46
      CHARACTER*80 BUFIN, BUFOUT
 
47
C
 
48
C
 
49
      LOGICAL MATCH
 
50
      EXTERNAL MATCH
 
51
C
 
52
      BUFIN=QUERY
 
53
    1 CALL STTPUT(' ',ISTAT)
 
54
      CALL STKPRC(BUFIN, 'INPUTC', 1, 1, 80,
 
55
     1           NACTEL, BUFOUT, IUNIT, NULLS, ISTAT)
 
56
      REPLY=BUFOUT
 
57
      IF (ISTAT.NE.0) THEN
 
58
                CALL STTPUT('Failed to get string; try again:',ISTAT)
 
59
                GO TO 1
 
60
      END IF
 
61
C   3 FORMAT(/1X,A/)
 
62
      IF(LWORD(REPLY).EQ.0) GOTO 1
 
63
       IF(MATCH(REPLY,'QUIT').OR.MATCH(REPLY,'quit'))THEN
 
64
      CALL ASK('DO YOU WANT TO QUIT?',A)
 
65
      IF(A.EQ.'Y'.OR.A.EQ.'Q'.OR.A.EQ.'y'.OR.A.EQ.'q') THEN
 
66
        CALL TV('ABANDONED.')
 
67
        CALL STSEPI
 
68
      END IF
 
69
      GO TO 1
 
70
       END IF
 
71
      RETURN
 
72
C
 
73
      END