Listing: 1 IMPLEMENTATION MODULE KbdInput; 2 (* 3 * REPERTOIRE 4 * Release 1.6 5 * By Charles Bradford and Cole Brecheen 6 * (c) Copyright 1985-1992 PMI 7 * Green Bay, Wisconsin 8 * All rights reserved 9 * (414) 468-6040 10 * 11 * $Header: D:/logfiles/mods/kbdinput.mov 1.8 17 Mar 1991 17:56:26 coleb $ 12 * 13 *) 14 15 16 IMPORT BigSets; 17 IMPORT ErrorManager; 18 IMPORT FAPI; 19 IMPORT LowLevel; 20 IMPORT M2Strings; 21 IMPORT StrConv; 22 IMPORT StrEdit; 23 IMPORT StringIO; 24 IMPORT SYSTEM; 25 26 VAR 27 Initialized : BOOLEAN; 28 29 VAR 30 KbdState: FAPI.KBDINFO; ***** ^ not supported yet 31 32 33 PROCEDURE DefaultKeyHit( LegalKeys: KeyNumSet ): CARDINAL; ***** ^ undeclared identifier 34 VAR 35 CharData: FAPI.KBDKEYINFO; ***** ^ not supported yet 36 bufch: CHAR; 37 TmpResult: CARDINAL; 38 BEGIN 39 REPEAT 40 IF NOT TypeAheadLegal THEN ***** ^ undeclared identifier 41 TmpResult:=FAPI.KBDFLUSHBUFFER(0) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 42 END; 43 44 IF FAPI.KBDCHARIN(SYSTEM.ADR(CharData), 0, 0) # 0 THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 45 ErrorManager.WARN( "KBDCHARIN"); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 46 END; 47 IF (CharData.chChar = FAPI.UCHAR(0C)) OR ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 48 (CharData.chChar = FAPI.UCHAR(CHR(0E0H))) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 49 TmpResult := ORD(CharData.chScan) + Extended; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 50 ELSE 51 TmpResult := ORD(CharData.chChar); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 52 END; 53 UNTIL BigSets.InSet(LegalKeys, TmpResult); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 54 RETURN(TmpResult); 55 END DefaultKeyHit; ***** ^ not supported yet 56 57 58 PROCEDURE CAPkey( KeyNum: CARDINAL ): CARDINAL; 59 (*This routine serves the same function for numeric key 60 values that CAP serves for ASCII values.*) 61 BEGIN 62 IF (KeyNum >= 97) (*ORD('a')*) 63 AND (KeyNum <= 122) (*ORD('z')*) THEN 64 RETURN KeyNum - 32; (*ORD('a') - ORD('A')*) 65 ELSE 66 RETURN KeyNum; 67 END; 68 END CAPkey; ***** ^ not supported yet 69 70 71 PROCEDURE ReassignKey(KeyCode : CARDINAL; NewDefn : 72 ARRAY OF CHAR); ***** ^ not supported yet 73 BEGIN 74 END ReassignKey; ***** ^ not supported yet 75 76 77 PROCEDURE Init(); 78 BEGIN 79 IF Initialized THEN 80 RETURN; 81 ELSE 82 Initialized := TRUE; 83 END; 84 85 BigSets.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 86 ErrorManager.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 87 LowLevel.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 88 M2Strings.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 89 StrConv.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 90 StrEdit.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 91 StringIO.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 92 93 (*EntryDiag: 94 StringIO.WriteEol( 1, 'Entering KbdInput' ); 95 :EntryDiag*) 96 97 KeyHit := DefaultKeyHit; ***** ^ undeclared identifier ***** ^ not supported yet 98 TypeAheadLegal := TRUE; ***** ^ undeclared identifier 99 BigSets.InitSet( AnyKeyNum ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 100 BigSets.AppendSet( AnyKeyNum, "{0..400}" ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 101 BigSets.InitSet( YorN ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 102 BigSets.AppendSet( YorN, "{'y', 'Y', 'n', 'N'}" ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 103 104 KbdState.cb := SYSTEM.TSIZE(FAPI.KBDINFO); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 105 KbdState.fsMask := FAPI.KEYBOARD_BINARY_MODE; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 106 IF FAPI.KBDSETSTATUS(SYSTEM.ADR(KbdState), 0) # 0 THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 107 ErrorManager.WARN("KBDSETSTATUS"); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 108 END; 109 110 (*EntryDiag: 111 StringIO.WriteEol( 1, 'Exiting KbdInput' ); 112 :EntryDiag*) 113 END Init; ***** ^ not supported yet 114 115 116 BEGIN 117 Initialized := FALSE; 118 Init(); ***** ^ not supported yet ***** ^ not supported yet 119 END KbdInput. ***** ^ not supported yet 103 errors