source: WorldVistAEHR/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DIR02.m@ 1042

Last change on this file since 1042 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1DIR02 ;SFISC/MKO-MULTILINE FIELD EDITOR ;3:24 PM 29 Aug 1995
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4EN ;
5 N DIR0FL,DIR0LN,DIR0NC,DIR0QU
6 X DDGLZOSF("EOFF"),DDGLZOSF("TRMON")
7 W $S('$D(DDGLVAN):$P(DDGLVID,DDGLDEL,6),1:"")
8 S DIR0QU=0
9 ;
10 S:$D(DIR0C)#2 DIR0C=DIR0C+1
11 D INIT,^DIR03
12 W $P(DDGLVID,DDGLDEL,7)
13 Q
14 ;
15SM ;ScreenMan's entry point, called from ^DIR01
16 N DIR0DN,DIR0FL,DIR0LN,DIR0NC,DIR0NL
17 S DIR0R=IOSL-6,DIR0S=0,DIR0L=IOM-1,DIR0NL=4
18 ;
19 D INIT,^DIR03
20 ;
21 S:$D(DTOUT) DIR0A=DIR0D
22 ;
23 ;Restore command area
24 S DY=DIR0R,DX=DIR0S X IOXY
25 W $P(DDGLVID,DDGLDEL,10)_$P(DDGLCLR,DDGLDEL,3)
26 ;
27 S DY=IOSL-1
28 I DDO D
29 . S DX=0 X IOXY W "COMMAND:"
30 . S DX=IOM-35 X IOXY W "Press <PF1>H for help"
31 S DX=IOM-8 X IOXY
32 W $S('$D(DDGLVAN):$P(DDGLVID,DDGLDEL,6),1:"")_$S($G(DIR0("REP")):"Replace",1:"Insert ")_$P(DDGLVID,DDGLDEL,10)
33 ;
34 ;Restore variables
35 S (DY,DIR0R)=$P(DIR0,U),(DX,DIR0S)=$P(DIR0,U,2),DIR0L=$P(DIR0,U,3)
36 S DIR0F=DIR0S+DIR0L
37 S DIR0SP=$J("",DIR0L) S:$G(DDGLVAN) DIR0SP=$TR(DIR0SP," ","_")
38 I DIR0A]"","^?"[$E(DIR0A) S DIR0QT=1
39 ;
40 ;Repaint answer
41 X IOXY
42 W:'$D(DDGLVAN) $P(DDGLVID,DDGLDEL,6)
43 I DIR0C>DIR0L D
44 . W $E(DIR0A,DIR0C-DIR0L+1,DIR0C)_$E(DIR0SP,DIR0C>$L(DIR0A))
45 . S DX=DIR0F-1
46 E D
47 . W $E(DIR0A,1,DIR0L)_$E(DIR0SP,$L(DIR0A)+1,999)
48 . S DX=DIR0S+DIR0C-1
49 X IOXY
50 K DTOUT
51 Q
52 ;
53INIT ;Setup
54 K DTOUT
55 S:DIR0M<$L(DIR0A) DIR0M=$L(DIR0A)
56 S DIR0SP=$J("",DIR0L) S:$G(DDSVAN) DIR0SP=$TR(DIR0SP," ","_")
57 ;
58 F DIR0LN=1:1:DIR0NL D
59 . S DY=DIR0R+DIR0LN-1,DX=DIR0S X IOXY
60 . S X=$E(DIR0A,DIR0LN-1*DIR0L+1,DIR0LN*DIR0L)
61 . W X_$E(DIR0SP,$L(X)+1,999)
62 ;
63 S:DIR0NL*DIR0L-1<DIR0M DIR0M=DIR0NL*DIR0L-1
64 S DIR0NL=DIR0M\DIR0L+1,DIR0NC=DIR0M#DIR0L
65 S DIR0F=DIR0S+DIR0L-1,DIR0FL=DIR0S+DIR0NC-1
66 S DIR0SV=$G(DIR0("L")),DIR0DN=0
67 ;
68 S DIR0C=$S($G(DIR0C)<1:1,1:DIR0C)
69 S:DIR0C-1>DIR0M DIR0C=DIR0M+1
70 S DIR0LN=DIR0C\DIR0L+1
71 S DY=DIR0R+DIR0LN-1,DX=DIR0S+(DIR0C#DIR0L)-1
72 X IOXY
73 Q
74 ;
75KILL ;Cleanup all variables
76 D KILL^DDGLIB0()
77 Q
Note: See TracBrowser for help on using the repository browser.