| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019 |
- Listing:
- 1 MODULE snr;
- 2 (*
- 3 * REPERTOIRE
- 4 * Release 1.6
- 5 * By Charles Bradford and Cole Brecheen
- 6 * (c) Copyright 1985-1990 PMI
- 7 * Green Bay WI
- 8 * All rights reserved
- 9 * (414) 468-6040
- 10 *
- 11 *)
- 12
- 13 (*
- 14 IMPORT EMS;
- 15 *)
- 16
- 17 FROM BigSets IMPORT AppendSet, ExclSet, InitSet, ChSetArray;
- 18 FROM Drectory IMPORT FileInfoRec, FindFirstFile, FindNextFile,
- 19 GetDrivePathAndName, GetFileDateAndTime, SetFileDateAndTime;
- 20 FROM Editor IMPORT DoCounting, EntryBox, ExitBox, ScrnEdit;
- 21 FROM EnvironUtils IMPORT ParsedParam;
- 22 FROM ErrorManager IMPORT StraightToDOS;
- 23 FROM HandleIO IMPORT OpenFile, CloseHandle;
- 24 FROM GenLists IMPORT DisposeList, GenList, GetElmt, ListInsert, ListLength,
- 25 ListDelete, ListReplace, NewList, ScanList, StrCode;
- 26 FROM KbdInput IMPORT KeyNumSet, CAPkey, KeyHit, YorN;
- 27 FROM ListUtils IMPORT TextFileToList, TextListToFile;
- 28 FROM M2Strings IMPORT CompareStr, Copy, Delete, Insert, Length;
- 29 FROM PosUtils IMPORT Equal, Present, PresentPos;
- 30 FROM ScrnTypes IMPORT DisplayFrame;
- 31 FROM SmartScreen IMPORT ClearScreen;
- 32 FROM StrConv IMPORT AppendDecoded, StrToCardinal;
- 33 FROM StrEdit IMPORT Append, AssignStr, CrunchBlanks, CutTrailingChars,
- 34 DeleteChar, ReplaceStr, SetLength, InsertTabs, ReplaceTabs;
- 35 FROM StringIO IMPORT NoError, inp, outp, PrintMessage, ReadStr,
- 36 WriteEol, WriteStr;
- 37 FROM UserOps IMPORT FieldExitKeySet;
- 38 (*
- 39 IMPORT InitJPI;
- 40 *)
- 41
- 42 CONST
- 43 TAB = 11C;
- 44
- 45 VAR
- 46 DirHandle, SavedMessage: CARDINAL;
- 47 fname, FileSpec, CodeStr, PathName, PromptStr: ARRAY [0..80] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 48 MeansDelete, EOFmark, Dumstr: ARRAY [0..0] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 49 SearchFor, x, ReplaceWith: ARRAY [0..255] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 50 FileInfo: FileInfoRec;
- 51 PatternList, ReplaceList, TheList: GenList;
- 52 PatternCount, spot, ExitCode, CursorRow, LstLngth, StrLngth, LineNum,
- 53 StartingAt, FoundSpot, TypeCode, month, day, year, hours,
- 54 minutes, seconds, ParamCount: CARDINAL;
- 55 DriveLetter, CodeChar: CHAR;
- 56 editing, EditsMade, stripping, preserving, confirming, ChangesMade:
- 57 BOOLEAN;
- 58 DummyFrame: DisplayFrame;
- 59 entabbing, detabbing: BOOLEAN;
- 60 tabInterval: CARDINAL;
- 61
- 62
- 63 PROCEDURE GetStamp( fname: ARRAY OF CHAR );
- ***** ^ not supported yet
- 64 VAR
- 65 tmphandle: CARDINAL;
- 66 BEGIN
- 67 PrintMessage( OpenFile( tmphandle, fname ) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 68 GetFileDateAndTime( tmphandle, month, day, year, hours,
- ***** ^ not supported yet
- 69 minutes, seconds );
- ***** ^ not supported yet
- 70 PrintMessage( CloseHandle( tmphandle ) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 71 END GetStamp;
- ***** ^ not supported yet
- 72
- 73
- 74 PROCEDURE SetStamp( fname: ARRAY OF CHAR );
- ***** ^ not supported yet
- 75 VAR
- 76 tmphandle: CARDINAL;
- 77 BEGIN
- 78 PrintMessage( OpenFile( tmphandle, fname ) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 79 SetFileDateAndTime( tmphandle, month, day, year, hours,
- ***** ^ not supported yet
- 80 minutes, seconds );
- ***** ^ not supported yet
- 81 PrintMessage( CloseHandle( tmphandle ) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 82 END SetStamp;
- ***** ^ not supported yet
- 83
- 84
- 85 PROCEDURE GetTabInfo(VAR entabbing, detabbing: BOOLEAN;
- 86 VAR tabInterval: CARDINAL);
- 87 VAR
- 88 DigitKeySet: KeyNumSet;
- 89 EDNQ : KeyNumSet;
- 90 tmpkey: CARDINAL;
- 91 BEGIN
- 92 InitSet(DigitKeySet);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 93 AppendSet(DigitKeySet, "{'0'..'9'}");
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 94 InitSet( EDNQ );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 95 AppendSet( EDNQ, "{'e', 'E', 'd', 'D', 'n', 'N', 'q', 'Q'}" );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 96
- 97 WriteEol( outp, '' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 98 WriteStr( outp, 'Entab, Detab or Neither? ' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 99 tmpkey := CAPkey( KeyHit( EDNQ ) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 100 entabbing := tmpkey = ORD('E');
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 101 detabbing := tmpkey = ORD('D');
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 102 IF entabbing THEN
- 103 WriteStr( outp, 'entab' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 104 ELSIF detabbing THEN
- 105 WriteStr( outp, 'detab' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 106 ELSIF ORD('Q') = tmpkey THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 107 StraightToDOS('');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 108 END;
- 109 IF entabbing OR detabbing THEN
- 110 WriteEol( outp, '' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 111 WriteStr( outp, 'Tab interval [0-9]? ' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 112 tmpkey := KeyHit( DigitKeySet );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 113 tabInterval := tmpkey - ORD('0');
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 114 ELSE
- 115 tabInterval := 0;
- 116 END;
- 117 END GetTabInfo;
- ***** ^ not supported yet
- 118
- 119 PROCEDURE yes( TheQuestion: ARRAY OF CHAR ): BOOLEAN;
- ***** ^ not supported yet
- 120 VAR
- 121 tmpkey: CARDINAL;
- 122 BEGIN
- 123 WriteEol( outp, '' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 124 WriteStr( outp, TheQuestion );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 125 tmpkey := CAPkey( KeyHit( YorN ) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 126 IF ORD('Y') = tmpkey THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 127 WriteStr( outp, 'yes' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 128 RETURN TRUE;
- 129 ELSIF ORD('Q') = tmpkey THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 130 StraightToDOS('');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 131 END;
- 132 WriteStr( outp, 'no' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 133 RETURN FALSE;
- 134 END yes;
- ***** ^ not supported yet
- 135
- 136 PROCEDURE NextParam(): CARDINAL;
- 137 BEGIN
- 138 INC(ParamCount);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 139 RETURN ParamCount;
- 140 END NextParam;
- ***** ^ not supported yet
- 141
- 142 BEGIN
- 143 ParamCount := 0;
- 144 EOFmark[0] := CHR(26);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 145 MeansDelete[0] := CHR(255);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 146 AppendSet( YorN, "{'q', 'Q'}" );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 147 IF NOT ParsedParam( NextParam(), FileSpec ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 148 WriteStr( outp, "FileSpec: " );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 149 ReadStr( inp, FileSpec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 150 IF Length( FileSpec ) = 0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 151 RETURN;
- ***** ^ bad RETURN
- 152 END;
- 153 END;
- 154 IF ParsedParam( NextParam(), CodeStr ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 155 CodeChar := CodeStr[0];
- ***** ^ not supported yet
- ***** ^ not supported yet
- 156 ELSE
- 157 WriteStr( outp, 'CodeChar: ' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 158 ReadStr( inp, CodeStr );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 159 CrunchBlanks( CodeStr );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 160 IF Length( CodeStr ) = 0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 161 CodeChar := '#';
- 162 WriteEol( outp, 'Assumed #' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 163 ELSE
- 164 CodeChar := CodeStr[0];
- ***** ^ not supported yet
- ***** ^ not supported yet
- 165 END;
- 166 END;
- 167
- 168 NewList(PatternList);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 169 NewList(ReplaceList);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 170 SetLength( SearchFor, 0 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 171 IF ParsedParam( NextParam(), x ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 172 AppendDecoded( SearchFor, CodeChar, x );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 173 ELSE
- 174 WriteStr( outp, 'SearchFor: ' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 175 ReadStr( inp, x );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 176 IF Length( x ) = 0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 177 RETURN;
- ***** ^ bad RETURN
- 178 ELSE
- 179 AppendDecoded( SearchFor, CodeChar, x );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 180 END;
- 181 END;
- 182
- 183 IF SearchFor[0] = '@' THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 184 (*They've given us a file name.*)
- 185 Delete( SearchFor, 0, 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 186 NewList( PatternList );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 187 PrintMessage( TextFileToList( SearchFor, PatternList ) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 188 PatternCount := 1;
- 189 WHILE PatternCount <= ListLength(PatternList) DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- 190 SetLength( ReplaceWith, 0 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 191 GetElmt( PatternList, PatternCount, SearchFor, TypeCode );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 192 IF PresentPos( '=', SearchFor, spot ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 193 Copy( SearchFor, spot + 1, Length(SearchFor) - spot - 1, x );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 194 AppendDecoded( ReplaceWith, CodeChar, x );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 195 Delete( SearchFor, spot, Length(SearchFor) - spot );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 196 ListReplace( SearchFor, StrCode, PatternList,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 197 PatternCount );
- ***** ^ not supported yet
- 198 ListInsert( ReplaceWith, StrCode, ReplaceList,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 199 ListLength(ReplaceList) + 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 200 INC( PatternCount );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 201 ELSE
- 202 ListDelete( PatternList, PatternCount, 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 203 END;
- 204 END;
- 205 ELSE
- 206 SetLength( ReplaceWith, 0 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 207 IF ParsedParam( NextParam(), x ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 208 AppendDecoded( ReplaceWith, CodeChar, x );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 209 ELSE
- 210 WriteStr( outp, 'ReplaceWith: ' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 211 ReadStr( inp, x );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 212 IF Length( x ) = 0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 213 RETURN;
- ***** ^ bad RETURN
- 214 ELSE
- 215 AppendDecoded( ReplaceWith, CodeChar, x );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 216 END;
- 217 END;
- 218 ListInsert( SearchFor, StrCode, PatternList, 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 219 ListInsert( ReplaceWith, StrCode, ReplaceList, 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 220 END;
- 221 IF NOT ParsedParam( NextParam(), Dumstr ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 222 confirming := yes( 'Confirm replacements? ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 223 ELSE
- 224 confirming := Dumstr[0] = 'Y';
- ***** ^ not supported yet
- ***** ^ not supported yet
- 225 END;
- 226
- 227 IF NOT ParsedParam( NextParam(), Dumstr ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 228
- 229 EntryBox := 0;
- ***** ^ not supported yet
- 230 ExitBox := 0;
- ***** ^ not supported yet
- 231 DoCounting := FALSE;
- ***** ^ not supported yet
- 232
- 233 editing := yes( 'Invoke editor? ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 234 ELSE
- 235 editing := Dumstr[0] = 'Y';
- ***** ^ not supported yet
- ***** ^ not supported yet
- 236 END;
- 237
- 238 IF NOT ParsedParam( NextParam(), Dumstr ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 239 stripping := yes( 'Strip trailing blanks and EOFs? ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 240 ELSE
- 241 stripping := Dumstr[0] = 'Y';
- ***** ^ not supported yet
- ***** ^ not supported yet
- 242 END;
- 243
- 244 IF NOT ParsedParam( NextParam(), Dumstr ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 245 preserving := yes( 'Preserve file date/time stamps? ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 246 ELSE
- 247 preserving := Dumstr[0] = 'Y';
- ***** ^ not supported yet
- ***** ^ not supported yet
- 248 END;
- 249
- 250 IF NOT ParsedParam( NextParam(), Dumstr ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 251 GetTabInfo(entabbing, detabbing, tabInterval);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 252 ELSE
- 253 entabbing := Dumstr[0] = 'E';
- ***** ^ not supported yet
- ***** ^ not supported yet
- 254 detabbing := Dumstr[0] = 'D';
- ***** ^ not supported yet
- ***** ^ not supported yet
- 255 IF entabbing OR detabbing THEN
- 256 IF NOT StrToCardinal(Dumstr, 1, tabInterval) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 257 tabInterval := 8;
- 258 END;
- 259 ELSE
- 260 tabInterval := 0;
- 261 END;
- 262 END;
- 263
- 264 IF (NOT Present( EOFmark, SearchFor )) AND (NOT Present(
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 265 EOFmark, ReplaceWith )) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 266 WriteEol( outp, '' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 267 WriteStr( outp, 'Searching for "');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 268 WriteStr( outp, SearchFor );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 269 WriteStr( outp, '" and replacing it with "' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 270 WriteStr( outp, ReplaceWith );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 271 WriteStr( outp, '" in "');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 272 WriteStr( outp, FileSpec );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 273 WriteEol( outp, '".' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 274 END;
- 275
- 276 DirHandle := 0FFFFH;
- 277 SavedMessage := FindFirstFile( FileSpec, DirHandle, FileInfo );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 278 PrintMessage( SavedMessage );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 279 GetDrivePathAndName( FileSpec, DriveLetter, PathName, fname );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 280
- 281 ExclSet( FieldExitKeySet, 328 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 282 ExclSet( FieldExitKeySet, 331 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 283 ExclSet( FieldExitKeySet, 333 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 284 ExclSet( FieldExitKeySet, 336 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 285 (*Arrow keys are now removed from FieldExitKeySet.*)
- 286
- 287 WHILE SavedMessage = NoError DO
- ***** ^ not supported yet
- 288 AssignStr( FileInfo.name, fname );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 289 IF (CompareStr( '.', fname ) # 0)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 290 AND (CompareStr('..', fname )#0) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 291 ChangesMade := FALSE;
- 292 IF Length(PathName) > 0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 293 Insert( PathName, fname, 0 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 294 END;
- 295 Insert( ':', fname, 0 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 296 Insert( DriveLetter, fname, 0 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 297 NewList( TheList );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 298
- 299 IF TextFileToList( fname, TheList ) # NoError THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 300 WriteStr( outp, 'Could not open ' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 301 WriteEol( outp, fname );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 302 ELSE
- 303 IF preserving THEN
- 304 GetStamp( fname );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 305 END;
- 306 LstLngth := ListLength( TheList );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 307 WriteEol( outp, '' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 308 WriteEol( outp,
- ***** ^ not supported yet
- ***** ^ not supported yet
- 309 '===============================================================================');
- ***** ^ not supported yet
- 310 WriteEol( outp, fname );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 311
- 312 PatternCount := 1;
- 313 WHILE PatternCount <= ListLength(PatternList) DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- 314 GetElmt( PatternList, PatternCount, SearchFor, TypeCode );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 315 GetElmt( ReplaceList, PatternCount, ReplaceWith, TypeCode );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 316 StartingAt := 1;
- 317 LOOP
- 318 LineNum := ScanList( SearchFor, TheList, StartingAt,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 319 LstLngth, FoundSpot );
- ***** ^ not supported yet
- 320 IF LineNum = 0 THEN
- 321 EXIT;
- 322 ELSE
- 323 GetElmt( TheList, LineNum, x, TypeCode );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 324 IF confirming THEN
- 325 WriteEol( outp, '' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 326 WriteEol( outp, '-------------------------------------------' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 327 WriteEol( outp, x );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 328 WriteStr( outp, 'Replace "' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 329 WriteStr( outp, SearchFor );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 330 WriteStr( outp, '" ' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 331 AssignStr( ' with "', PromptStr );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 332 Append( PromptStr, ReplaceWith );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 333 Append( PromptStr, '"? ' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 334 IF yes(PromptStr) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 335 IF Equal( ReplaceWith, MeansDelete ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 336 ListDelete( TheList, LineNum, 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 337 DEC( LineNum );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 338 ELSE
- 339 ReplaceStr( SearchFor, ReplaceWith, x );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 340 ListReplace( x, StrCode, TheList, LineNum );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 341 END;
- 342 ChangesMade := TRUE;
- 343 ELSIF editing AND yes('Edit? ') THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 344 CursorRow := 1;
- 345 INC( FoundSpot );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 346
- 347 IF 0 # ScrnEdit( 1,1, 80,25, TheList, LineNum,
- ***** ^ not supported yet
- ***** ^ not supported yet
- 348 FoundSpot, CursorRow, EditsMade, FALSE,
- 349 DummyFrame ) THEN
- ***** ^ not supported yet
- 350 END;
- 351
- 352 ClearScreen();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 353 ChangesMade := EditsMade AND yes('Save? ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 354 END;
- 355 ELSE
- 356 IF Equal( ReplaceWith, MeansDelete ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 357 ListDelete( TheList, LineNum, 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 358 DEC( LineNum );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 359 ELSE
- 360 ReplaceStr( SearchFor, ReplaceWith, x );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 361 ListReplace( x, StrCode, TheList, LineNum );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 362 END;
- 363 WriteStr( outp, "|");
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 364 ChangesMade := TRUE;
- 365 END;
- 366 IF LineNum = LstLngth THEN
- 367 EXIT;
- 368 ELSE
- 369 StartingAt := LineNum + 1;
- 370 END;
- 371 END;
- 372 END;
- 373 INC( PatternCount );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 374 END;
- 375
- 376 IF stripping OR entabbing OR detabbing THEN
- 377 LineNum := 1;
- 378 WHILE LineNum <= LstLngth DO
- 379 GetElmt( TheList, LineNum, x, TypeCode );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 380 IF entabbing THEN
- 381 IF Present(' ', x) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 382 ChangesMade := TRUE;
- 383 InsertTabs(x, tabInterval, TRUE); (* TRUE for LeadingOnly *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 384 ListReplace( x, StrCode, TheList, LineNum );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 385 END;
- 386 END;
- 387 IF detabbing THEN
- 388 IF Present(TAB, x) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 389 ChangesMade := TRUE;
- 390 ReplaceTabs(x, tabInterval);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 391 ListReplace( x, StrCode, TheList, LineNum );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 392 END;
- 393 END;
- 394 StrLngth := Length(x);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 395 IF stripping AND (StrLngth > 0) AND (x[ StrLngth - 1 ] = ' ') THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 396 ChangesMade := TRUE;
- 397 WriteStr( outp, ".");
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 398 CutTrailingChars( ' ', x );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 399 ListReplace( x, StrCode, TheList, LineNum );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 400 INC( LineNum );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 401 ELSIF stripping AND Present( EOFmark, x ) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 402 ChangesMade := TRUE;
- 403 WriteStr( outp, ",");
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 404 DeleteChar( EOFmark[0], x );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 405 IF x[0] # 0C THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 406 ListReplace( x, StrCode, TheList, LineNum );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 407 INC( LineNum );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 408 ELSE
- 409 ListDelete( TheList, LineNum, 1 );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 410 DEC( LstLngth );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 411 END;
- 412 ELSE
- 413 INC( LineNum );
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 414 END;
- 415 END;
- 416 END;
- 417
- 418 IF ChangesMade THEN
- 419 PrintMessage( TextListToFile( TheList, fname ) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 420 IF preserving THEN
- 421 SetStamp( fname );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 422 END;
- 423 END;
- 424 END;
- 425 DisposeList( TheList );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 426 END;
- 427 SavedMessage := FindNextFile( DirHandle, FileInfo );
- ***** ^ not supported yet
- ***** ^ not supported yet
- 428 END;
- 429 WriteEol( outp, '' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 430 WriteStr( outp, 'Done.' );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 431 WriteStr( outp, CHR(7) );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 432 END snr.
- 581 errors
|