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

« back to all changes in this revision

Viewing changes to prim/proc/printsys.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
! @(#)printsys.prg      19.1 (ESO-DMD) 02/25/03 14:08:59
 
2
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
3
!
 
4
! MIDAS procedure  printsys.prg  to implement PRINT/LOG, PRINT/HELP
 
5
! K. Banse      910104, 910621, 920207
 
6
!
 
7
! executed via @ printsys string
 
8
 
9
! for PRINT/LOG: string = page_def
 
10
! with page_def = pstart,pend           from pstart to pend (incl)
 
11
!                 page_no               only that page
 
12
!                 LAST                  only last page
 
13
!                 -no                   last 'no' pages
 
14
!
 
15
! for PRINT/HELP: string = command or command/qualif
 
16
 
17
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
18
!
 
19
if mid$cmnd(11:11) .eq. "L" then                !PRINT/LOG
 
20
   define/param p1 1,9999 N "Enter pages to print: "
 
21
   write/keyw inputi/i/15/2 {p1},{p1}
 
22
   define/local oldlog/i/1/1 {log(1)}
 
23
   log/off                              !turn logging off
 
24
 
25
   run MID_MONIT:LOGGER
 
26
 
27
   if oldlog .ne. 0 log/on
 
28
   if mid$prnt(1:1) .eq. "T" return
 
29
   if mid$prnt(1:1) .eq. "F" return
 
30
 
31
   @ print.prg print                    !send file to chosen printer
 
32
 
33
else                                    !PRINT/HELP
 
34
   log(3) = 1
 
35
   @ print.prg assign
 
36
   help {p1}
 
37
   log(3) = 0
 
38
   @ print.prg out                      !send file to chosen printer
 
39
endif