XQH2 ;LL/THM,SEA/AMF,JLI - HELP PROCESSOR ;9/29/92 15:10 ; [ 04/02/2003 8:29 AM ]
;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
;;8.0;KERNEL;;Jul 10, 1995
EDIT ;
N Y S DIE="^DIC(9.2,",DA=XQHY
S XQW=$P(X,"^E",2) S DR=$S('$L(XQW):".01;1;2;4///N;3.5",XQW="N":".01",XQW="R":"3.5",XQW="T":"2;4///N;3.5",1:"1") D ^DIE I "NH"[XQW G OUT
K DR S DR="3" D ^DIE
OUT K XQW Q
LOADKW ;
I "Nn"[$E(X,1) S X="" Q
I "Yy"'[$E(X,1) K X Q
K XQKW S %XQK=0 F %XQJ=1:1 S %XQK=$O(^DIC(9.2,DA,1,%XQK)) Q:%XQK="" S %XQJ=^(%XQK,0) F XQL=1:1 S XQKW=$P($P(%XQJ,"]",XQL),"[",2) Q:'$L(XQKW) D UPPER S XQKW(XQKW)=""
S XQKW=-1,%XQJ=0 F S XQKW=$O(XQKW(XQKW)) Q:XQKW="" I '$D(^DIC(9.2,DA,2,"B",XQKW)) W:'%XQJ !!,"Please assign related frames to these new keywords: " W !?5,XQKW S %XQJ=%XQJ+1
G:'%XQJ NONEW S:'$D(^DIC(9.2,DA,2,0)) ^(0)="^9.22^0^0" S %XQI=^(0),%XQK=$P(%XQI,U,4),%XQI=$P(%XQI,U,3)+1
S XQKW=0 F S XQKW=$O(XQKW(XQKW)) Q:XQKW="" I '$D(^DIC(9.2,DA,2,"B",XQKW)) D ADD
S ^DIC(9.2,DA,2,0)="^9.22^"_%XQI_U_%XQK
NONEW S XQKW=-1,%XQJ=0 F S XQKW=$O(^DIC(9.2,DA,2,"B",XQKW)) Q:XQKW="" I '$D(XQKW(XQKW)) W:'%XQJ !!,"The following keywords do not appear in text. You may wish to delete." S %XQJ=%XQJ+1 W !?5,XQKW
S X="" W ! K XQKW
Q
UPPER S %XQHI=XQKW,XQKW="" F %XQHJ=1:1:$L(%XQHI) S XQKWC=$E(%XQHI,%XQHJ),XQKW=XQKW_$S(XQKWC?1L:$C($A(XQKWC)-32),1:XQKWC)
K %XQHI,%XQHJ,XQKWC
Q
ADD I $D(^DIC(9.2,DA,2,%XQI)) S %XQI=%XQI+1 G ADD
S ^DIC(9.2,DA,2,%XQI,0)=XQKW,^DIC(9.2,DA,2,"B",$E(XQKW,1,30),%XQI)="",%XQK=%XQK+1
Q
HELP ;
W !!,"Select one of the following responses: ",!?5,"<return> - to back up a level"
I 'XQBL W !?5,$S((IORV="["):"Bracketed ",1:"Highlighted "),"keyword " W:'%XQI "or number" W " to indicate a related help frame"
W !?5,"'^Q' - to quit the help system",!?5,"'^R' - to refresh this frame"
I 'XQBL W !?5,"'^T' - ",$S(%XQI:"table of related frames",1:"text")
W !?5,"'^O' - ","on/off switch for bracketing/reverse video of keywords"
W !?5,"'^H' - to see how you got here"
I XQAU W !?5,"'^E' - to edit the content of this frame.",!?10,"'EN' - to edit the name",!?10,"'EH' - to edit the header",!?10,"'ET' - to edit the text",!?10,"'ER' to edit the related frame list"
Q
HOW ;
W !!,"HOW DID I GET HERE?"
F %XQJ=0:1:(XQHL-1) W !?(%XQJ+1*4),"|",!?(%XQJ+1*4),"|-------> ",XQHR(%XQJ,1)
W !?(XQHL+1*4),"|",!?(XQHL+1*4),"|-------> ",XQHF
Q
HILITE ;
I IORV'="""[""" S IORV="""[""",IORVX="""]""" W !,"Brackets will now be used for keywords." Q
I '$D(IOST(0)) W !,"Terminal type is not defined." Q
I $D(^%ZIS(2,IOST(0),5)) S I=^(5) I $L($P(I,U,4)),$L($P(I,U,5)) S IORV=$P(I,U,4),IORVX=$P(I,U,5) W !,@IORV,"REVERSE VIDEO",@IORVX," will now be used for keywords." Q
W !,"Reverse video not available for this terminal type."
Q
XQH2 ;LL/THM,SEA/AMF,JLI - HELP PROCESSOR ;9/29/92 15:10 ; [ 04/02/2003 8:29 AM ]
+1 ;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
+2 ;;8.0;KERNEL;;Jul 10, 1995
EDIT ;
+1 NEW Y
SET DIE="^DIC(9.2,"
SET DA=XQHY
+2 SET XQW=$PIECE(X,"^E",2)
SET DR=$SELECT('$LENGTH(XQW):".01;1;2;4///N;3.5",XQW="N":".01",XQW="R":"3.5",XQW="T":"2;4///N;3.5",1:"1")
DO ^DIE
IF "NH"[XQW
GOTO OUT
+3 KILL DR
SET DR="3"
DO ^DIE
OUT KILL XQW
QUIT
LOADKW ;
+1 IF "Nn"[$EXTRACT(X,1)
SET X=""
QUIT
+2 IF "Yy"'[$EXTRACT(X,1)
KILL X
QUIT
+3 KILL XQKW
SET %XQK=0
FOR %XQJ=1:1
SET %XQK=$ORDER(^DIC(9.2,DA,1,%XQK))
IF %XQK=""
QUIT
SET %XQJ=^(%XQK,0)
FOR XQL=1:1
SET XQKW=$PIECE($PIECE(%XQJ,"]",XQL),"[",2)
IF '$LENGTH(XQKW)
QUIT
DO UPPER
SET XQKW(XQKW)=""
+4 SET XQKW=-1
SET %XQJ=0
FOR
SET XQKW=$ORDER(XQKW(XQKW))
IF XQKW=""
QUIT
IF '$DATA(^DIC(9.2,DA,2,"B",XQKW))
IF '%XQJ
WRITE !!,"Please assign related frames to these new keywords: "
WRITE !?5,XQKW
SET %XQJ=%XQJ+1
+5 IF '%XQJ
GOTO NONEW
IF '$DATA(^DIC(9.2,DA,2,0))
SET ^(0)="^9.22^0^0"
SET %XQI=^(0)
SET %XQK=$PIECE(%XQI,U,4)
SET %XQI=$PIECE(%XQI,U,3)+1
+6 SET XQKW=0
FOR
SET XQKW=$ORDER(XQKW(XQKW))
IF XQKW=""
QUIT
IF '$DATA(^DIC(9.2,DA,2,"B",XQKW))
DO ADD
+7 SET ^DIC(9.2,DA,2,0)="^9.22^"_%XQI_U_%XQK
NONEW SET XQKW=-1
SET %XQJ=0
FOR
SET XQKW=$ORDER(^DIC(9.2,DA,2,"B",XQKW))
IF XQKW=""
QUIT
IF '$DATA(XQKW(XQKW))
IF '%XQJ
WRITE !!,"The following keywords do not appear in text. You may wish to delete."
SET %XQJ=%XQJ+1
WRITE !?5,XQKW
+1 SET X=""
WRITE !
KILL XQKW
+2 QUIT
UPPER SET %XQHI=XQKW
SET XQKW=""
FOR %XQHJ=1:1:$LENGTH(%XQHI)
SET XQKWC=$EXTRACT(%XQHI,%XQHJ)
SET XQKW=XQKW_$SELECT(XQKWC?1L:$CHAR($ASCII(XQKWC)-32),1:XQKWC)
+1 KILL %XQHI,%XQHJ,XQKWC
+2 QUIT
ADD IF $DATA(^DIC(9.2,DA,2,%XQI))
SET %XQI=%XQI+1
GOTO ADD
+1 SET ^DIC(9.2,DA,2,%XQI,0)=XQKW
SET ^DIC(9.2,DA,2,"B",$EXTRACT(XQKW,1,30),%XQI)=""
SET %XQK=%XQK+1
+2 QUIT
HELP ;
+1 WRITE !!,"Select one of the following responses: ",!?5,"<return> - to back up a level"
+2 IF 'XQBL
WRITE !?5,$SELECT((IORV="["):"Bracketed ",1:"Highlighted "),"keyword "
IF '%XQI
WRITE "or number"
WRITE " to indicate a related help frame"
+3 WRITE !?5,"'^Q' - to quit the help system",!?5,"'^R' - to refresh this frame"
+4 IF 'XQBL
WRITE !?5,"'^T' - ",$SELECT(%XQI:"table of related frames",1:"text")
+5 WRITE !?5,"'^O' - ","on/off switch for bracketing/reverse video of keywords"
+6 WRITE !?5,"'^H' - to see how you got here"
+7 IF XQAU
WRITE !?5,"'^E' - to edit the content of this frame.",!?10,"'EN' - to edit the name",!?10,"'EH' - to edit the header",!?10,"'ET' - to edit the text",!?10,"'ER' to edit the related frame list"
+8 QUIT
HOW ;
+1 WRITE !!,"HOW DID I GET HERE?"
+2 FOR %XQJ=0:1:(XQHL-1)
WRITE !?(%XQJ+1*4),"|",!?(%XQJ+1*4),"|-------> ",XQHR(%XQJ,1)
+3 WRITE !?(XQHL+1*4),"|",!?(XQHL+1*4),"|-------> ",XQHF
+4 QUIT
HILITE ;
+1 IF IORV'="""["""
SET IORV="""["""
SET IORVX="""]"""
WRITE !,"Brackets will now be used for keywords."
QUIT
+2 IF '$DATA(IOST(0))
WRITE !,"Terminal type is not defined."
QUIT
+3 IF $DATA(^%ZIS(2,IOST(0),5))
SET I=^(5)
IF $LENGTH($PIECE(I,U,4))
IF $LENGTH($PIECE(I,U,5))
SET IORV=$PIECE(I,U,4)
SET IORVX=$PIECE(I,U,5)
WRITE !,@IORV,"REVERSE VIDEO",@IORVX," will now be used for keywords."
QUIT
+4 WRITE !,"Reverse video not available for this terminal type."
+5 QUIT