Merge lp://staging/~jeff-apple/openvista-gtm-integration/bug332088 into lp://staging/openvista-gtm-integration

Proposed by jeff.apple
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~jeff-apple/openvista-gtm-integration/bug332088
Merge into: lp://staging/openvista-gtm-integration
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~jeff-apple/openvista-gtm-integration/bug332088
Reviewer Review Type Date Requested Status
OpenVista/GT.M Integration Team Pending
Review via email: mp+5776@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
jeff.apple (jeff-apple) wrote :

Is there a reason to remove the code on line 36, 'N $ES,$ET S $ET="G OPNERR^%ZIS4"'?

Shouldn't we just remove it if so, and not comment it out?

Revision history for this message
jeff.apple (jeff-apple) wrote :

Also needs header and patch comments.

25. By jeff.apple

Set header comment
Add back error handling
Suppress GTM-specific code with eXecute

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'mumps/ZIS4GTM.m'
2--- mumps/ZIS4GTM.m 1970-01-01 00:00:00 +0000
3+++ mumps/ZIS4GTM.m 2009-04-22 07:10:37 +0000
4@@ -0,0 +1,91 @@
5+%ZIS4 ;SFISC/AC,RWF,MVB - DEVICE HANDLER SPECIFIC CODE (GT.M 4.3 for Unix/VMS) ;29 Jan 2003 2:59 pm
6+ ;;8.0;KERNEL;**275**;Jul 10, 1995;
7+ ;
8+OPEN G OPN2:$D(IO(1,IO))
9+ S POP=0 D OP1 G NOPEN:'$D(IO(1,IO))
10+OPN2 I $D(%ZISHP),'$D(IOP) W !,*7," Routing to device "_$P(^%ZIS(1,%E,0),"^",1)_$S($D(^(1)):" "_$P(^(1),"^",1)_" ",1:"")
11+ Q
12+NOPEN I %IS'["D",$D(%ZISHP)!(%ZISHG]"") S POP=1 Q
13+ I '$D(IOP) W *7," [BUSY]" W " ... RETRY" S %=2,U="^" D YN^%ZIS1 G OPEN:%=1
14+ S POP=1 Q
15+ Q
16+OP1 S X="OPNERR^%ZIS4",@^%ZOSF("TRAP"),$ZE=""
17+ L:$D(%ZISLOCK) +@%ZISLOCK:60
18+ O IO::%ZISTO S:$T IO(1,IO)="" S:'$T POP=1 L:$D(%ZISLOCK) -@%ZISLOCK
19+ Q
20+OPNERR S POP=1,IO("LASTERR")=$G(IO("ERROR")),IO("ERROR")=$$EC^%ZOSV,$EC="" Q
21+ ;
22+O D:%IS["L" ZIO
23+LCKGBL ;Lock Global
24+ I %ZTYPE="CHAN" N % S %=$G(^%ZIS(1,+%E,"GBL")) I $L(%) L @("+^"_%_":0") S:'$T POP=1 I POP W:'$D(IOP) !,?5,*7,"[DEVICE IS BUSY]" Q
25+ I $D(IO("S")),$D(^%ZIS(2,IO("S"),10)),^(10)]"" U IO(0) D X10^ZISX
26+OPAR I $D(IOP),%ZTYPE="HFS",$D(%IS("HFSIO")),$D(%IS("IOPAR")),%IS("HFSIO")]"" S IO=%IS("HFSIO"),%ZISOPAR=%IS("IOPAR")
27+ I %ZTYPE="CHAN",IO["::""TASK="!(IO["SYS$NET") D ODECNET Q:POP G OXECUTE^%ZIS6
28+ S %A=%ZISOPAR_$S(%ZISOPAR["):":"",%ZTYPE["CHAN"&($P(%ZTIME,"^",3)="n"):"",1:":"_%ZISTO)
29+ N % S %(IO)="",%=$P($P($NA(%(IO)),"(",2),")")
30+ S %A=%_$E(":",%A]"")_%A
31+ D O1 I POP D Q
32+ .I %ZTYPE="HFS",'$D(IOP),$G(IO("ERROR"))["file not found" W !,?5,*7,"[File Not Found]" Q
33+ .W:'$D(IOP) !,?5,*7,"[DEVICE IS BUSY]" Q
34+ ;S IO(1,IO)="" U IO S:'(IO=IO(0)&'$D(IO("S"))&'$D(ZTQUEUED)) $X=0,$Y=0 I %ZTYPE["TRM" U IO:(WIDTH=+%Z91)
35+ U IO S $X=0,$Y=0 I %ZTYPE["TRM" U IO:(WIDTH=+%Z91)
36+ I %ZISUPAR]"" S %A1=""""_IO_""":"_%ZISUPAR U @%A1
37+ ;U:%IS'[0 IO(0)
38+ G OXECUTE^%ZIS6:IO'["lpr"
39+ Q
40+ ;
41+O1 ;N $ES,$ET S $ET="G OPNERR^%ZIS4"
42+ L:$D(%ZISLOCK) +@%ZISLOCK:60
43+ I %A["lpr" S IO="lpr",%A="IO:(COMMAND="_$P(%A,":")_":WRITEONLY)::""PIPE"""
44+ O @%A S:'$T&(%A?.E1":".N) POP=1 S:'POP IO(1,IO)="" L:$D(%ZISLOCK) -@%ZISLOCK
45+ S IO("ERROR")="" Q
46+ ;
47+ ;Need to find out how to get IP address
48+ZIO N %,%1 S (%,%1)=$ZIO
49+ I $ZV["VMS",%["_TNA" D
50+ . S (%,%1)=$ZGETDVI($I,"TT_ACCPORNAM")
51+ . S %=$S(%["Host:":$P($P(%,"Host: ",2)," ")_":"_$P(%,"Port: ",2),1:%) S:%[" " %=$TR(%," ")
52+ I $ZV'["VMS" D
53+ . S (%,%1)=$ZTRNLNM("REMOTEHOST") S:$L(%) %1="Host:"_% S:'$L(%) %=$ZIO
54+ S IO("ZIO")=% S:(%1["Host:")&'$D(IO("IP")) IO("IP")=$P(%,":")
55+ Q
56+ ;
57+ODECNET Q ; fill me in later
58+SPOOL ;%ZDA=pointer to ^XMB(3.51, %ZFN=spool file name.
59+ I $D(ZISDA) W:'$D(IOP) !?5,*7,"You may not Spool the printing of a Spool document" G N
60+ I $D(DUZ)[0 W:'$D(IOP) !,"Must be a valid user." G N
61+R S %ZY=-1 D NEWDOC^ZISPL1 G N:%ZY'>0 S %ZDA=+%ZY,%ZFN=$P(%ZY(0),U,2),IO("DOC")=$P(%ZY(0),U,1) G OK:$D(IO("Q"))
62+ G:'%ZISB OK I '$P(%ZY,"^",3),%ZFN]"" D SPL3 G N:%ZFN']"",DOC
63+ S %ZFN=IO_"SPOOL_no_"_%ZDA_".TMP" D SPL2 G:%ZFN']"" N S $P(^XMB(3.51,%ZDA,0),U,2)=%ZFN,^XMB(3.51,"C",%ZFN,%ZDA)=""
64+DOC S IO=%ZFN,IO("SPOOL")=%ZDA,^XUTL("XQ",$J,"SPOOL")=%ZDA,IOF="#"
65+ I $D(^%ZIS(1,%ZISIOS,1)),$P(^(1),"^",8),$O(^("SPL",0)) S ^XUTL("XQ",$J,"ADSPL")=%ZISIOS,ZISPLAD=%ZISIOS
66+OK K %ZDA,%ZFN Q
67+N K %ZDA,%ZFN,IO("DOC") S POP=1 Q
68+SPL2 O %ZFN:(NEWVERSION:WORLD=RWD) G:$ZA<0 SPL4 S IO(1,%ZFN)="" Q
69+SPL3 N X S X="SPL4^%ZIS4",@^%ZOSF("TRAP")
70+ O %ZFN:READONLY:1 S:'$T ZISPLQ=1 G:$ZA<0!('$T) SPL4 S IO(1,%ZFN)="" Q
71+SPL4 W:'$D(IOP)&'$D(ZTQUEUED) !?5,*7,"Couldn't open the spool file." S %ZFN="" Q
72+CLOSE N %Z1 C:IO]"" IO K:IO]"" IO(1,IO) D FILE^ZISPL1 I %ZDA'>0 K ZISPLAD Q
73+ S %ZFN=$P(%ZS,"^",2) D SPL3 Q:%ZFN']"" U %ZFN S %ZCR=$C(13),%Y="",X="SPLEOF^%ZIS4",@^%ZOSF("TRAP")
74+ S %Z1=+$G(^XTV(8989.3,1,"SPL"))
75+ F %=0:0 R %X#255:5 Q:$ZA<0 S %2=%X D CL2 G:%Z1<% SPLEX
76+SPLEOF I $ZE'["ENDO" Q ;Send error up
77+SPLEX C %ZFN:(DELETE) K:%ZFN]"" IO(1,%ZFN) D CLOSE^ZISPL1 K %Y,%X,%1,%ZFN Q
78+ ;
79+CL2 S %=%+1 I %Z1<% S ^XMBS(3.519,XS,2,%,0)="*** INCOMPLETE REPORT -- SPOOL DOCUMENT LINE LIMIT EXCEEDED ***",$P(^XMB(3.51,%ZDA,0),"^",11)=1 Q
80+ I %2[$C(12) S ^XMBS(3.519,XS,2,%,0)="|TOP|" Q
81+ S ^XMBS(3.519,XS,2,%,0)=%2 Q
82+ ;
83+HFS G HFS^%ZISF
84+REWMT(IO,IOPAR) ;Rewind Magtape
85+ S X="REWERR^%ZIS4",@^%ZOSF("TRAP")
86+ U IO W *5
87+ Q 1
88+REWSDP(IO,IOPAR) ;Rewind SDP
89+ G REW1
90+REWHFS(IO,IOPAR) ;Rewind Host File.
91+REW1 S X="REWERR^%ZIS4",@^%ZOSF("TRAP")
92+ U IO:(REWIND)
93+ Q 1
94+REWERR ;Error encountered
95+ Q 0

Subscribers

People subscribed via source and target branches