cyui ;Copyright (c) 1988 CyberTools, Inc. ;07:34 AM 4 Jul 1991 ;;CyberM Utilities are a group MUMPS routines which create support files ;;for all CyberM functions. For example, all device attributes, operators, ;;and control is established in the CyberM routines. ;; ;;CyberM routines interface to miscellaneous devices & MUMPS implementations. ;;CyberM's pop-up menus & application read are found in the CyberM Utilities. ; CTL W !!,"*** Initializing CyberM ***" D CTL^cyuos D OPTIONS CTL1 D @$S($P(^cy0,"^")'="MVM":"DEVICES",1:"MVMDEV") I '$D(^cy0("keys")) W !!,"You must select a terminal!!",*7 R a#2 G CTL1 D ZB D KMINIT S ^cy="W cu(""a""),cu(""g"",0),cu(""cs"") K dp,cu(""zm""),^cyz($J) S cu(8)="""" I cu(""~"")>0 S cu(""~"")=1 D off^cyuos" D ^cyui00,^cyui01 I $P(^cy0,"^")="MUMPS/VM",$O(^cy0("att","IBM327/"))["IBM3270" S a=^cy0("site") I $P(a,"^",9)="",$P(a,"^",10)=1 S $P(^("site"),"^",9)=">" Q ; OPTIONS S a=$S($D(^cy0("site")):^cy0("site"),1:"") S b="1^0^1^DEVELOPMENT^Y^N^N^8191^^1" I $P(^cy0,"^")="MVM" S $P(b,"^",9)="==>",$P(b,"^",10)=0 F c=1:1:$L(b,"^") I $P(a,"^",c)="" S $P(a,"^",c)=$P(b,"^",c) S b=1,c="Require carriage return on menus (Y/N)?" D ASK S b=2,c="Reset margin to autowrap:" D ASK S b=3,c="Port selector, patch panel or modems (Y/N)?" D ASK S b=4,c="System Name:" D ASK S b=5,c="Do you have CY-S (Y/N)?" D ASK S b=6,c="Do you have CY-DD (Y/N)?" D ASK S b=7,c="Do you have CY-T (Y/N)?" D ASK S ^cy0("site")=a K a,b,c I '$D(^cy0("site","t")) S ^("t")="I 1" Q ; ASK I b=1!(b=3) S $P(a,"^",b)=$E("NY",$P(a,"^",b)+1) W !,b,") ",c," (",$P(a,"^",b),") " R d S:d="" d=$P(a,"^",b) I d="" W *7," Mandatory." G ASK I $S(b=2:d'?1.3N,b<4:d'="Y"&(d'="N"),1:0) W *7," Invalid answer." G ASK I b=1!(b=3) S d=$S(d="N":0,1:1) S $P(a,"^",b)=d Q ; DEVICES S a=$P(^cy0,"^") S b=$S(a="MUMPS/VM":"^cyuoibm1",a="DTM":"^cyuodtm1",a="MSM":"^cyuomsm1",1:"") D:b]"" @b D ^cyud1,^cyud2,^cyud3,^cyud6,^cyud4,^cyud5 Q ; MVMDEV D ^cyud3,^cyuomvm1,^cyuomvm2 Q ; ZB W !,"Setting up function keys." S a="" F i=0:0 S a=$O(^cy0("keys",a)) Q:a="" I $D(^cy0("dev",a)) W !,a D ZB^cyuos Q ; KMINIT K ^cy0("km",1) S ^(1)="Function Keys^Options",c=0 F i=0:1 S a=$T(KM+i) Q:a=" ;;" S a=$P(a,";;",2),^cy0("km",1,+a)=$P(a,"^",2) I +a<200 S c=c+1 Q ; KM ;;3^Enter ;;4^Help 1 ;;5^Help 2 ;;6^Exit ;;7^Cancel ;;9^Options ;;21^Up ;;22^Down ;;23^Right ;;24^Left ;;25^Previous Word ;;26^Next Word ;;27^BOL ;;28^EOL ;;29^Tab ;;41^Top ;;42^Bottom ;;43^Scroll Up ;;44^Scroll Down ;;45^Previous Screen ;;46^Next Screen ;;61^Insert Character ;;63^Insert Line ;;64^Clip ;;65^Paste ;;71^Remove Character ;;72^Rubout ;;73^Remove Line ;;74^Remove Word ;;81^Erase ;;82^Case ;;100^Prefix Key ;;102^Prefix Key 1 ;;103^Prefix Key 2 ;;104^Prefix Key 3 ;;105^Prefix Key 4 ;;106^Prefix Key 5 ;;107^Prefix Key 6 ;;108^Prefix Key 7 ;;109^Prefix Key 8 ;;200^System Key ;;201^System Key 1 ;;202^System Key 2 ;;203^System Key 3 ;;204^System Key 4 ;;205^System Key 5 ;;206^System Key 6 ;;207^System Key 7 ;;208^System Key 8 ;;209^System Key 9 ;;230^Application Key ;;231^Application Key 1 ;;232^Application Key 2 ;;233^Application Key 3 ;;234^Application Key 4 ;;235^Application Key 5 ;;236^Application Key 6 ;;237^Application Key 7 ;;238^Application Key 8 ;;239^Application Key 9 ;;