Listing: 1 IMPLEMENTATION MODULE ErrorNames; 2 (* 3 * REPERTOIRE 4 * Release 1.6 5 * By Charles Bradford and Cole Brecheen 6 * (c) Copyright 1985-1992 PMI 7 * Green Bay, Wisconsin 8 * All rights reserved 9 * (414) 468-6040 10 * 11 * $Header: D:/logfiles/mods/errornam.mov 1.7 10 Mar 1991 15:27:18 coleb $ 12 * 13 *) 14 15 16 (*EntryDiag: 17 IMPORT Diagnostics; 18 :EntryDiag*) 19 20 IMPORT ErrorManager; 21 IMPORT GenLists; 22 IMPORT KbdInput; 23 IMPORT ListUtils; 24 IMPORT LowLevel; 25 IMPORT M2Strings; 26 IMPORT StrEdit; 27 IMPORT StringIO; 28 IMPORT SYSTEM; 29 IMPORT VWindows; 30 31 VAR 32 Initialized : BOOLEAN; 33 34 CONST 35 LabelTerminator = ':'; 36 37 VAR 38 ErrorMsgList: GenLists.GenList; ***** ^ not supported yet 39 40 41 PROCEDURE WarningName( TheName: ARRAY OF CHAR ); ***** ^ not supported yet 42 VAR 43 ListEnd, ListSpot, TypeCode, KeyHit, StrSpot: CARDINAL; 44 LabelStr, MsgFileName: ARRAY [0..79] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 45 str,MsgStr : ARRAY [0..255] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 46 BEGIN 47 StrEdit.SetLength( MsgStr, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 48 IF NOT GenLists.Initialized( ErrorMsgList ) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 49 MsgFileName := 'rprtoire.msg'; ***** ^ not supported yet ***** ^ not supported yet 50 GenLists.NewList( ErrorMsgList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 51 IF ListUtils.TextFileToList( MsgFileName, ErrorMsgList ) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 52 # StringIO.NoError THEN ***** ^ not supported yet ***** ^ not supported yet 53 StrEdit.AssignStr( ***** ^ not supported yet ***** ^ not supported yet 54 " can't load RPRTOIRE.MSG file to expand this message.", ***** ^ not supported yet 55 MsgStr ); ***** ^ not supported yet 56 END; 57 END; 58 M2Strings.Assign( TheName, LabelStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 59 IF LabelStr[ M2Strings.Length(LabelStr) ] # LabelTerminator THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 60 StrEdit.Append( LabelStr, LabelTerminator ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 61 END; 62 IF GenLists.Initialized(ErrorMsgList) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 63 ListEnd := GenLists.ListLength(ErrorMsgList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 64 ListSpot := GenLists.ScanList( LabelStr, ErrorMsgList, 1, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 65 ListEnd, StrSpot); ***** ^ not supported yet 66 IF (ListSpot = 0) OR (StrSpot > 0) THEN 67 StrEdit.AssignStr( " Your RPRTOIRE.MSG file is out of date.", ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 68 MsgStr ); ***** ^ not supported yet 69 ELSE 70 GenLists.GetElmt( ErrorMsgList, ListSpot, MsgStr, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 71 TypeCode ); ***** ^ not supported yet 72 LOOP 73 (* Now we keep copying from ErrorMsgList until we find 74 a line that starts with LabelTerminator; allows 75 messages to occupy more than one line.*) 76 INC( ListSpot ); ***** ^ undeclared identifier ***** ^ not supported yet 77 GenLists.GetElmt( ErrorMsgList, ListSpot, str, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 78 TypeCode ); ***** ^ not supported yet 79 80 IF LowLevel.ScanEQ( HIGH(str), LabelTerminator, SYSTEM.ADR(str) ) < ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 81 INTEGER(M2Strings.Length(str)) THEN ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 82 EXIT 83 ELSE 84 StrEdit.Append(MsgStr,str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 85 END; 86 END; 87 ErrorManager.WARN(MsgStr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 88 RETURN; 89 END; 90 END; 91 StrEdit.Append( MsgStr, " Please contact developer" ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 92 M2Strings.Insert( LabelStr, MsgStr, 0 ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 93 ErrorManager.WARN( MsgStr ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 94 END WarningName; ***** ^ not supported yet 95 96 97 PROCEDURE Init(); 98 BEGIN 99 IF Initialized THEN 100 RETURN; 101 ELSE 102 Initialized := TRUE; 103 END; 104 (*EntryDiag: 105 Diagnostics.Init(); 106 :EntryDiag*) 107 108 ErrorManager.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 109 GenLists.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 110 KbdInput.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 111 ListUtils.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 112 LowLevel.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 113 M2Strings.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 114 StrEdit.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 115 StringIO.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 116 VWindows.Init(); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 117 (*EntryDiag: 118 Diagnostics.diagS( 'Entering ErrorNames', '' ); 119 :EntryDiag*) 120 121 GenLists.NilList( ErrorMsgList ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 122 123 (*EntryDiag: 124 Diagnostics.diagS( 'Exiting ErrorNames', '' ); 125 :EntryDiag*) 126 END Init; ***** ^ not supported yet 127 128 BEGIN 129 Initialized := FALSE; 130 Init(); ***** ^ not supported yet ***** ^ not supported yet 131 END ErrorNames. ***** ^ not supported yet 131 errors