GLOBALS.LST 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. Listing:
  2. 1 IMPLEMENTATION MODULE Globals;
  3. 2 (*
  4. 3 Copyright (C) 1988,1989 Jensen & Partners International
  5. 4 *)
  6. 5
  7. 6 IMPORT Lib, Window, IO, Btree, Str, Misc;
  8. 7
  9. 8 VAR
  10. 9 LastH, LastM : CARDINAL;
  11. 10
  12. 11
  13. 12 PROCEDURE Beep();
  14. 13 BEGIN
  15. 14 Lib.Speaker(1500,10);
  16. ***** ^ not supported yet
  17. ***** ^ not supported yet
  18. ***** ^ not supported yet
  19. 15 END Beep;
  20. ***** ^ not supported yet
  21. 16
  22. 17
  23. 18 PROCEDURE WriteAt( row, col : CARDINAL; txt : ARRAY OF CHAR);
  24. ***** ^ not supported yet
  25. 19 BEGIN
  26. 20 Window.GotoXY(col,row);
  27. ***** ^ not supported yet
  28. ***** ^ not supported yet
  29. ***** ^ not supported yet
  30. 21 IO.WrStr(txt);
  31. ***** ^ not supported yet
  32. ***** ^ not supported yet
  33. ***** ^ not supported yet
  34. 22 END WriteAt;
  35. ***** ^ not supported yet
  36. 23
  37. 24
  38. 25 PROCEDURE GetMenu ( Prompt : ARRAY OF CHAR; OKChars : CharSet;
  39. ***** ^ not supported yet
  40. ***** ^ undeclared identifier
  41. 26 VAR ch : CHAR);
  42. 27 VAR
  43. 28 OK : BOOLEAN;
  44. 29 oldWin, MenuWin : Window.WinType;
  45. ***** ^ not supported yet
  46. 30 i : CARDINAL;
  47. 31 BEGIN
  48. 32 oldWin := Window.Used();
  49. ***** ^ not supported yet
  50. ***** ^ not supported yet
  51. ***** ^ not supported yet
  52. ***** ^ not supported yet
  53. 33 MenuWin := Window.Open( Window.WinDef( 0, 22, 79, 24,
  54. ***** ^ not supported yet
  55. ***** ^ not supported yet
  56. ***** ^ not supported yet
  57. ***** ^ not supported yet
  58. ***** ^ not supported yet
  59. 34 Window.White,Window.Black,TRUE,FALSE,TRUE,TRUE,
  60. ***** ^ not supported yet
  61. ***** ^ not supported yet
  62. ***** ^ not supported yet
  63. ***** ^ not supported yet
  64. 35 Window.SingleFrame,Window.White,Window.Black) );
  65. ***** ^ not supported yet
  66. ***** ^ not supported yet
  67. ***** ^ not supported yet
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. 36 i := Str.Length(Prompt);
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. 37 Window.Change(MenuWin,((80-i) DIV 2) -2,22, ((80-i) DIV 2) + i + 3, 24);
  76. ***** ^ not supported yet
  77. ***** ^ not supported yet
  78. ***** ^ not supported yet
  79. ***** ^ not supported yet
  80. 38 Window.SetFrame(MenuWin,Window.SingleFrame,DisplayBorder,Window.Black);
  81. ***** ^ not supported yet
  82. ***** ^ not supported yet
  83. ***** ^ not supported yet
  84. ***** ^ not supported yet
  85. ***** ^ not supported yet
  86. ***** ^ undeclared identifier
  87. ***** ^ not supported yet
  88. ***** ^ not supported yet
  89. 39 Window.Use(MenuWin);
  90. ***** ^ not supported yet
  91. ***** ^ not supported yet
  92. ***** ^ not supported yet
  93. 40 Window.PutOnTop(MenuWin);
  94. ***** ^ not supported yet
  95. ***** ^ not supported yet
  96. ***** ^ not supported yet
  97. 41 Window.TextColor(DisplayFore);
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. ***** ^ undeclared identifier
  101. 42 Window.TextBackground(DisplayBack);
  102. ***** ^ not supported yet
  103. ***** ^ not supported yet
  104. ***** ^ undeclared identifier
  105. 43 IO.WrStr(" ");
  106. ***** ^ not supported yet
  107. ***** ^ not supported yet
  108. ***** ^ not supported yet
  109. 44 IO.WrStr(Prompt);
  110. ***** ^ not supported yet
  111. ***** ^ not supported yet
  112. ***** ^ not supported yet
  113. 45 OK := FALSE;
  114. 46 REPEAT
  115. 47 REPEAT
  116. 48 UpdateTitle(FALSE);
  117. ***** ^ undeclared identifier
  118. ***** ^ not supported yet
  119. 49 UNTIL IO.KeyPressed();
  120. ***** ^ not supported yet
  121. ***** ^ not supported yet
  122. ***** ^ not supported yet
  123. 50 ch := CAP(IO.RdKey());
  124. ***** ^ undeclared identifier
  125. ***** ^ not supported yet
  126. ***** ^ not supported yet
  127. ***** ^ not supported yet
  128. 51 IF ch IN OKChars THEN
  129. ***** ^ not supported yet
  130. 52 OK := TRUE;
  131. 53 ELSE
  132. 54 Beep();
  133. ***** ^ not supported yet
  134. ***** ^ not supported yet
  135. 55 END;
  136. 56 UNTIL OK;
  137. 57 Window.Close(MenuWin);
  138. ***** ^ not supported yet
  139. ***** ^ not supported yet
  140. ***** ^ not supported yet
  141. 58 Window.Use(oldWin);
  142. ***** ^ not supported yet
  143. ***** ^ not supported yet
  144. ***** ^ not supported yet
  145. 59 Window.PutOnTop(oldWin);
  146. ***** ^ not supported yet
  147. ***** ^ not supported yet
  148. ***** ^ not supported yet
  149. 60 END GetMenu;
  150. ***** ^ not supported yet
  151. 61
  152. 62
  153. 63 PROCEDURE Compare(key1,key2: ADDRESS ): Btree.CmpRes;
  154. ***** ^ undeclared identifier
  155. ***** ^ not supported yet
  156. 64 BEGIN
  157. 65 RETURN Btree.CmpRes(Str.Compare(FileKey(key1^),FileKey(key2^))+1);
  158. ***** ^ not supported yet
  159. ***** ^ not supported yet
  160. ***** ^ not supported yet
  161. ***** ^ not supported yet
  162. ***** ^ undeclared identifier
  163. ***** ^ not supported yet
  164. ***** ^ undeclared identifier
  165. ***** ^ not supported yet
  166. ***** ^ not supported yet
  167. 66 END Compare;
  168. ***** ^ not supported yet
  169. 67
  170. 68
  171. 69 PROCEDURE UpdateTitle( All : BOOLEAN );
  172. 70 VAR
  173. 71 y, m, d : CARDINAL;
  174. 72 dow : Lib.DayType;
  175. ***** ^ not supported yet
  176. 73 H, M, S, h : CARDINAL;
  177. 74 Am : BOOLEAN;
  178. 75 BEGIN
  179. 76 oldWin := Window.Used();
  180. ***** ^ undeclared identifier
  181. ***** ^ not supported yet
  182. ***** ^ not supported yet
  183. ***** ^ not supported yet
  184. 77 Window.Use(TitleWin);
  185. ***** ^ not supported yet
  186. ***** ^ not supported yet
  187. ***** ^ undeclared identifier
  188. 78 Window.CursorOff();
  189. ***** ^ not supported yet
  190. ***** ^ not supported yet
  191. ***** ^ not supported yet
  192. 79 Window.PutOnTop(TitleWin);
  193. ***** ^ not supported yet
  194. ***** ^ not supported yet
  195. ***** ^ undeclared identifier
  196. 80 IF All THEN
  197. 81 Lib.GetDate(y, m, d, dow);
  198. ***** ^ not supported yet
  199. ***** ^ not supported yet
  200. ***** ^ not supported yet
  201. 82 Window.GotoXY(1,1);
  202. ***** ^ not supported yet
  203. ***** ^ not supported yet
  204. ***** ^ not supported yet
  205. 83 IO.WrCard(m,2); IO.WrChar('/');
  206. ***** ^ not supported yet
  207. ***** ^ not supported yet
  208. ***** ^ not supported yet
  209. ***** ^ not supported yet
  210. ***** ^ not supported yet
  211. ***** ^ not supported yet
  212. 84 IO.WrCard(d,2); IO.WrChar('/');
  213. ***** ^ not supported yet
  214. ***** ^ not supported yet
  215. ***** ^ not supported yet
  216. ***** ^ not supported yet
  217. ***** ^ not supported yet
  218. ***** ^ not supported yet
  219. 85 IO.WrCard(y,2);
  220. ***** ^ not supported yet
  221. ***** ^ not supported yet
  222. ***** ^ not supported yet
  223. 86 IF StoreName[0] > ' ' THEN
  224. ***** ^ undeclared identifier
  225. ***** ^ not supported yet
  226. 87 h := Str.Length(StoreName);
  227. ***** ^ not supported yet
  228. ***** ^ not supported yet
  229. ***** ^ undeclared identifier
  230. 88 Window.GotoXY((79-h) DIV 2,1);
  231. ***** ^ not supported yet
  232. ***** ^ not supported yet
  233. ***** ^ not supported yet
  234. 89 IO.WrStr(StoreName);
  235. ***** ^ not supported yet
  236. ***** ^ not supported yet
  237. ***** ^ undeclared identifier
  238. 90 END;
  239. 91 END;
  240. 92 Lib.GetTime(H,M,S,h);
  241. ***** ^ not supported yet
  242. ***** ^ not supported yet
  243. ***** ^ not supported yet
  244. 93 IF (LastH # H) OR (LastM # M) THEN
  245. 94 Window.GotoXY(70,1);
  246. ***** ^ not supported yet
  247. ***** ^ not supported yet
  248. ***** ^ not supported yet
  249. 95 IF H<12 THEN
  250. 96 Am := TRUE;
  251. 97 ELSE
  252. 98 Am := FALSE;
  253. 99 IF h # 12 THEN
  254. 100 H := H - 12;
  255. 101 END;
  256. 102 END;
  257. 103 IO.WrCard(H,2); IO.WrChar(':');
  258. ***** ^ not supported yet
  259. ***** ^ not supported yet
  260. ***** ^ not supported yet
  261. ***** ^ not supported yet
  262. ***** ^ not supported yet
  263. ***** ^ not supported yet
  264. 104 IO.WrCard(M,2);
  265. ***** ^ not supported yet
  266. ***** ^ not supported yet
  267. ***** ^ not supported yet
  268. 105 IF Am THEN
  269. 106 IO.WrStr(" am");
  270. ***** ^ not supported yet
  271. ***** ^ not supported yet
  272. ***** ^ not supported yet
  273. 107 ELSE
  274. 108 IO.WrStr(" pm");
  275. ***** ^ not supported yet
  276. ***** ^ not supported yet
  277. ***** ^ not supported yet
  278. 109 END;
  279. 110 IF M<10 THEN
  280. 111 Window.GotoXY(73,1);
  281. ***** ^ not supported yet
  282. ***** ^ not supported yet
  283. ***** ^ not supported yet
  284. 112 IO.WrChar('0');
  285. ***** ^ not supported yet
  286. ***** ^ not supported yet
  287. ***** ^ not supported yet
  288. 113 END;
  289. 114 LastM := M;
  290. 115 LastH := H;
  291. 116 END;
  292. 117 Window.Use(oldWin);
  293. ***** ^ not supported yet
  294. ***** ^ not supported yet
  295. ***** ^ undeclared identifier
  296. 118 Window.CursorOn();
  297. ***** ^ not supported yet
  298. ***** ^ not supported yet
  299. ***** ^ not supported yet
  300. 119 Window.PutOnTop(oldWin);
  301. ***** ^ not supported yet
  302. ***** ^ not supported yet
  303. ***** ^ undeclared identifier
  304. 120 END UpdateTitle;
  305. ***** ^ not supported yet
  306. 121
  307. 122
  308. 123 BEGIN
  309. 124
  310. 125 (* set up default colors *)
  311. 126 DisplayFore := Window.White;
  312. ***** ^ undeclared identifier
  313. ***** ^ not supported yet
  314. ***** ^ not supported yet
  315. 127 DisplayBack := Window.Blue;
  316. ***** ^ undeclared identifier
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. 128 DataFore := Window.Black;
  320. ***** ^ undeclared identifier
  321. ***** ^ not supported yet
  322. ***** ^ not supported yet
  323. 129 DataBack := Window.Cyan;
  324. ***** ^ undeclared identifier
  325. ***** ^ not supported yet
  326. ***** ^ not supported yet
  327. 130 DisplayBorder := Window.LightRed;
  328. ***** ^ undeclared identifier
  329. ***** ^ not supported yet
  330. ***** ^ not supported yet
  331. 131 PromptFore := Window.Yellow;
  332. ***** ^ undeclared identifier
  333. ***** ^ not supported yet
  334. ***** ^ not supported yet
  335. 132 PromptBack := Window.Brown;
  336. ***** ^ undeclared identifier
  337. ***** ^ not supported yet
  338. ***** ^ not supported yet
  339. 133
  340. 134 TaxRate := 5.0;
  341. ***** ^ undeclared identifier
  342. 135
  343. 136 TitleWin := Window.Open( Window.WinDef( 0, 0, 79, 2,
  344. ***** ^ undeclared identifier
  345. ***** ^ not supported yet
  346. ***** ^ not supported yet
  347. ***** ^ not supported yet
  348. ***** ^ not supported yet
  349. 137 Window.White, Window.Black, TRUE, FALSE, TRUE, TRUE,
  350. ***** ^ not supported yet
  351. ***** ^ not supported yet
  352. ***** ^ not supported yet
  353. ***** ^ not supported yet
  354. 138 Window.DoubleFrame, Window.White, Window.Black) );
  355. ***** ^ not supported yet
  356. ***** ^ not supported yet
  357. ***** ^ not supported yet
  358. ***** ^ not supported yet
  359. ***** ^ not supported yet
  360. ***** ^ not supported yet
  361. 139 Window.SetFrame(TitleWin, Window.DoubleFrame, PromptFore,
  362. ***** ^ not supported yet
  363. ***** ^ not supported yet
  364. ***** ^ undeclared identifier
  365. ***** ^ not supported yet
  366. ***** ^ not supported yet
  367. ***** ^ undeclared identifier
  368. 140 PromptBack);
  369. ***** ^ undeclared identifier
  370. 141 Window.Use(TitleWin);
  371. ***** ^ not supported yet
  372. ***** ^ not supported yet
  373. ***** ^ undeclared identifier
  374. 142 Window.Clear();
  375. ***** ^ not supported yet
  376. ***** ^ not supported yet
  377. ***** ^ not supported yet
  378. 143
  379. 144 DisplayWin := Window.Open( Window.WinDef( 0, 3, 79, 22,
  380. ***** ^ undeclared identifier
  381. ***** ^ not supported yet
  382. ***** ^ not supported yet
  383. ***** ^ not supported yet
  384. ***** ^ not supported yet
  385. 145 Window.White, Window.Black, TRUE, FALSE, TRUE, TRUE,
  386. ***** ^ not supported yet
  387. ***** ^ not supported yet
  388. ***** ^ not supported yet
  389. ***** ^ not supported yet
  390. 146 Window.DoubleFrame, Window.White, Window.Black) );
  391. ***** ^ not supported yet
  392. ***** ^ not supported yet
  393. ***** ^ not supported yet
  394. ***** ^ not supported yet
  395. ***** ^ not supported yet
  396. ***** ^ not supported yet
  397. 147 Window.SetFrame(DisplayWin, Window.DoubleFrame, DisplayBorder,
  398. ***** ^ not supported yet
  399. ***** ^ not supported yet
  400. ***** ^ undeclared identifier
  401. ***** ^ not supported yet
  402. ***** ^ not supported yet
  403. ***** ^ undeclared identifier
  404. 148 DisplayBack);
  405. ***** ^ undeclared identifier
  406. 149 Window.Use(DisplayWin);
  407. ***** ^ not supported yet
  408. ***** ^ not supported yet
  409. ***** ^ undeclared identifier
  410. 150 Window.TextColor(DisplayFore);
  411. ***** ^ not supported yet
  412. ***** ^ not supported yet
  413. ***** ^ undeclared identifier
  414. 151 Window.TextBackground(DisplayBack);
  415. ***** ^ not supported yet
  416. ***** ^ not supported yet
  417. ***** ^ undeclared identifier
  418. 152 Window.Clear();
  419. ***** ^ not supported yet
  420. ***** ^ not supported yet
  421. ***** ^ not supported yet
  422. 153 LastH := 0; LastM := 0;
  423. 154
  424. 155 END Globals.
  425. ***** ^ not supported yet
  426. 269 errors