home *** CD-ROM | disk | FTP | other *** search
- { 04/08/89 }
- { Breaker V2.01 Source Code in Borland's Turbo Pascal 5.0 }
- { Modify this program as you wish, but if you do, I would }
- { like the new copy. Also, any modifications must be }
- { documented in BREAKER.DOC. Commments and Sugestions are }
- { welcome. }
- { Copyright (C) 1989 CollisionWare(tm) Premium SoftWare }
- { < Collision Theory(tm) PMBBS (703)425-4674 > }
-
- { For this particular listing, modifications to the original }
- { are indicated by appropriate comments. }
- { --Kurt M. Becker }
-
- program BREAKER;
-
- var fn1,fn2:string[40]; f1,f2:text; Par:boolean; i,startl,endl:integer;
- s:string[80]; opened:boolean;
-
- { K.B. }
- var
- FileBuf : array[ 1..200 ] of String;
- BufIndex : byte;
-
- { K.B. }
- procedure LoadIntoBuffer;
- begin
- BufIndex := 0;
- while (not Eof( f1 )) and (BufIndex < 200) and (i < endl+1) do
- begin
- BufIndex := BufIndex + 1;
- readln( f1, FileBuf[ BufIndex ] );
- i := i + 1;
- end;
- end;
-
- { K.B. }
- procedure SaveFromBuffer;
- var Index : byte;
- begin
- for Index := 1 to BufIndex
- do writeln( f2, FileBuf[ Index ] );
- end;
-
- procedure quit;
- begin
- if opened then close( f1 );
- writeln;
- writeln('Thanks for using Breaker v2.01 by Kito Mann!');
- writeln('Call the Collision Theory(tm) PM-BBS (703)425-4674 10PM-7AM!');
- halt;
- end;
-
- begin
- Opened:=false;
- Par:=false;
- if not (ParamStr(1)='') then begin
- Par:=True;
- fn1:=ParamStr(1);
- end;
- writeln;
- writeln('──────────CollisionWare·Premium·SoftWare·Presents─────────');
- writeln('█████████████ Breaker ▌ V2.01 ▌ By Kito Mann █████████████');
- writeln(' Copyright (C) 1989 ');
- writeln(' Modifications made by Kurt Becker ');
- write('══════════════ Seperates <> Text Files ════════════════'); writeln(#205);
- writeln('──────────────────────────────────────────────────────────');
- writeln;
- if not par then begin
- write('Enter filename to break up [Enter=quit]:');
- readln(fn1);
- if fn1 = '' then quit;
- end;
- assign(f1,fn1);
- {$I-} reset(f1) {$I+};
- opened:=true;
- if ioresult <> 0 then writeln('That file doesn''t exist!') else
- repeat
- write('Enter new filename [Enter=quit]:');
- readln(fn2);
- if fn2 = '' then quit;
- write('Enter line to start at:');
- readln(startl);
- if startl <= 0 then quit;
- write('Enter line to end at:');
- readln(endl);
- if endl <= 0 then quit;
- writeln;
- write('Creating new file...');
- assign(f2,fn2);;
- rewrite(f2);
- for i:=1 to startl-1 do readln(f1);
- i:=startl;
- repeat
- LoadIntoBuffer; { K.B. }
- SaveFromBuffer; { K.B. }
- until (i = endl+1) or (eof(f1));
- close(f2);
- writeln('Done!');
- until fn2 = '';
- end.