| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430 |
- Listing:
- 1 IMPLEMENTATION MODULE Globals;
- 2 (*
- 3 Copyright (C) 1988,1989 Jensen & Partners International
- 4 *)
- 5
- 6 IMPORT Lib, Window, IO, Btree, Str, Misc;
- 7
- 8 VAR
- 9 LastH, LastM : CARDINAL;
- 10
- 11
- 12 PROCEDURE Beep();
- 13 BEGIN
- 14 Lib.Speaker(1500,10);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 15 END Beep;
- ***** ^ not supported yet
- 16
- 17
- 18 PROCEDURE WriteAt( row, col : CARDINAL; txt : ARRAY OF CHAR);
- ***** ^ not supported yet
- 19 BEGIN
- 20 Window.GotoXY(col,row);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 21 IO.WrStr(txt);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 22 END WriteAt;
- ***** ^ not supported yet
- 23
- 24
- 25 PROCEDURE GetMenu ( Prompt : ARRAY OF CHAR; OKChars : CharSet;
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 26 VAR ch : CHAR);
- 27 VAR
- 28 OK : BOOLEAN;
- 29 oldWin, MenuWin : Window.WinType;
- ***** ^ not supported yet
- 30 i : CARDINAL;
- 31 BEGIN
- 32 oldWin := Window.Used();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 33 MenuWin := Window.Open( Window.WinDef( 0, 22, 79, 24,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 34 Window.White,Window.Black,TRUE,FALSE,TRUE,TRUE,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 35 Window.SingleFrame,Window.White,Window.Black) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 36 i := Str.Length(Prompt);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 37 Window.Change(MenuWin,((80-i) DIV 2) -2,22, ((80-i) DIV 2) + i + 3, 24);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 38 Window.SetFrame(MenuWin,Window.SingleFrame,DisplayBorder,Window.Black);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 39 Window.Use(MenuWin);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 40 Window.PutOnTop(MenuWin);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 41 Window.TextColor(DisplayFore);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 42 Window.TextBackground(DisplayBack);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 43 IO.WrStr(" ");
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 44 IO.WrStr(Prompt);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 45 OK := FALSE;
- 46 REPEAT
- 47 REPEAT
- 48 UpdateTitle(FALSE);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 49 UNTIL IO.KeyPressed();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 50 ch := CAP(IO.RdKey());
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 51 IF ch IN OKChars THEN
- ***** ^ not supported yet
- 52 OK := TRUE;
- 53 ELSE
- 54 Beep();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 55 END;
- 56 UNTIL OK;
- 57 Window.Close(MenuWin);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 58 Window.Use(oldWin);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 59 Window.PutOnTop(oldWin);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 60 END GetMenu;
- ***** ^ not supported yet
- 61
- 62
- 63 PROCEDURE Compare(key1,key2: ADDRESS ): Btree.CmpRes;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 64 BEGIN
- 65 RETURN Btree.CmpRes(Str.Compare(FileKey(key1^),FileKey(key2^))+1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 66 END Compare;
- ***** ^ not supported yet
- 67
- 68
- 69 PROCEDURE UpdateTitle( All : BOOLEAN );
- 70 VAR
- 71 y, m, d : CARDINAL;
- 72 dow : Lib.DayType;
- ***** ^ not supported yet
- 73 H, M, S, h : CARDINAL;
- 74 Am : BOOLEAN;
- 75 BEGIN
- 76 oldWin := Window.Used();
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 77 Window.Use(TitleWin);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 78 Window.CursorOff();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 79 Window.PutOnTop(TitleWin);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 80 IF All THEN
- 81 Lib.GetDate(y, m, d, dow);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 82 Window.GotoXY(1,1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 83 IO.WrCard(m,2); IO.WrChar('/');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 84 IO.WrCard(d,2); IO.WrChar('/');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 85 IO.WrCard(y,2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 86 IF StoreName[0] > ' ' THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 87 h := Str.Length(StoreName);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 88 Window.GotoXY((79-h) DIV 2,1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 89 IO.WrStr(StoreName);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 90 END;
- 91 END;
- 92 Lib.GetTime(H,M,S,h);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 93 IF (LastH # H) OR (LastM # M) THEN
- 94 Window.GotoXY(70,1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 95 IF H<12 THEN
- 96 Am := TRUE;
- 97 ELSE
- 98 Am := FALSE;
- 99 IF h # 12 THEN
- 100 H := H - 12;
- 101 END;
- 102 END;
- 103 IO.WrCard(H,2); IO.WrChar(':');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 104 IO.WrCard(M,2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 105 IF Am THEN
- 106 IO.WrStr(" am");
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 107 ELSE
- 108 IO.WrStr(" pm");
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 109 END;
- 110 IF M<10 THEN
- 111 Window.GotoXY(73,1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 112 IO.WrChar('0');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 113 END;
- 114 LastM := M;
- 115 LastH := H;
- 116 END;
- 117 Window.Use(oldWin);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 118 Window.CursorOn();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 119 Window.PutOnTop(oldWin);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 120 END UpdateTitle;
- ***** ^ not supported yet
- 121
- 122
- 123 BEGIN
- 124
- 125 (* set up default colors *)
- 126 DisplayFore := Window.White;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 127 DisplayBack := Window.Blue;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 128 DataFore := Window.Black;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 129 DataBack := Window.Cyan;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 130 DisplayBorder := Window.LightRed;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 131 PromptFore := Window.Yellow;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 132 PromptBack := Window.Brown;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 133
- 134 TaxRate := 5.0;
- ***** ^ undeclared identifier
- 135
- 136 TitleWin := Window.Open( Window.WinDef( 0, 0, 79, 2,
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 137 Window.White, Window.Black, TRUE, FALSE, TRUE, TRUE,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 138 Window.DoubleFrame, Window.White, Window.Black) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 139 Window.SetFrame(TitleWin, Window.DoubleFrame, PromptFore,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 140 PromptBack);
- ***** ^ undeclared identifier
- 141 Window.Use(TitleWin);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 142 Window.Clear();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 143
- 144 DisplayWin := Window.Open( Window.WinDef( 0, 3, 79, 22,
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 145 Window.White, Window.Black, TRUE, FALSE, TRUE, TRUE,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 146 Window.DoubleFrame, Window.White, Window.Black) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 147 Window.SetFrame(DisplayWin, Window.DoubleFrame, DisplayBorder,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 148 DisplayBack);
- ***** ^ undeclared identifier
- 149 Window.Use(DisplayWin);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 150 Window.TextColor(DisplayFore);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 151 Window.TextBackground(DisplayBack);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 152 Window.Clear();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 153 LastH := 0; LastM := 0;
- 154
- 155 END Globals.
- ***** ^ not supported yet
- 269 errors
|