[613] | 1 | XQUTL ;SEA/Luke - Menu System Utilities ;04/27/98 12:36
|
---|
| 2 | ;;8.0;KERNEL;**46**;Jul 10, 1995
|
---|
| 3 | ;
|
---|
| 4 | CSYN(XQUSR) ;Collect XQUSR's menu synonyms in ^XUTL("XQ",$J,"SYN")
|
---|
| 5 | N %,XQSYN
|
---|
| 6 | S (XQI,XQSOP,%)=0
|
---|
| 7 | S XQSOP=$O(^VA(200,XQUSR,203,XQSOP)) Q:XQSOP="" I $L($P(^(XQSOP,0),U,2)) S X=^(0) D
|
---|
| 8 | .S ^XUTL("XQ",XQUSR,"SYN",$P(X,U,2))=+X_"^"_$P(^DIC(19,+X,0),U,2)
|
---|
| 9 | .;W !?5,$P(X,U,2),?10,^XUTL("XQ",XQUSR,"SYN",$P(X,U,2))
|
---|
| 10 | .Q
|
---|
| 11 | Q
|
---|
| 12 | ;
|
---|
| 13 | ;
|
---|
| 14 | PSYN(XQUSR) ;Print XQUSR's collected synonyms
|
---|
| 15 | N %
|
---|
| 16 | I '$D(^XUTL("XQ",XQUSR,"SYN")) D CSYN(XQUSR)
|
---|
| 17 | I '$D(^XUTL("XQ",XQUSR,"SYN")) W !?5,$P(^VA(200,XQUSR,0),",",2)_" "_$P(^(0),",")," has no synonyms defined.",! Q
|
---|
| 18 | S %="" F S %=$O(^XUTL("XQ",XQUSR,"SYN",%)) Q:%="" W !?5,%,?12,$P(^(%),U,2)
|
---|
| 19 | Q
|
---|
| 20 | ;
|
---|
| 21 | ;
|
---|
| 22 | KSNY ;Kill off all ^XUTL("XQ",duz,"SYN") nodes
|
---|
| 23 | N %
|
---|
| 24 | S %=0 F S %=$O(^XUTL("XQ",%)) Q:%="" K ^(%,"SYN")
|
---|
| 25 | Q
|
---|
| 26 | ;
|
---|
| 27 | ;
|
---|
| 28 | DISPLAY ;Display the XQUIT MESSAGE field of the Option File
|
---|
| 29 | I '$D(XQD) S XQD=XQY
|
---|
| 30 | I $D(^DIC(19,XQD,21)) D
|
---|
| 31 | .S XQIEN=XQD_","
|
---|
| 32 | .S %=$$GET1^DIQ(19,XQIEN,21,"","XQUT")
|
---|
| 33 | .D PRINT(.XQUT)
|
---|
| 34 | .K XQUT
|
---|
| 35 | .Q
|
---|
| 36 | Q
|
---|
| 37 | ;
|
---|
| 38 | PRINT(XQUT) ;Print out the array XQUT()
|
---|
| 39 | N %,XQLN,XQNL,XQSL
|
---|
| 40 | ;
|
---|
| 41 | I '$D(IOSL)#2 S IOP="HOME" D ^%ZIS
|
---|
| 42 | I '$D(IOSL)!('$L(IOSL)) S IOSL=20
|
---|
| 43 | S XQSL=IOSL-3
|
---|
| 44 | ;
|
---|
| 45 | I '$D(IOM)#2 S IOP="HOME" D ^%ZIS
|
---|
| 46 | I '$D(IOM)!('$L(IOM)) S IOM=80
|
---|
| 47 | ;
|
---|
| 48 | ;Count the lines and remove the tabs
|
---|
| 49 | S XQNL=0
|
---|
| 50 | F %=0:1 S XQLINE=$O(XQUT(%)) Q:XQLINE="" D
|
---|
| 51 | .S XQNL=XQNL+1
|
---|
| 52 | .I XQUT(XQLINE)["|TAB|" D
|
---|
| 53 | ..N T,L,X S T="|TAB|",L=XQUT(XQLINE),X=""
|
---|
| 54 | ..F S X=$P(L,T)_" "_$P(L,T,2,99) Q:X'[T
|
---|
| 55 | ..S XQUT(XQLINE)=X
|
---|
| 56 | ..Q
|
---|
| 57 | .Q
|
---|
| 58 | ;
|
---|
| 59 | RESTART ;Write the lines of text to the screen
|
---|
| 60 | S XQLINE=0
|
---|
| 61 | I $D(IOF) W @IOF
|
---|
| 62 | F %=1:1:XQNL Q:$D(XQEXIT) D
|
---|
| 63 | .S XQLINE=XQLINE+1
|
---|
| 64 | .S:$L(XQUT(%))>IOM XQLINE=XQLINE+1
|
---|
| 65 | .W !,XQUT(%) I XQLINE'<XQSL D
|
---|
| 66 | ..D PAUSE(.XQSL)
|
---|
| 67 | ..S XQLINE=0
|
---|
| 68 | ..I $D(IOF) W @IOF
|
---|
| 69 | ..Q
|
---|
| 70 | .Q
|
---|
| 71 | ;
|
---|
| 72 | I '$D(XQEXIT) D
|
---|
| 73 | .I XQLINE<XQSL-1 D
|
---|
| 74 | ..W !!,"**> END OF MESSAGE"
|
---|
| 75 | ..D PAUSE(.XQSL)
|
---|
| 76 | ..Q
|
---|
| 77 | .E D PAUSE(.XQSL)
|
---|
| 78 | .Q
|
---|
| 79 | ;
|
---|
| 80 | I $D(XQREST) K XQEXIT,XQREST G RESTART
|
---|
| 81 | K XQEXIT,XQREST
|
---|
| 82 | Q
|
---|
| 83 | ;
|
---|
| 84 | PAUSE(XQSL) ;Pause after a screen load and allow the adjustment of XQSL
|
---|
| 85 | N XQUR
|
---|
| 86 | ;W !!," *****> XQSL = ",XQSL," XQLN = ",XQNL
|
---|
| 87 | R !!,"RETURN to continue, ""^"" to halt, ""B"" to backup, or ""?"" for more options: ",XQUR:DTIME S:'$T XQUR=U
|
---|
| 88 | I $E(XQUR,1)="?" S XQH=785 D EN^XQH S (XQREST,XQEXIT)=1
|
---|
| 89 | I XQUR]"","+-"[$E(XQUR,1) S XQSL=XQSL+XQUR S (XQREST,XQEXIT)=""
|
---|
| 90 | I XQUR]"","bB"[$E(XQUR,1) S (XQREST,XQEXIT)=1
|
---|
| 91 | I XQUR=U S XQEXIT=""
|
---|
| 92 | Q
|
---|
| 93 | ;
|
---|
| 94 | HOLD ;Just hold the screen from moving until a RETURN is typed
|
---|
| 95 | N %
|
---|
| 96 | I $D(IOM) S %=(IOM-42)/2 S:(%'>1) %=1
|
---|
| 97 | E S %=1
|
---|
| 98 | R !!?%,"Hit the ""Enter"" or ""Return"" Key to Continue",%:DTIME
|
---|
| 99 | W !
|
---|
| 100 | Q
|
---|