~ubuntu-branches/ubuntu/wily/eso-midas/wily-proposed

« back to all changes in this revision

Viewing changes to contrib/pepsys/proc/horform.prg

  • 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
! @(#)horform.prg       19.1 (ES0-DMD) 02/25/03 13:29:00
 
2
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
3
!.IDENTIFICATION: HORFORM.PRG
 
4
!.PURPOSE:        Help user set up horizon-limit forms
 
5
!.USE:            MAKE/HORFORM
 
6
!.AUTHOR:         Andrew T. Young
 
7
! ----------------------------------------------------------------------
 
8
!
 
9
! ********* DEFINE LOCAL KEYWORDS  **********
 
10
!
 
11
DEFINE/LOCAL reply/C/1/10 "?" A
 
12
DEFINE/LOCAL obstbl/C/1/80 "esotel.tbl"
 
13
!
 
14
! ********* BEGIN EXECUTION  **********
 
15
!
 
16
WRITE/OUT " "
 
17
WRITE/OUT "The MAKE/HORFORM command will make horizon-limit forms for you."
 
18
WRITE/OUT " "
 
19
!
 
20
AskAscii:
 
21
INQUIRE/KEYW reply "Is the telescope in the esotel.tbl table?"
 
22
IF reply(:1) .eq. "y" THEN
 
23
!
 
24
! See if esotel.tbl is available locally...
 
25
!
 
26
    IF M$EXIST("esotel.tbl") .eq. 0 THEN        ! not available
 
27
        IF AUX_MODE(1) .LE. 1 THEN              ! VMS
 
28
           define/local peplib/c/1/60 -
 
29
             "MID_DISK:[&MID_PEPSYS] "
 
30
           $ COPY {peplib}esotel.tbl []
 
31
           $ SET PROT=(O:RWED) esotel.tbl
 
32
        ELSE                                    ! UNIX
 
33
           define/local peplib/c/1/60 "$MID_PEPSYS/"
 
34
           $ cp {peplib}esotel.tbl `pwd`
 
35
           $ chmod 644 esotel.tbl
 
36
        ENDIF
 
37
    ENDIF
 
38
!
 
39
ELSEIF reply(:1) .eq. "n" THEN          ! Find name of obstbl
 
40
!
 
41
    INQUIRE/KEYW obstbl "Enter the name of the observatory table file:"
 
42
    IF M$EXIST(obstbl) .eq. 0 THEN
 
43
        WRITE/OUT {obstbl} " is not available."
 
44
        WRITE/OUT "Please copy it to this directory; then try again."
 
45
        RETURN/EXIT
 
46
    ELSE
 
47
        IF AUX_MODE .LE. 1 THEN         ! VMS
 
48
           $ COPY {obstbl} esotel.tbl
 
49
           $ SET PROT=(O:RWED) esotel.tbl
 
50
        ELSE                            ! unix
 
51
           $ cp {obstbl} esotel.tbl
 
52
           $ chmod 644 esotel.tbl
 
53
        ENDIF
 
54
    ENDIF
 
55
!
 
56
ELSE
 
57
    WRITE/OUT "Please answer yes or no."
 
58
    GOTO AskAscii
 
59
ENDIF
 
60
 
 
61
! esotel.tbl now available.  Run program:
 
62
!
 
63
RUN CON_EXE:HORFORM
 
64
!
 
65
! Make sure it terminated normally:
 
66
!
 
67
IF APPLIC(1:1) .EQ. "X" THEN
 
68
   RETURN/EXIT
 
69
ENDIF
 
70
!
 
71
!
 
72
WRITE/OUT "We will now try to print the FORM file for you:"
 
73
!
 
74
IF AUX_MODE .LE. 1 THEN         ! VMS
 
75
    $ PRINT FORM
 
76
ELSE                            ! UNIX
 
77
    $ cat FORM | ( fpr || asa ) 2>/dev/null | {SYSCOMS(1:16)}
 
78
ENDIF
 
79
!
 
80
WRITE/OUT "If that produced no error message, FORM will print."
 
81
WRITE/OUT "...otherwise, you will have to print it yourself."
 
82
WRITE/OUT
 
83
WRITE/OUT "(note that it contains FORTRAN carriage control)"
 
84
WRITE/OUT
 
85
WRITE/OUT "      (HELP [PRINTERS] names local printers)"