DIAGNOST.LST 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. Listing:
  2. 1 IMPLEMENTATION MODULE Diagnostics;
  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/diagnost.mov 1.6 10 Mar 1991 15:26:18 coleb $
  13. 12 *
  14. 13 *)
  15. 14
  16. 15
  17. 16 IMPORT FAPI; (*Diag*)
  18. 17
  19. 18 IMPORT ErrorManager;
  20. 19 IMPORT HandleIO;
  21. 20 IMPORT GenLists;
  22. 21 IMPORT LowLevel;
  23. 22 IMPORT M2Strings;
  24. 23 IMPORT StrConv;
  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 ErrorManager.Init();
  40. ***** ^ not supported yet
  41. ***** ^ not supported yet
  42. ***** ^ not supported yet
  43. 39 HandleIO.Init();
  44. ***** ^ not supported yet
  45. ***** ^ not supported yet
  46. ***** ^ not supported yet
  47. 40 GenLists.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 StrConv.Init();
  60. ***** ^ not supported yet
  61. ***** ^ not supported yet
  62. ***** ^ not supported yet
  63. 44 StrEdit.Init();
  64. ***** ^ not supported yet
  65. ***** ^ not supported yet
  66. ***** ^ not supported yet
  67. 45 StringIO.Init();
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. 46 END Init;
  72. ***** ^ not supported yet
  73. 47
  74. 48
  75. 49 PROCEDURE diagA(str1 : ARRAY OF CHAR; TheAddr : SYSTEM.ADDRESS );
  76. ***** ^ not supported yet
  77. ***** ^ not supported yet
  78. 50 VAR
  79. 51 LocalStr: ARRAY [0..79] OF CHAR;
  80. ***** ^ not supported yet
  81. ***** ^ not supported yet
  82. 52 dummy : ARRAY [0..5] OF CHAR;
  83. ***** ^ not supported yet
  84. ***** ^ not supported yet
  85. 53 BEGIN
  86. 54 M2Strings.Assign( str1, LocalStr );
  87. ***** ^ not supported yet
  88. ***** ^ not supported yet
  89. ***** ^ not supported yet
  90. ***** ^ not supported yet
  91. 55 StrEdit.Append( LocalStr, ': ' );
  92. ***** ^ not supported yet
  93. ***** ^ not supported yet
  94. ***** ^ not supported yet
  95. ***** ^ not supported yet
  96. 56 StrConv.CardinalToStr(LowLevel.seg(TheAddr), 0, dummy);
  97. ***** ^ not supported yet
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. ***** ^ not supported yet
  101. ***** ^ not supported yet
  102. ***** ^ not supported yet
  103. 57 StrEdit.Append( LocalStr, dummy );
  104. ***** ^ not supported yet
  105. ***** ^ not supported yet
  106. ***** ^ not supported yet
  107. ***** ^ not supported yet
  108. 58 StrEdit.Append( LocalStr, ':' );
  109. ***** ^ not supported yet
  110. ***** ^ not supported yet
  111. ***** ^ not supported yet
  112. ***** ^ not supported yet
  113. 59 StrConv.CardinalToStr(LowLevel.ofs(TheAddr), 0, dummy);
  114. ***** ^ not supported yet
  115. ***** ^ not supported yet
  116. ***** ^ not supported yet
  117. ***** ^ not supported yet
  118. ***** ^ not supported yet
  119. ***** ^ not supported yet
  120. 60 StrEdit.Append( LocalStr, dummy );
  121. ***** ^ not supported yet
  122. ***** ^ not supported yet
  123. ***** ^ not supported yet
  124. ***** ^ not supported yet
  125. 61 ErrorManager.WARN( LocalStr );
  126. ***** ^ not supported yet
  127. ***** ^ not supported yet
  128. ***** ^ not supported yet
  129. 62 END diagA;
  130. ***** ^ not supported yet
  131. 63
  132. 64
  133. 65 PROCEDURE diagB( str1: ARRAY OF CHAR; TheSet: BITSET );
  134. ***** ^ not supported yet
  135. ***** ^ undeclared identifier
  136. 66 VAR
  137. 67 cnt: CARDINAL;
  138. 68 LocalStr: ARRAY [0..255] OF CHAR;
  139. ***** ^ not supported yet
  140. ***** ^ not supported yet
  141. 69 BEGIN
  142. 70 M2Strings.Assign( str1, LocalStr );
  143. ***** ^ not supported yet
  144. ***** ^ not supported yet
  145. ***** ^ not supported yet
  146. ***** ^ not supported yet
  147. 71 StrEdit.Append( LocalStr, ' ' );
  148. ***** ^ not supported yet
  149. ***** ^ not supported yet
  150. ***** ^ not supported yet
  151. ***** ^ not supported yet
  152. 72 FOR cnt := 0 TO 15 DO
  153. 73 IF cnt IN TheSet THEN
  154. ***** ^ not supported yet
  155. 74 StrEdit.Append( LocalStr, '1' );
  156. ***** ^ not supported yet
  157. ***** ^ not supported yet
  158. ***** ^ not supported yet
  159. ***** ^ not supported yet
  160. 75 ELSE
  161. 76 StrEdit.Append( LocalStr, '0' );
  162. ***** ^ not supported yet
  163. ***** ^ not supported yet
  164. ***** ^ not supported yet
  165. ***** ^ not supported yet
  166. 77 END;
  167. 78 END;
  168. 79 ErrorManager.WARN( LocalStr );
  169. ***** ^ not supported yet
  170. ***** ^ not supported yet
  171. ***** ^ not supported yet
  172. 80 END diagB;
  173. ***** ^ not supported yet
  174. 81
  175. 82
  176. 83 PROCEDURE diagS(str1, str2 : ARRAY OF CHAR);
  177. ***** ^ not supported yet
  178. 84 VAR
  179. 85 LocalStr: ARRAY [0..255] OF CHAR;
  180. ***** ^ not supported yet
  181. ***** ^ not supported yet
  182. 86 dummy, lngth: CARDINAL;
  183. 87 tmpadr: SYSTEM.ADDRESS;
  184. ***** ^ not supported yet
  185. 88 BEGIN
  186. 89 M2Strings.Assign( str1, LocalStr );
  187. ***** ^ not supported yet
  188. ***** ^ not supported yet
  189. ***** ^ not supported yet
  190. ***** ^ not supported yet
  191. 90 StrEdit.Append( LocalStr, ' "' );
  192. ***** ^ not supported yet
  193. ***** ^ not supported yet
  194. ***** ^ not supported yet
  195. ***** ^ not supported yet
  196. 91 StrEdit.Append( LocalStr, str2 );
  197. ***** ^ not supported yet
  198. ***** ^ not supported yet
  199. ***** ^ not supported yet
  200. ***** ^ not supported yet
  201. 92 StrEdit.Append( LocalStr, '"' );
  202. ***** ^ not supported yet
  203. ***** ^ not supported yet
  204. ***** ^ not supported yet
  205. ***** ^ not supported yet
  206. 93 ErrorManager.WARN( LocalStr );
  207. ***** ^ not supported yet
  208. ***** ^ not supported yet
  209. ***** ^ not supported yet
  210. 94 (*
  211. 95 tmpadr := SYSTEM.ADR(LocalStr);
  212. 96 lngth := M2Strings.Length(LocalStr);
  213. 97 dummy := FAPI.DOSWRITE( 1, tmpadr, lngth, SYSTEM.ADR(dummy) );
  214. 98 *)
  215. 99 END diagS;
  216. ***** ^ not supported yet
  217. 100
  218. 101
  219. 102 PROCEDURE diagC(str1 : ARRAY OF CHAR; TheCard : CARDINAL);
  220. ***** ^ not supported yet
  221. 103 VAR
  222. 104 LocalStr: ARRAY [0..79] OF CHAR;
  223. ***** ^ not supported yet
  224. ***** ^ not supported yet
  225. 105 dummy : ARRAY [0..5] OF CHAR;
  226. ***** ^ not supported yet
  227. ***** ^ not supported yet
  228. 106 BEGIN
  229. 107 M2Strings.Assign( str1, LocalStr );
  230. ***** ^ not supported yet
  231. ***** ^ not supported yet
  232. ***** ^ not supported yet
  233. ***** ^ not supported yet
  234. 108 StrEdit.Append( LocalStr, ': ' );
  235. ***** ^ not supported yet
  236. ***** ^ not supported yet
  237. ***** ^ not supported yet
  238. ***** ^ not supported yet
  239. 109 StrConv.CardinalToStr(TheCard, 0, dummy);
  240. ***** ^ not supported yet
  241. ***** ^ not supported yet
  242. ***** ^ not supported yet
  243. 110 StrEdit.Append( LocalStr, dummy );
  244. ***** ^ not supported yet
  245. ***** ^ not supported yet
  246. ***** ^ not supported yet
  247. ***** ^ not supported yet
  248. 111 ErrorManager.WARN( LocalStr );
  249. ***** ^ not supported yet
  250. ***** ^ not supported yet
  251. ***** ^ not supported yet
  252. 112 END diagC;
  253. ***** ^ not supported yet
  254. 113
  255. 114
  256. 115 PROCEDURE diagI(str1 : ARRAY OF CHAR; TheInt :
  257. ***** ^ not supported yet
  258. 116 INTEGER);
  259. 117 VAR
  260. 118 LocalStr: ARRAY [0..79] OF CHAR;
  261. ***** ^ not supported yet
  262. ***** ^ not supported yet
  263. 119 dummy : ARRAY [0..5] OF CHAR;
  264. ***** ^ not supported yet
  265. ***** ^ not supported yet
  266. 120 BEGIN
  267. 121 M2Strings.Assign( str1, LocalStr );
  268. ***** ^ not supported yet
  269. ***** ^ not supported yet
  270. ***** ^ not supported yet
  271. ***** ^ not supported yet
  272. 122 StrEdit.Append( LocalStr, ': ' );
  273. ***** ^ not supported yet
  274. ***** ^ not supported yet
  275. ***** ^ not supported yet
  276. ***** ^ not supported yet
  277. 123 StrConv.IntegerToStr(TheInt, 0, dummy);
  278. ***** ^ not supported yet
  279. ***** ^ not supported yet
  280. ***** ^ not supported yet
  281. 124 StrEdit.Append( LocalStr, dummy );
  282. ***** ^ not supported yet
  283. ***** ^ not supported yet
  284. ***** ^ not supported yet
  285. ***** ^ not supported yet
  286. 125 ErrorManager.WARN( LocalStr );
  287. ***** ^ not supported yet
  288. ***** ^ not supported yet
  289. ***** ^ not supported yet
  290. 126 END diagI;
  291. ***** ^ not supported yet
  292. 127
  293. 128
  294. 129 PROCEDURE diagL(str1 : ARRAY OF CHAR; TheLong : LONGINT);
  295. ***** ^ not supported yet
  296. 130 VAR
  297. 131 LocalStr: ARRAY [0..79] OF CHAR;
  298. ***** ^ not supported yet
  299. ***** ^ not supported yet
  300. 132 KeyHit: CARDINAL;
  301. 133 dummy : ARRAY [0..15] OF CHAR;
  302. ***** ^ not supported yet
  303. ***** ^ not supported yet
  304. 134 BEGIN
  305. 135 M2Strings.Assign( str1, LocalStr );
  306. ***** ^ not supported yet
  307. ***** ^ not supported yet
  308. ***** ^ not supported yet
  309. ***** ^ not supported yet
  310. 136 StrEdit.Append( LocalStr, ': ' );
  311. ***** ^ not supported yet
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. ***** ^ not supported yet
  315. 137 StrConv.LongIntegerToStr(TheLong, 0, dummy);
  316. ***** ^ not supported yet
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. 138 StrEdit.Append( LocalStr, dummy );
  320. ***** ^ not supported yet
  321. ***** ^ not supported yet
  322. ***** ^ not supported yet
  323. ***** ^ not supported yet
  324. 139 ErrorManager.WARN( LocalStr );
  325. ***** ^ not supported yet
  326. ***** ^ not supported yet
  327. ***** ^ not supported yet
  328. 140 END diagL;
  329. ***** ^ not supported yet
  330. 141
  331. 142
  332. 143 PROCEDURE diagBlock( str1 : ARRAY OF CHAR; TheAddr : SYSTEM.ADDRESS;
  333. ***** ^ not supported yet
  334. ***** ^ not supported yet
  335. 144 TheSize: CARDINAL );
  336. 145 VAR
  337. 146 fhandle: CARDINAL;
  338. 147 tmpstr: ARRAY [0..15] OF CHAR;
  339. ***** ^ not supported yet
  340. ***** ^ not supported yet
  341. 148 BEGIN
  342. 149 HandleIO.OpenForAppending( 'tmp.txt', fhandle );
  343. ***** ^ not supported yet
  344. ***** ^ not supported yet
  345. ***** ^ not supported yet
  346. ***** ^ not supported yet
  347. 150 StrConv.CardinalToStr( TheSize, 0, tmpstr );
  348. ***** ^ not supported yet
  349. ***** ^ not supported yet
  350. ***** ^ not supported yet
  351. 151 StringIO.WriteEol( fhandle, '' );
  352. ***** ^ not supported yet
  353. ***** ^ not supported yet
  354. ***** ^ not supported yet
  355. 152 StringIO.WriteStr( fhandle, str1 );
  356. ***** ^ not supported yet
  357. ***** ^ not supported yet
  358. ***** ^ not supported yet
  359. 153 StringIO.WriteStr( fhandle, '; ' );
  360. ***** ^ not supported yet
  361. ***** ^ not supported yet
  362. ***** ^ not supported yet
  363. 154 StringIO.WriteStr( fhandle, tmpstr );
  364. ***** ^ not supported yet
  365. ***** ^ not supported yet
  366. ***** ^ not supported yet
  367. 155 StringIO.WriteEol( fhandle, ' bytes:' );
  368. ***** ^ not supported yet
  369. ***** ^ not supported yet
  370. ***** ^ not supported yet
  371. 156 IF 0 # HandleIO.BlockWrite( fhandle, TheAddr, TheSize ) THEN END;
  372. ***** ^ not supported yet
  373. ***** ^ not supported yet
  374. ***** ^ not supported yet
  375. ***** ^ not supported yet
  376. 157 IF 0 # HandleIO.CloseHandle( fhandle ) THEN END;
  377. ***** ^ not supported yet
  378. ***** ^ not supported yet
  379. ***** ^ not supported yet
  380. 158 END diagBlock;
  381. ***** ^ not supported yet
  382. 159
  383. 160
  384. 161 PROCEDURE CheckList( TheList: GenLists.GenList );
  385. ***** ^ not supported yet
  386. 162 VAR
  387. 163 DataSize, TotalElems, TotalSize: LONGINT;
  388. 164 TotalSubs: CARDINAL;
  389. 165 BEGIN
  390. 166 (*
  391. 167 DataSize := Storage.MemoryInUse;
  392. 168 TotalSize := Storage.MaxMemoryUsed;
  393. 169 *)
  394. 170 DataSize := GenLists.ListSize( TheList, TotalElems,
  395. ***** ^ not supported yet
  396. ***** ^ not supported yet
  397. ***** ^ not supported yet
  398. 171 TotalSubs, TotalSize );
  399. ***** ^ not supported yet
  400. 172 END CheckList;
  401. ***** ^ not supported yet
  402. 173
  403. 174 BEGIN
  404. 175 Initialized := FALSE;
  405. 176 Init();
  406. ***** ^ not supported yet
  407. ***** ^ not supported yet
  408. 177 END Diagnostics.
  409. ***** ^ not supported yet
  410. 231 errors