1 {//-------------------------------------------------------------------------}
\r
3 {Copyright (C) 1990, 2009 - Apogee Software, Ltd. }
\r
5 {This file is part of Supernova. Supernova is free software; you can }
\r
6 {redistribute it and/or modify it under the terms of the GNU General Public }
\r
7 {License as published by the Free Software Foundation; either version 3 }
\r
8 {of the License, or (at your option) any later version. }
\r
10 {This program is distributed in the hope that it will be useful, }
\r
11 {but WITHOUT ANY WARRANTY; without even the implied warranty of }
\r
12 {MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. }
\r
14 {See the GNU General Public License for more details. }
\r
16 {You should have received a copy of the GNU General Public License }
\r
17 {along with this program; if not, write to the Free Software }
\r
18 {Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.}
\r
20 {Original Source: 1990 Scott Miller }
\r
21 {Prepared for public release: 03/19/09 - Joe Siegler, Apogee Software, Ltd. }
\r
23 {//-------------------------------------------------------------------------}
\r
29 MaxLength = string[Max];
\r
30 OneChar = string[1];
\r
33 L1 : file of MaxLength;
\r
35 Start,Stop,x : integer;
\r
41 procedure Diskwrite(text1: MaxLength; pointer: integer);
\r
45 writeln('LINE decription ',pointer,
\r
46 ' is written! Size = ',filesize(L1));
\r
48 end; {End of Diskwrite.}
\r
50 procedure Diskread(start,stop: integer);
\r
58 for counter:= start to stop do
\r
62 if list then writeln(lst,counter,':',text1)
\r
65 writeln('Here is LINE description # ',counter);
\r
72 write('The file contains ',filesize(L1),' LINE descriptions.');
\r
73 end; {End of Diskread.}
\r
77 if(length(text1)=68)then
\r
78 begin sound(99);delay(50);nosound;end;
\r
88 writeln('Do you want to R)ead, W)rite or Q)uit?');
\r
90 if upcase(answer) = 'Q' then begin writeln('FINISHED');halt;end;
\r
91 if upcase(answer) <> 'R' then {Write to 'Rooms'.}
\r
95 textcolor(9);writeln('Now RESETing LINE files.');highvideo;
\r
98 writeln('Input a string not more than ',Max,' characters.',
\r
99 ' ''\''-Ends string.');
\r
100 x:=wherey;if(x>21)then x:=22;for stop:=1 to 3 do writeln;gotoxy(1,x);
\r
104 if letter = ^h then
\r
107 delete(text1,length(text1),2);
\r
110 if (letter <> '\') and (letter <> ^h) then text1:=text1+letter
\r
111 until (length(text1)=Max) or (letter='\');
\r
112 if letter = '\' then
\r
116 writeln('Total of ',length(text1),' characters.');
\r
118 writeln; highvideo;
\r
119 writeln('Total description length = ',length(text1),' characters.');
\r
120 writeln('Now WRITING string to disk.');
\r
121 writeln(' At what position? (Next open is # ',filesize(L1),')');
\r
122 textcolor(12);position:=position+1;readln(position);highvideo;
\r
123 Diskwrite(text1,position);
\r
125 else {Read from 'Rooms'.}
\r
128 writeln('To the S)creen or the P)rinter');
\r
130 if(upcase(answer)='P')then List:=True else List:=False;
\r
133 writeln('Filesize = ',filesize(L1),
\r
134 ' (From 0 to ',filesize(L1)-1,')');
\r
136 writeln('Enter starting position:');
\r
137 textcolor(12);readln(start);highvideo;
\r
138 if(start > filesize(L1)-5)then stop:=(filesize(L1)-1) else
\r
140 writeln('Enter final position:');
\r
141 textcolor(12);readln(stop);highvideo;
\r
143 Diskread(start,stop);
\r
144 end; {End of else clause.}
\r
145 until false; {End of Main loop.}
\r