RGUTIN0 ;CAIRO/DKM - Platform-dependent operations;04-Sep-1998 11:26;DKM
;;2.1;RUN TIME LIBRARY;;Mar 22, 1999
;=================================================================
VER() Q $P($T(+2),";",3)
CVTFN(RGFIL,RGROOT) ;
N RGZ,RGZ1,RGD
S RGD=$$DIRDLM,RGROOT=$G(RGROOT)
S:$E(RGROOT,$L(RGROOT))=$E(RGD,3) RGROOT=$E(RGROOT,1,$L(RGROOT)-1)
S RGZ=$L(RGFIL,"/"),RGZ1=$P(RGFIL,"/",1,RGZ-1),RGFIL=$P(RGFIL,"/",RGZ)
S:$L(RGZ1) RGROOT=RGROOT_$E(RGD,$S($L(RGROOT):2,1:1))_$TR(RGZ1,"/.-",$E(RGD,2))
Q RGROOT_$S($L(RGROOT):$E(RGD,3),1:"")_RGFIL
RM(X) X ^%ZOSF("RM")
Q
TEST(X) N Z
S:X[U Z=$P(X,U),X=$P(X,U,2)
X ^%ZOSF("TEST")
Q $S('$T:0,$G(Z)="":1,Z'?.1"%"1.AN:0,1:$T(@Z^@X)'="")
ETRAP() Q $$NEWERR^%ZTER
OPENX(X1,X2) ;
D OPEN(.X1,.X2)
Q X1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRGUTIN0 765 printed Dec 13, 2024@02:37:17 Page 2
RGUTIN0 ;CAIRO/DKM - Platform-dependent operations;04-Sep-1998 11:26;DKM
+1 ;;2.1;RUN TIME LIBRARY;;Mar 22, 1999
+2 ;=================================================================
VER() QUIT $PIECE($TEXT(+2),";",3)
CVTFN(RGFIL,RGROOT) ;
+1 NEW RGZ,RGZ1,RGD
+2 SET RGD=$$DIRDLM
SET RGROOT=$GET(RGROOT)
+3 if $EXTRACT(RGROOT,$LENGTH(RGROOT))=$EXTRACT(RGD,3)
SET RGROOT=$EXTRACT(RGROOT,1,$LENGTH(RGROOT)-1)
+4 SET RGZ=$LENGTH(RGFIL,"/")
SET RGZ1=$PIECE(RGFIL,"/",1,RGZ-1)
SET RGFIL=$PIECE(RGFIL,"/",RGZ)
+5 if $LENGTH(RGZ1)
SET RGROOT=RGROOT_$EXTRACT(RGD,$SELECT($LENGTH(RGROOT):2,1:1))_$TRANSLATE(RGZ1,"/.-",$EXTRACT(RGD,2))
+6 QUIT RGROOT_$SELECT($LENGTH(RGROOT):$EXTRACT(RGD,3),1:"")_RGFIL
RM(X) XECUTE ^%ZOSF("RM")
+1 QUIT
TEST(X) NEW Z
+1 if X[U
SET Z=$PIECE(X,U)
SET X=$PIECE(X,U,2)
+2 XECUTE ^%ZOSF("TEST")
+3 QUIT $SELECT('$TEST:0,$GET(Z)="":1,Z'?.1"%"1.AN:0,1:$TEXT(@Z^@X)'="")
ETRAP() QUIT $$NEWERR^%ZTER
OPENX(X1,X2) ;
+1 DO OPEN(.X1,.X2)
+2 QUIT X1