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

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

I don't know this code well enough to review.

Joel should look at this.

Revision history for this message
JSHER (joel-sher) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'mumps/ZOSV2GTM.m'
2--- mumps/ZOSV2GTM.m 1970-01-01 00:00:00 +0000
3+++ mumps/ZOSV2GTM.m 2009-04-16 19:24:27 +0000
4@@ -0,0 +1,66 @@
5+%ZOSV2 ;ISF/RWF - More GT.M support routines ;11/06/2003 07:50
6+ ;;8.0;KERNEL;**275,MSC**;Jul 10, 1995
7+ Q
8+ ;SAVE: DIE open array reference.
9+ ; XCN is the starting value to $O from.
10+SAVE(RN) ;Save a routine
11+ N %,%F,%I,%N,SP,$ETRAP
12+ S $ETRAP="S $ECODE="""" Q"
13+ S %I=$I,SP=" ",%F=$$RTNDIR^%ZOSV()_RN_".m"
14+ O %F:(newversion:noreadonly:blocksize=2048:recordsize=2044) U %F
15+ F S XCN=$O(@(DIE_XCN_")")) Q:XCN'>0 S %=@(DIE_XCN_",0)") Q:$E(%,1)="$" I $E(%)'=";" W $P(%,SP)_$C(9)_$P(%,SP,2,99999),!
16+ C %F ;S %N=$$NULL
17+ ;C %N
18+ U %I
19+ ZLINK RN
20+ Q
21+NULL() ;Open and use null to hide talking. Return open name
22+ ;Doesn't work for compile errors
23+ N %N S %N=$S($ZV["VMS":"NLA0:",1:"/dev/nul")
24+ O %N U %N
25+ Q %N
26+ ;
27+DEL(RN) ;Delete a routine file, both source and object.
28+ ; Since the actual routine may be somewhere in a search path, and may be shared
29+ ; with other environments, this places a routine in the first source directory in
30+ ; the search path, which, if executed, generates an error to the effect that the
31+ ; called routine doesn't exist (i.e., it's a way to effect a deletion without
32+ ; actually deleting the routine).
33+ N %N,%DIR,%I,$ETRAP,%F,%O,%S
34+ S $ETRAP="S $ECODE="""" Q"
35+ D SILENT^%RSEL(RN) S %S=%ZR(RN) ; %S now has the directory of the source
36+ D SILENT^%RSEL(RN,"OBJ") S %O=%ZR(RN) ; %O now has the directory of the object
37+ S %DIR=$$RTNDIR^%ZOSV ; %DIR now has the first source directory in $ZRO
38+ S %N=$TR(RN,"%","_") ; %N now has the file name for RN (sans extension)
39+ I $ZPARSE(%S)'=$ZPARSE(%DIR) D
40+ .S %I=$I,%F=%DIR_%N_".m"
41+ .O %F:(NEWVERSION) U %F W " ZM 150374338:$P($ZPOS,""^"",2) Q",! U %I C %F
42+ E ZSY "rm -f "_%S_%N_".m "_%S_%N_".o"
43+ Q
44+ ;LOAD: DIF open array to receive the routine lines.
45+ ; XCNP The starting index -1.
46+LOAD(RN) ;Load a routine
47+ N %
48+ S %N=0 F XCNP=XCNP+1:1 S %N=%N+1,%=$T(+%N^@RN) Q:$L(%)=0 S @(DIF_XCNP_",0)")=%
49+ Q
50+ ;
51+LOAD2(RN) ;Load a routine
52+ N %,%1,%F,%N,$ETRAP
53+ S %I=$I,%F=$$RTNDIR^%ZOSV()_$TR(RN,"%","_")_".m"
54+ O %F:(readonly):1 Q:'$T U %F
55+ F XCNP=XCNP+1:1 R %1:1 Q:'$T!$ZEOF S @(DIF_XCNP_",0)")=$TR(%1,$C(9)," ")
56+ C %F I $L(%I) U %I
57+ Q
58+ ;
59+RSUM(RN) ;Calculate a RSUM value
60+ N %,DIF,XCNP,%N,Y,$ETRAP K ^TMP("RSUM",$J)
61+ S $ETRAP="S $ECODE="""" Q"
62+ S Y=0,DIF="^TMP(""RSUM"",$J,",XCNP=0 D LOAD2(RN)
63+ F %=1,3:1 S %1=$G(^TMP("RSUM",$J,%,0)),%3=$F(%1," ") Q:'%3 S %3=$S($E(%1,%3)'=";":$L(%1),$E(%1,%3+1)=";":$L(%1),1:%3-2) F %2=1:1:%3 S Y=$A(%1,%2)*%2+Y
64+ K ^TMP("RSUM",$J)
65+ Q Y
66+ ;
67+TEST(RN) ;Special GT.M Test to see if routine is here.
68+ D SILENT^%RSEL(RN)
69+ Q $G(%ZR(RN))
70+

Subscribers

People subscribed via source and target branches