| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470 |
- Listing:
- 1 IMPLEMENTATION MODULE PrtFrame;
- 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/prtframe.mov 1.5 10 Mar 1991 15:31:40 coleb $
- 12 *
- 13 *)
- 14
- 15
- 16 IMPORT HandleIO;
- 17 IMPORT GenLists;
- 18 IMPORT ListUtils;
- 19 IMPORT LowLevel;
- 20 IMPORT M2Strings;
- 21 IMPORT Numbers;
- 22 IMPORT ScrnTypes;
- 23 IMPORT ScrnUtl1;
- 24 IMPORT StrEdit;
- 25 IMPORT StringIO;
- 26 IMPORT SYSTEM;
- 27
- 28 VAR
- 29 Initialized : BOOLEAN;
- 30
- 31 PROCEDURE Init();
- 32 BEGIN
- 33 IF Initialized THEN
- 34 RETURN;
- 35 ELSE
- 36 Initialized := TRUE;
- 37 END;
- 38 HandleIO.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 39 GenLists.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 40 ListUtils.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 41 LowLevel.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 42 M2Strings.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 43 Numbers.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 44 ScrnTypes.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 45 ScrnUtl1.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 46 StrEdit.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 47 StringIO.Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 48 END Init;
- ***** ^ not supported yet
- 49
- 50 PROCEDURE PrintDisplayFrame(VAR TheFrame: ScrnTypes.DisplayFrame;
- ***** ^ not supported yet
- 51 FilHandl, LeftMargin : CARDINAL);
- 52 (* Prints the screen in frecord to the passed file handle *)
- 53
- 54 VAR
- 55 BlankStr, TmpStr, String: ARRAY [0..255] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 56 ImageCount, leng, cnt, EdWindowWidth, EdWindowHeight,
- 57 TypeCode: CARDINAL;
- 58 TxtList, TmpList : GenLists.GenList;
- ***** ^ not supported yet
- 59 ImageRec: ScrnTypes.ImageElement;
- ***** ^ not supported yet
- 60 FieldRec: ScrnTypes.InputFieldRecord;
- ***** ^ not supported yet
- 61
- 62 PROCEDURE PrintAt( col, row: CARDINAL; TheTxt : ARRAY OF CHAR);
- ***** ^ not supported yet
- 63 BEGIN
- 64 WHILE GenLists.ListLength( TxtList) < row DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 65 (* add new lines needed before this write *)
- 66 GenLists.ListInsert( '', GenLists.StrCode, TxtList, row);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 67 END;
- 68 GenLists.GetElmt( TxtList, row, TmpStr, TypeCode);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 69 leng := M2Strings.Length( TmpStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 70 IF col > leng THEN
- 71 (* if adding at end of line *)
- 72 StrEdit.SetLength( BlankStr, col - leng - 1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 73 StrEdit.Append( TmpStr, BlankStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 74 StrEdit.Append( TmpStr, TheTxt);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 75 ELSE
- 76 (* insert into existing line *)
- 77 M2Strings.Delete( TmpStr, col-1, M2Strings.Length( TheTxt));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 78 M2Strings.Insert( TheTxt, TmpStr, col-1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 79 END;
- 80 GenLists.ListReplace( TmpStr, GenLists.StrCode, TxtList, row);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 81 END PrintAt;
- ***** ^ not supported yet
- 82
- 83 BEGIN (* PrintDisplayFrame *)
- 84 LowLevel.Fill( SYSTEM.ADR( BlankStr), HIGH(BlankStr) + 1, ' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 85 IF ScrnUtl1.NumberOfImages( TheFrame ) = 0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 86 RETURN;
- 87 END;
- 88 GenLists.NewList( TxtList);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 89 ImageCount := 1;
- 90 REPEAT
- 91 ScrnUtl1.GetImageRec( TheFrame, ImageCount, ImageRec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 92 IF (ImageRec.field = 0) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 93 PrintAt( ImageRec.col, ImageRec.row, ImageRec.text );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 94 ELSIF ScrnUtl1.ListFromEdField(TheFrame, ImageRec.field, TmpList) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 95 EdWindowWidth := ScrnUtl1.FieldWidth( TheFrame, ImageRec.field );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 96 EdWindowHeight := GenLists.ListLength( TmpList );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 97 FOR cnt := 1 TO EdWindowHeight DO
- 98 GenLists.GetElmt( TmpList, cnt, TmpStr, TypeCode );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 99 IF M2Strings.Length( TmpStr ) > EdWindowWidth THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 100 StrEdit.SetLength( TmpStr, EdWindowWidth );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 101 END;
- 102 PrintAt( ImageRec.col, ImageRec.row + (cnt - 1), TmpStr );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 103 END;
- 104 ELSE
- 105 ScrnUtl1.GetFieldRec( TheFrame, ImageRec.field, FieldRec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 106 (* Print choice name in all caps if it is selected;
- 107 added 12 Oct 88, courtesy of Ulrik Schmidt. *)
- 108 IF (FieldRec.typ = ScrnTypes.GroupMember) AND FieldRec.selected THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 109 StrEdit.AssignStr( ImageRec.text, String );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 110 StrEdit.CAPstr( String );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 111 PrintAt( ImageRec.col, ImageRec.row, String );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 112 ELSE
- 113 PrintAt( ImageRec.col, ImageRec.row, ImageRec.text );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 114 END;
- 115 END;
- 116 INC( ImageCount );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 117 UNTIL (ImageCount > ScrnUtl1.NumberOfImages( TheFrame ) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 118 leng := GenLists.ListLength( TxtList);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 119 FOR cnt := 1 TO leng DO
- 120 (* write the text to the file *)
- 121 GenLists.GetElmt( TxtList, cnt, TmpStr, TypeCode);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 122 StringIO.PrintMessage( HandleIO.FillFile( FilHandl,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 123 LeftMargin, ' ' ) );
- ***** ^ not supported yet
- 124 StringIO.WriteEol( FilHandl, TmpStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 125 END;
- 126 GenLists.DisposeList( TxtList);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 127 END PrintDisplayFrame;
- ***** ^ not supported yet
- 128
- 129
- 130 PROCEDURE PrintFrameData( VAR TheFrame: ScrnTypes.DisplayFrame;
- ***** ^ not supported yet
- 131 FileHandle, LeftMargin : CARDINAL );
- 132 VAR
- 133 FieldRec: ScrnTypes.InputFieldRecord;
- ***** ^ not supported yet
- 134 ImageRec: ScrnTypes.ImageElement;
- ***** ^ not supported yet
- 135 LastField, cnt : CARDINAL;
- 136 TmpList: GenLists.GenList;
- ***** ^ not supported yet
- 137 duml: LONGINT;
- 138 BEGIN
- 139 LastField := ScrnUtl1.FieldListTotal( TheFrame );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 140 FOR cnt := 1 TO LastField DO
- 141 ScrnUtl1.GetFieldRec( TheFrame, cnt, FieldRec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 142 IF FieldRec.fnam[0] # 0C THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 143 StringIO.PrintMessage( HandleIO.FillFile( FileHandle,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 144 LeftMargin, ' ' ) );
- ***** ^ not supported yet
- 145 StringIO.WriteStr( FileHandle, FieldRec.fnam );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 146 StringIO.WriteEol( FileHandle, ':' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 147 CASE FieldRec.typ OF
- ***** ^ not supported yet
- ***** ^ not supported yet
- 148 ScrnTypes.DispCode, ScrnTypes.StringCode,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 149 ScrnTypes.IntCode, ScrnTypes.RealCode:
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 150 ScrnUtl1.GetFieldImageRec( TheFrame, cnt, ImageRec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 151 StringIO.PrintMessage( HandleIO.FillFile( FileHandle,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 152 LeftMargin + 2, ' ' ) );
- ***** ^ not supported yet
- 153 StringIO.WriteEol( FileHandle, ImageRec.text );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 154 | ScrnTypes.GotoCode: (* do nothing *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 155 | ScrnTypes.GroupMember:
- ***** ^ not supported yet
- ***** ^ not supported yet
- 156 ScrnUtl1.GetFieldImageRec( TheFrame, cnt +
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 157 (ScrnUtl1.WhichChoiceNum( TheFrame, cnt ) -
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 158 1), ImageRec );
- ***** ^ not supported yet
- 159 StringIO.PrintMessage( HandleIO.FillFile( FileHandle,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 160 LeftMargin + 2, ' ' ) );
- ***** ^ not supported yet
- 161 StringIO.WriteEol( FileHandle, ImageRec.text );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 162 | ScrnTypes.EditorCode:
- ***** ^ not supported yet
- ***** ^ not supported yet
- 163 IF ScrnUtl1.ListFromEdField(TheFrame, cnt, TmpList) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 164 ListUtils.PrintList( FileHandle, TmpList, LeftMargin + 2,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 165 StringIO.CrLf );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 166 END;
- 167 END;
- 168 END;
- 169 END;
- 170 END PrintFrameData;
- ***** ^ not supported yet
- 171
- 172
- 173 BEGIN
- 174 Initialized := FALSE;
- 175 Init();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 176 END PrtFrame.
- ***** ^ not supported yet
- 288 errors
|