PRTFRAME.LST 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. Listing:
  2. 1 IMPLEMENTATION MODULE PrtFrame;
  3. 2 (*
  4. 3 * REPERTOIRE
  5. 4 * Release 1.6
  6. 5 * By Charles Bradford and Cole Brecheen
  7. 6 * (c) Copyright 1985-1992 PMI
  8. 7 * Green Bay, Wisconsin
  9. 8 * All rights reserved
  10. 9 * (414) 468-6040
  11. 10 *
  12. 11 * $Header: D:/logfiles/mods/prtframe.mov 1.5 10 Mar 1991 15:31:40 coleb $
  13. 12 *
  14. 13 *)
  15. 14
  16. 15
  17. 16 IMPORT HandleIO;
  18. 17 IMPORT GenLists;
  19. 18 IMPORT ListUtils;
  20. 19 IMPORT LowLevel;
  21. 20 IMPORT M2Strings;
  22. 21 IMPORT Numbers;
  23. 22 IMPORT ScrnTypes;
  24. 23 IMPORT ScrnUtl1;
  25. 24 IMPORT StrEdit;
  26. 25 IMPORT StringIO;
  27. 26 IMPORT SYSTEM;
  28. 27
  29. 28 VAR
  30. 29 Initialized : BOOLEAN;
  31. 30
  32. 31 PROCEDURE Init();
  33. 32 BEGIN
  34. 33 IF Initialized THEN
  35. 34 RETURN;
  36. 35 ELSE
  37. 36 Initialized := TRUE;
  38. 37 END;
  39. 38 HandleIO.Init();
  40. ***** ^ not supported yet
  41. ***** ^ not supported yet
  42. ***** ^ not supported yet
  43. 39 GenLists.Init();
  44. ***** ^ not supported yet
  45. ***** ^ not supported yet
  46. ***** ^ not supported yet
  47. 40 ListUtils.Init();
  48. ***** ^ not supported yet
  49. ***** ^ not supported yet
  50. ***** ^ not supported yet
  51. 41 LowLevel.Init();
  52. ***** ^ not supported yet
  53. ***** ^ not supported yet
  54. ***** ^ not supported yet
  55. 42 M2Strings.Init();
  56. ***** ^ not supported yet
  57. ***** ^ not supported yet
  58. ***** ^ not supported yet
  59. 43 Numbers.Init();
  60. ***** ^ not supported yet
  61. ***** ^ not supported yet
  62. ***** ^ not supported yet
  63. 44 ScrnTypes.Init();
  64. ***** ^ not supported yet
  65. ***** ^ not supported yet
  66. ***** ^ not supported yet
  67. 45 ScrnUtl1.Init();
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. 46 StrEdit.Init();
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. 47 StringIO.Init();
  76. ***** ^ not supported yet
  77. ***** ^ not supported yet
  78. ***** ^ not supported yet
  79. 48 END Init;
  80. ***** ^ not supported yet
  81. 49
  82. 50 PROCEDURE PrintDisplayFrame(VAR TheFrame: ScrnTypes.DisplayFrame;
  83. ***** ^ not supported yet
  84. 51 FilHandl, LeftMargin : CARDINAL);
  85. 52 (* Prints the screen in frecord to the passed file handle *)
  86. 53
  87. 54 VAR
  88. 55 BlankStr, TmpStr, String: ARRAY [0..255] OF CHAR;
  89. ***** ^ not supported yet
  90. ***** ^ not supported yet
  91. 56 ImageCount, leng, cnt, EdWindowWidth, EdWindowHeight,
  92. 57 TypeCode: CARDINAL;
  93. 58 TxtList, TmpList : GenLists.GenList;
  94. ***** ^ not supported yet
  95. 59 ImageRec: ScrnTypes.ImageElement;
  96. ***** ^ not supported yet
  97. 60 FieldRec: ScrnTypes.InputFieldRecord;
  98. ***** ^ not supported yet
  99. 61
  100. 62 PROCEDURE PrintAt( col, row: CARDINAL; TheTxt : ARRAY OF CHAR);
  101. ***** ^ not supported yet
  102. 63 BEGIN
  103. 64 WHILE GenLists.ListLength( TxtList) < row DO
  104. ***** ^ not supported yet
  105. ***** ^ not supported yet
  106. ***** ^ not supported yet
  107. 65 (* add new lines needed before this write *)
  108. 66 GenLists.ListInsert( '', GenLists.StrCode, TxtList, row);
  109. ***** ^ not supported yet
  110. ***** ^ not supported yet
  111. ***** ^ not supported yet
  112. ***** ^ not supported yet
  113. ***** ^ not supported yet
  114. ***** ^ not supported yet
  115. 67 END;
  116. 68 GenLists.GetElmt( TxtList, row, TmpStr, TypeCode);
  117. ***** ^ not supported yet
  118. ***** ^ not supported yet
  119. ***** ^ not supported yet
  120. ***** ^ not supported yet
  121. ***** ^ not supported yet
  122. 69 leng := M2Strings.Length( TmpStr);
  123. ***** ^ not supported yet
  124. ***** ^ not supported yet
  125. ***** ^ not supported yet
  126. 70 IF col > leng THEN
  127. 71 (* if adding at end of line *)
  128. 72 StrEdit.SetLength( BlankStr, col - leng - 1);
  129. ***** ^ not supported yet
  130. ***** ^ not supported yet
  131. ***** ^ not supported yet
  132. ***** ^ not supported yet
  133. 73 StrEdit.Append( TmpStr, BlankStr);
  134. ***** ^ not supported yet
  135. ***** ^ not supported yet
  136. ***** ^ not supported yet
  137. ***** ^ not supported yet
  138. 74 StrEdit.Append( TmpStr, TheTxt);
  139. ***** ^ not supported yet
  140. ***** ^ not supported yet
  141. ***** ^ not supported yet
  142. ***** ^ not supported yet
  143. 75 ELSE
  144. 76 (* insert into existing line *)
  145. 77 M2Strings.Delete( TmpStr, col-1, M2Strings.Length( TheTxt));
  146. ***** ^ not supported yet
  147. ***** ^ not supported yet
  148. ***** ^ not supported yet
  149. ***** ^ not supported yet
  150. ***** ^ not supported yet
  151. ***** ^ not supported yet
  152. 78 M2Strings.Insert( TheTxt, TmpStr, col-1);
  153. ***** ^ not supported yet
  154. ***** ^ not supported yet
  155. ***** ^ not supported yet
  156. ***** ^ not supported yet
  157. ***** ^ not supported yet
  158. 79 END;
  159. 80 GenLists.ListReplace( TmpStr, GenLists.StrCode, TxtList, row);
  160. ***** ^ not supported yet
  161. ***** ^ not supported yet
  162. ***** ^ not supported yet
  163. ***** ^ not supported yet
  164. ***** ^ not supported yet
  165. ***** ^ not supported yet
  166. ***** ^ not supported yet
  167. 81 END PrintAt;
  168. ***** ^ not supported yet
  169. 82
  170. 83 BEGIN (* PrintDisplayFrame *)
  171. 84 LowLevel.Fill( SYSTEM.ADR( BlankStr), HIGH(BlankStr) + 1, ' ');
  172. ***** ^ not supported yet
  173. ***** ^ not supported yet
  174. ***** ^ not supported yet
  175. ***** ^ not supported yet
  176. ***** ^ not supported yet
  177. ***** ^ undeclared identifier
  178. ***** ^ not supported yet
  179. ***** ^ not supported yet
  180. 85 IF ScrnUtl1.NumberOfImages( TheFrame ) = 0 THEN
  181. ***** ^ not supported yet
  182. ***** ^ not supported yet
  183. ***** ^ not supported yet
  184. 86 RETURN;
  185. 87 END;
  186. 88 GenLists.NewList( TxtList);
  187. ***** ^ not supported yet
  188. ***** ^ not supported yet
  189. ***** ^ not supported yet
  190. 89 ImageCount := 1;
  191. 90 REPEAT
  192. 91 ScrnUtl1.GetImageRec( TheFrame, ImageCount, ImageRec );
  193. ***** ^ not supported yet
  194. ***** ^ not supported yet
  195. ***** ^ not supported yet
  196. ***** ^ not supported yet
  197. 92 IF (ImageRec.field = 0) THEN
  198. ***** ^ not supported yet
  199. ***** ^ not supported yet
  200. 93 PrintAt( ImageRec.col, ImageRec.row, ImageRec.text );
  201. ***** ^ not supported yet
  202. ***** ^ not supported yet
  203. ***** ^ not supported yet
  204. ***** ^ not supported yet
  205. ***** ^ not supported yet
  206. ***** ^ not supported yet
  207. ***** ^ not supported yet
  208. 94 ELSIF ScrnUtl1.ListFromEdField(TheFrame, ImageRec.field, TmpList) THEN
  209. ***** ^ not supported yet
  210. ***** ^ not supported yet
  211. ***** ^ not supported yet
  212. ***** ^ not supported yet
  213. ***** ^ not supported yet
  214. ***** ^ not supported yet
  215. 95 EdWindowWidth := ScrnUtl1.FieldWidth( TheFrame, ImageRec.field );
  216. ***** ^ not supported yet
  217. ***** ^ not supported yet
  218. ***** ^ not supported yet
  219. ***** ^ not supported yet
  220. ***** ^ not supported yet
  221. 96 EdWindowHeight := GenLists.ListLength( TmpList );
  222. ***** ^ not supported yet
  223. ***** ^ not supported yet
  224. ***** ^ not supported yet
  225. 97 FOR cnt := 1 TO EdWindowHeight DO
  226. 98 GenLists.GetElmt( TmpList, cnt, TmpStr, TypeCode );
  227. ***** ^ not supported yet
  228. ***** ^ not supported yet
  229. ***** ^ not supported yet
  230. ***** ^ not supported yet
  231. ***** ^ not supported yet
  232. 99 IF M2Strings.Length( TmpStr ) > EdWindowWidth THEN
  233. ***** ^ not supported yet
  234. ***** ^ not supported yet
  235. ***** ^ not supported yet
  236. 100 StrEdit.SetLength( TmpStr, EdWindowWidth );
  237. ***** ^ not supported yet
  238. ***** ^ not supported yet
  239. ***** ^ not supported yet
  240. ***** ^ not supported yet
  241. 101 END;
  242. 102 PrintAt( ImageRec.col, ImageRec.row + (cnt - 1), TmpStr );
  243. ***** ^ not supported yet
  244. ***** ^ not supported yet
  245. ***** ^ not supported yet
  246. ***** ^ not supported yet
  247. ***** ^ not supported yet
  248. ***** ^ not supported yet
  249. 103 END;
  250. 104 ELSE
  251. 105 ScrnUtl1.GetFieldRec( TheFrame, ImageRec.field, FieldRec );
  252. ***** ^ not supported yet
  253. ***** ^ not supported yet
  254. ***** ^ not supported yet
  255. ***** ^ not supported yet
  256. ***** ^ not supported yet
  257. ***** ^ not supported yet
  258. 106 (* Print choice name in all caps if it is selected;
  259. 107 added 12 Oct 88, courtesy of Ulrik Schmidt. *)
  260. 108 IF (FieldRec.typ = ScrnTypes.GroupMember) AND FieldRec.selected THEN
  261. ***** ^ not supported yet
  262. ***** ^ not supported yet
  263. ***** ^ not supported yet
  264. ***** ^ not supported yet
  265. ***** ^ not supported yet
  266. ***** ^ not supported yet
  267. 109 StrEdit.AssignStr( ImageRec.text, String );
  268. ***** ^ not supported yet
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. ***** ^ not supported yet
  272. ***** ^ not supported yet
  273. 110 StrEdit.CAPstr( String );
  274. ***** ^ not supported yet
  275. ***** ^ not supported yet
  276. ***** ^ not supported yet
  277. 111 PrintAt( ImageRec.col, ImageRec.row, String );
  278. ***** ^ not supported yet
  279. ***** ^ not supported yet
  280. ***** ^ not supported yet
  281. ***** ^ not supported yet
  282. ***** ^ not supported yet
  283. ***** ^ not supported yet
  284. 112 ELSE
  285. 113 PrintAt( ImageRec.col, ImageRec.row, ImageRec.text );
  286. ***** ^ not supported yet
  287. ***** ^ not supported yet
  288. ***** ^ not supported yet
  289. ***** ^ not supported yet
  290. ***** ^ not supported yet
  291. ***** ^ not supported yet
  292. ***** ^ not supported yet
  293. 114 END;
  294. 115 END;
  295. 116 INC( ImageCount );
  296. ***** ^ undeclared identifier
  297. ***** ^ not supported yet
  298. 117 UNTIL (ImageCount > ScrnUtl1.NumberOfImages( TheFrame ) );
  299. ***** ^ not supported yet
  300. ***** ^ not supported yet
  301. ***** ^ not supported yet
  302. 118 leng := GenLists.ListLength( TxtList);
  303. ***** ^ not supported yet
  304. ***** ^ not supported yet
  305. ***** ^ not supported yet
  306. 119 FOR cnt := 1 TO leng DO
  307. 120 (* write the text to the file *)
  308. 121 GenLists.GetElmt( TxtList, cnt, TmpStr, TypeCode);
  309. ***** ^ not supported yet
  310. ***** ^ not supported yet
  311. ***** ^ not supported yet
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. 122 StringIO.PrintMessage( HandleIO.FillFile( FilHandl,
  315. ***** ^ not supported yet
  316. ***** ^ not supported yet
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. 123 LeftMargin, ' ' ) );
  320. ***** ^ not supported yet
  321. 124 StringIO.WriteEol( FilHandl, TmpStr);
  322. ***** ^ not supported yet
  323. ***** ^ not supported yet
  324. ***** ^ not supported yet
  325. 125 END;
  326. 126 GenLists.DisposeList( TxtList);
  327. ***** ^ not supported yet
  328. ***** ^ not supported yet
  329. ***** ^ not supported yet
  330. 127 END PrintDisplayFrame;
  331. ***** ^ not supported yet
  332. 128
  333. 129
  334. 130 PROCEDURE PrintFrameData( VAR TheFrame: ScrnTypes.DisplayFrame;
  335. ***** ^ not supported yet
  336. 131 FileHandle, LeftMargin : CARDINAL );
  337. 132 VAR
  338. 133 FieldRec: ScrnTypes.InputFieldRecord;
  339. ***** ^ not supported yet
  340. 134 ImageRec: ScrnTypes.ImageElement;
  341. ***** ^ not supported yet
  342. 135 LastField, cnt : CARDINAL;
  343. 136 TmpList: GenLists.GenList;
  344. ***** ^ not supported yet
  345. 137 duml: LONGINT;
  346. 138 BEGIN
  347. 139 LastField := ScrnUtl1.FieldListTotal( TheFrame );
  348. ***** ^ not supported yet
  349. ***** ^ not supported yet
  350. ***** ^ not supported yet
  351. 140 FOR cnt := 1 TO LastField DO
  352. 141 ScrnUtl1.GetFieldRec( TheFrame, cnt, FieldRec );
  353. ***** ^ not supported yet
  354. ***** ^ not supported yet
  355. ***** ^ not supported yet
  356. ***** ^ not supported yet
  357. 142 IF FieldRec.fnam[0] # 0C THEN
  358. ***** ^ not supported yet
  359. ***** ^ not supported yet
  360. ***** ^ not supported yet
  361. 143 StringIO.PrintMessage( HandleIO.FillFile( FileHandle,
  362. ***** ^ not supported yet
  363. ***** ^ not supported yet
  364. ***** ^ not supported yet
  365. ***** ^ not supported yet
  366. 144 LeftMargin, ' ' ) );
  367. ***** ^ not supported yet
  368. 145 StringIO.WriteStr( FileHandle, FieldRec.fnam );
  369. ***** ^ not supported yet
  370. ***** ^ not supported yet
  371. ***** ^ not supported yet
  372. ***** ^ not supported yet
  373. 146 StringIO.WriteEol( FileHandle, ':' );
  374. ***** ^ not supported yet
  375. ***** ^ not supported yet
  376. ***** ^ not supported yet
  377. 147 CASE FieldRec.typ OF
  378. ***** ^ not supported yet
  379. ***** ^ not supported yet
  380. 148 ScrnTypes.DispCode, ScrnTypes.StringCode,
  381. ***** ^ not supported yet
  382. ***** ^ not supported yet
  383. ***** ^ not supported yet
  384. ***** ^ not supported yet
  385. 149 ScrnTypes.IntCode, ScrnTypes.RealCode:
  386. ***** ^ not supported yet
  387. ***** ^ not supported yet
  388. ***** ^ not supported yet
  389. ***** ^ not supported yet
  390. 150 ScrnUtl1.GetFieldImageRec( TheFrame, cnt, ImageRec );
  391. ***** ^ not supported yet
  392. ***** ^ not supported yet
  393. ***** ^ not supported yet
  394. ***** ^ not supported yet
  395. 151 StringIO.PrintMessage( HandleIO.FillFile( FileHandle,
  396. ***** ^ not supported yet
  397. ***** ^ not supported yet
  398. ***** ^ not supported yet
  399. ***** ^ not supported yet
  400. 152 LeftMargin + 2, ' ' ) );
  401. ***** ^ not supported yet
  402. 153 StringIO.WriteEol( FileHandle, ImageRec.text );
  403. ***** ^ not supported yet
  404. ***** ^ not supported yet
  405. ***** ^ not supported yet
  406. ***** ^ not supported yet
  407. 154 | ScrnTypes.GotoCode: (* do nothing *)
  408. ***** ^ not supported yet
  409. ***** ^ not supported yet
  410. 155 | ScrnTypes.GroupMember:
  411. ***** ^ not supported yet
  412. ***** ^ not supported yet
  413. 156 ScrnUtl1.GetFieldImageRec( TheFrame, cnt +
  414. ***** ^ not supported yet
  415. ***** ^ not supported yet
  416. ***** ^ not supported yet
  417. 157 (ScrnUtl1.WhichChoiceNum( TheFrame, cnt ) -
  418. ***** ^ not supported yet
  419. ***** ^ not supported yet
  420. ***** ^ not supported yet
  421. ***** ^ not supported yet
  422. 158 1), ImageRec );
  423. ***** ^ not supported yet
  424. 159 StringIO.PrintMessage( HandleIO.FillFile( FileHandle,
  425. ***** ^ not supported yet
  426. ***** ^ not supported yet
  427. ***** ^ not supported yet
  428. ***** ^ not supported yet
  429. 160 LeftMargin + 2, ' ' ) );
  430. ***** ^ not supported yet
  431. 161 StringIO.WriteEol( FileHandle, ImageRec.text );
  432. ***** ^ not supported yet
  433. ***** ^ not supported yet
  434. ***** ^ not supported yet
  435. ***** ^ not supported yet
  436. 162 | ScrnTypes.EditorCode:
  437. ***** ^ not supported yet
  438. ***** ^ not supported yet
  439. 163 IF ScrnUtl1.ListFromEdField(TheFrame, cnt, TmpList) THEN
  440. ***** ^ not supported yet
  441. ***** ^ not supported yet
  442. ***** ^ not supported yet
  443. ***** ^ not supported yet
  444. 164 ListUtils.PrintList( FileHandle, TmpList, LeftMargin + 2,
  445. ***** ^ not supported yet
  446. ***** ^ not supported yet
  447. ***** ^ not supported yet
  448. 165 StringIO.CrLf );
  449. ***** ^ not supported yet
  450. ***** ^ not supported yet
  451. 166 END;
  452. 167 END;
  453. 168 END;
  454. 169 END;
  455. 170 END PrintFrameData;
  456. ***** ^ not supported yet
  457. 171
  458. 172
  459. 173 BEGIN
  460. 174 Initialized := FALSE;
  461. 175 Init();
  462. ***** ^ not supported yet
  463. ***** ^ not supported yet
  464. 176 END PrtFrame.
  465. ***** ^ not supported yet
  466. 288 errors