Skip to content

Commit

Permalink
NO.: 14638 VERSION: 22.2
Browse files Browse the repository at this point in the history
  TAG: ENff                             ROUTINE NAME OR GLOBAL REF: DDSRP
  REPORTER: SMH                         DATE CHANGED: JAN 25,2013
  PROGRAMMER: SAM HABIEL
  CHANGE: Now prints properly without using IOP=P
  DOCUMENTATION NEEDED: YES
  DOCUMENTATION NOTES: New feature for screenman
  NEW VERSION: <22.2>
 DETAILED TESTING INSTRUCTIONS:
 In a screenman form, hit F1-P. Try various combinations for printing
 (screen, hfs, real printer). Everything should work properly.
  • Loading branch information
Fileman Development committed Jan 25, 2013
1 parent dce5a32 commit 762078e
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions routines/fileman/DDSRP.m
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
DDSRP ;GFT/GFT - PRINT FORM 'DDS', PAGE 'DDS3P';24JAN2013
;;22.2T1;VA FILEMAN;;Dec 14, 2012
DDSRP ;GFT/GFT - PRINT FORM 'DDS', PAGE 'DDS3P';2013-01-25 12:19 PM
;;22.2V0;VA FILEMAN;;Dec 14, 2012
;Per VHA Directive 2004-038, this routine should not be modified.
EN(DDS,DDS3P,DDSJ) ; Main Entry Point
I '$G(DDSJ) S DDSJ=$J
N X,Y,IOP,POP,BLK,DDSREFS,DDSREFT
S DDSREFT=$NA(^TMP("DDS",DDSJ,DDS))
S DDSREFS=$NA(^DIST(.403,+DDS,"AY"))
K ^UTILITY($J,"DDSRP")
S IOP="P" D ^%ZIS I POP D HLP^DDSUTL("SORRY, I CANNOT FIND YOUR PRINTER") Q
D HLP^DDSUTL("PRINTING TO "_IO_" ...")
U IO
D CAP,BLKS,PRINT
;Set terminal characterstics for scroll mode
W *27,"[?1000l" ; Mouse Off
W $P(DDGLCLR,DDGLDEL,2) ; Clear ALL screen
S DX=0,DY=0 X IOXY ; Take cursor to 0,0
W $P(DDGLVID,DDGLDEL)_"PRINT SCREEN"_$P(DDGLVID,DDGLDEL,10) ; Write to screen in bold
D KILL^DDGLIB0() ; Turn off screen handling
D ^%ZIS ; Select Device
I POP D HLP^DDSUTL("SORRY, PRINTING FAILED") G ENQ ; Quit if can't open
I $E(IOST,1,2)="C-" S IOF="!" ; On a terminal, make Form Feed a Line Feed
U IO ; Use printer device
D CAP,BLKS,PRINT ; This is where the printing really happens.
D ; Block to new DDS so that the reader can't find it for writing to screen
. N DDS,DIR I $E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR ; Press Enter to continue
D ^%ZISC ; Close device
ENQ ; Goto label in case we fail to open the device.
D INIT^DDGLIB0() ; Turn screen handling back on again.
I $G(DDS)>0 W *27,"[?1000h" ; Mouse On
D FINISH^DDGLIBP() ; Turn on terminators, off echo, and set RM to zero.
Q
BLKS ;FROM ^DDSR
S BLK=$P($G(^DIST(.403,+DDS,40,DDS3P,0)),U,2) ;Hdr blk
Expand All @@ -26,7 +40,6 @@
F Y=0:1:$O(^UTILITY($J,"DDSRP",""),-1) W !,$G(^UTILITY($J,"DDSRP",Y)) S DDSI=DDSI+1 I $G(IOSL),DDSI'<IOSL S DDSI=1 I $G(IOF)]"" W @IOF
W ! F Y=1:1:80 W "_"
W:$D(IOF) @IOF
D ^%ZISC,INIT^DDGLIB0()
Q
;
CAP N DDCAP,A,C,C1,C2,P,PC,V ; FROM ^DDSR1
Expand Down

0 comments on commit 762078e

Please sign in to comment.