ERRORNAM.LST 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. Listing:
  2. 1 IMPLEMENTATION MODULE ErrorNames;
  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/errornam.mov 1.7 10 Mar 1991 15:27:18 coleb $
  13. 12 *
  14. 13 *)
  15. 14
  16. 15
  17. 16 (*EntryDiag:
  18. 17 IMPORT Diagnostics;
  19. 18 :EntryDiag*)
  20. 19
  21. 20 IMPORT ErrorManager;
  22. 21 IMPORT GenLists;
  23. 22 IMPORT KbdInput;
  24. 23 IMPORT ListUtils;
  25. 24 IMPORT LowLevel;
  26. 25 IMPORT M2Strings;
  27. 26 IMPORT StrEdit;
  28. 27 IMPORT StringIO;
  29. 28 IMPORT SYSTEM;
  30. 29 IMPORT VWindows;
  31. 30
  32. 31 VAR
  33. 32 Initialized : BOOLEAN;
  34. 33
  35. 34 CONST
  36. 35 LabelTerminator = ':';
  37. 36
  38. 37 VAR
  39. 38 ErrorMsgList: GenLists.GenList;
  40. ***** ^ not supported yet
  41. 39
  42. 40
  43. 41 PROCEDURE WarningName( TheName: ARRAY OF CHAR );
  44. ***** ^ not supported yet
  45. 42 VAR
  46. 43 ListEnd, ListSpot, TypeCode, KeyHit, StrSpot: CARDINAL;
  47. 44 LabelStr, MsgFileName: ARRAY [0..79] OF CHAR;
  48. ***** ^ not supported yet
  49. ***** ^ not supported yet
  50. 45 str,MsgStr : ARRAY [0..255] OF CHAR;
  51. ***** ^ not supported yet
  52. ***** ^ not supported yet
  53. 46 BEGIN
  54. 47 StrEdit.SetLength( MsgStr, 0 );
  55. ***** ^ not supported yet
  56. ***** ^ not supported yet
  57. ***** ^ not supported yet
  58. ***** ^ not supported yet
  59. 48 IF NOT GenLists.Initialized( ErrorMsgList ) THEN
  60. ***** ^ not supported yet
  61. ***** ^ not supported yet
  62. ***** ^ not supported yet
  63. 49 MsgFileName := 'rprtoire.msg';
  64. ***** ^ not supported yet
  65. ***** ^ not supported yet
  66. 50 GenLists.NewList( ErrorMsgList );
  67. ***** ^ not supported yet
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. 51 IF ListUtils.TextFileToList( MsgFileName, ErrorMsgList )
  71. ***** ^ not supported yet
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. 52 # StringIO.NoError THEN
  76. ***** ^ not supported yet
  77. ***** ^ not supported yet
  78. 53 StrEdit.AssignStr(
  79. ***** ^ not supported yet
  80. ***** ^ not supported yet
  81. 54 " can't load RPRTOIRE.MSG file to expand this message.",
  82. ***** ^ not supported yet
  83. 55 MsgStr );
  84. ***** ^ not supported yet
  85. 56 END;
  86. 57 END;
  87. 58 M2Strings.Assign( TheName, LabelStr );
  88. ***** ^ not supported yet
  89. ***** ^ not supported yet
  90. ***** ^ not supported yet
  91. ***** ^ not supported yet
  92. 59 IF LabelStr[ M2Strings.Length(LabelStr) ] # LabelTerminator THEN
  93. ***** ^ not supported yet
  94. ***** ^ not supported yet
  95. ***** ^ not supported yet
  96. ***** ^ not supported yet
  97. 60 StrEdit.Append( LabelStr, LabelTerminator );
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. ***** ^ not supported yet
  101. ***** ^ not supported yet
  102. 61 END;
  103. 62 IF GenLists.Initialized(ErrorMsgList) THEN
  104. ***** ^ not supported yet
  105. ***** ^ not supported yet
  106. ***** ^ not supported yet
  107. 63 ListEnd := GenLists.ListLength(ErrorMsgList);
  108. ***** ^ not supported yet
  109. ***** ^ not supported yet
  110. ***** ^ not supported yet
  111. 64 ListSpot := GenLists.ScanList( LabelStr, ErrorMsgList, 1,
  112. ***** ^ not supported yet
  113. ***** ^ not supported yet
  114. ***** ^ not supported yet
  115. ***** ^ not supported yet
  116. 65 ListEnd, StrSpot);
  117. ***** ^ not supported yet
  118. 66 IF (ListSpot = 0) OR (StrSpot > 0) THEN
  119. 67 StrEdit.AssignStr( " Your RPRTOIRE.MSG file is out of date.",
  120. ***** ^ not supported yet
  121. ***** ^ not supported yet
  122. ***** ^ not supported yet
  123. 68 MsgStr );
  124. ***** ^ not supported yet
  125. 69 ELSE
  126. 70 GenLists.GetElmt( ErrorMsgList, ListSpot, MsgStr,
  127. ***** ^ not supported yet
  128. ***** ^ not supported yet
  129. ***** ^ not supported yet
  130. ***** ^ not supported yet
  131. 71 TypeCode );
  132. ***** ^ not supported yet
  133. 72 LOOP
  134. 73 (* Now we keep copying from ErrorMsgList until we find
  135. 74 a line that starts with LabelTerminator; allows
  136. 75 messages to occupy more than one line.*)
  137. 76 INC( ListSpot );
  138. ***** ^ undeclared identifier
  139. ***** ^ not supported yet
  140. 77 GenLists.GetElmt( ErrorMsgList, ListSpot, str,
  141. ***** ^ not supported yet
  142. ***** ^ not supported yet
  143. ***** ^ not supported yet
  144. ***** ^ not supported yet
  145. 78 TypeCode );
  146. ***** ^ not supported yet
  147. 79
  148. 80 IF LowLevel.ScanEQ( HIGH(str), LabelTerminator, SYSTEM.ADR(str) ) <
  149. ***** ^ not supported yet
  150. ***** ^ not supported yet
  151. ***** ^ undeclared identifier
  152. ***** ^ not supported yet
  153. ***** ^ not supported yet
  154. ***** ^ not supported yet
  155. ***** ^ not supported yet
  156. 81 INTEGER(M2Strings.Length(str)) THEN
  157. ***** ^ not supported yet
  158. ***** ^ not supported yet
  159. ***** ^ not supported yet
  160. 82 EXIT
  161. 83 ELSE
  162. 84 StrEdit.Append(MsgStr,str);
  163. ***** ^ not supported yet
  164. ***** ^ not supported yet
  165. ***** ^ not supported yet
  166. ***** ^ not supported yet
  167. 85 END;
  168. 86 END;
  169. 87 ErrorManager.WARN(MsgStr);
  170. ***** ^ not supported yet
  171. ***** ^ not supported yet
  172. ***** ^ not supported yet
  173. 88 RETURN;
  174. 89 END;
  175. 90 END;
  176. 91 StrEdit.Append( MsgStr, " Please contact developer" );
  177. ***** ^ not supported yet
  178. ***** ^ not supported yet
  179. ***** ^ not supported yet
  180. ***** ^ not supported yet
  181. 92 M2Strings.Insert( LabelStr, MsgStr, 0 );
  182. ***** ^ not supported yet
  183. ***** ^ not supported yet
  184. ***** ^ not supported yet
  185. ***** ^ not supported yet
  186. ***** ^ not supported yet
  187. 93 ErrorManager.WARN( MsgStr );
  188. ***** ^ not supported yet
  189. ***** ^ not supported yet
  190. ***** ^ not supported yet
  191. 94 END WarningName;
  192. ***** ^ not supported yet
  193. 95
  194. 96
  195. 97 PROCEDURE Init();
  196. 98 BEGIN
  197. 99 IF Initialized THEN
  198. 100 RETURN;
  199. 101 ELSE
  200. 102 Initialized := TRUE;
  201. 103 END;
  202. 104 (*EntryDiag:
  203. 105 Diagnostics.Init();
  204. 106 :EntryDiag*)
  205. 107
  206. 108 ErrorManager.Init();
  207. ***** ^ not supported yet
  208. ***** ^ not supported yet
  209. ***** ^ not supported yet
  210. 109 GenLists.Init();
  211. ***** ^ not supported yet
  212. ***** ^ not supported yet
  213. ***** ^ not supported yet
  214. 110 KbdInput.Init();
  215. ***** ^ not supported yet
  216. ***** ^ not supported yet
  217. ***** ^ not supported yet
  218. 111 ListUtils.Init();
  219. ***** ^ not supported yet
  220. ***** ^ not supported yet
  221. ***** ^ not supported yet
  222. 112 LowLevel.Init();
  223. ***** ^ not supported yet
  224. ***** ^ not supported yet
  225. ***** ^ not supported yet
  226. 113 M2Strings.Init();
  227. ***** ^ not supported yet
  228. ***** ^ not supported yet
  229. ***** ^ not supported yet
  230. 114 StrEdit.Init();
  231. ***** ^ not supported yet
  232. ***** ^ not supported yet
  233. ***** ^ not supported yet
  234. 115 StringIO.Init();
  235. ***** ^ not supported yet
  236. ***** ^ not supported yet
  237. ***** ^ not supported yet
  238. 116 VWindows.Init();
  239. ***** ^ not supported yet
  240. ***** ^ not supported yet
  241. ***** ^ not supported yet
  242. 117 (*EntryDiag:
  243. 118 Diagnostics.diagS( 'Entering ErrorNames', '' );
  244. 119 :EntryDiag*)
  245. 120
  246. 121 GenLists.NilList( ErrorMsgList );
  247. ***** ^ not supported yet
  248. ***** ^ not supported yet
  249. ***** ^ not supported yet
  250. 122
  251. 123 (*EntryDiag:
  252. 124 Diagnostics.diagS( 'Exiting ErrorNames', '' );
  253. 125 :EntryDiag*)
  254. 126 END Init;
  255. ***** ^ not supported yet
  256. 127
  257. 128 BEGIN
  258. 129 Initialized := FALSE;
  259. 130 Init();
  260. ***** ^ not supported yet
  261. ***** ^ not supported yet
  262. 131 END ErrorNames.
  263. ***** ^ not supported yet
  264. 131 errors