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, see https://gnu.org/licenses or write to: }
\r
18 { Free Software Foundation, Inc. }
\r
19 { 51 Franklin Street, Fifth Floor }
\r
20 { Boston, MA 02110-1301 }
\r
23 {Original Source: 1990 Scott Miller }
\r
24 {Prepared for public release: 03/19/09 - Joe Siegler, Apogee Software, Ltd. }
\r
26 {//-------------------------------------------------------------------------}
\r
32 MaxLength = string[Max];
\r
33 OneChar = string[1];
\r
36 S1 : file of MaxLength;
\r
38 Start,Stop,x : integer;
\r
44 procedure Diskwrite(text1: MaxLength; pointer: integer);
\r
48 writeln('SPECIAL decription ',pointer,
\r
49 ' is written! Size = ',filesize(S1));
\r
51 end; {End of Diskwrite.}
\r
53 procedure Diskread(start,stop: integer);
\r
61 for counter:= start to stop do
\r
67 writeln(lst,'Discription # ',counter);
\r
72 writeln('Here is SPECIAL description # ',counter);
\r
79 write('The file contains ',filesize(S1),' SPECIAL descriptions.');
\r
80 end; {End of Diskread.}
\r
84 if(length(text1)in[68,146,224])then
\r
85 begin sound(99);delay(50);nosound;end;
\r
95 writeln('Do you want to R)ead, W)rite or Q)uit?');
\r
97 if upcase(answer) = 'Q' then begin writeln('FINISHED');halt;end;
\r
98 if upcase(answer) <> 'R' then {Write to 'SPECIAL'.}
\r
102 textcolor(9);writeln('Now RESETing SPECIAL files.');highvideo;
\r
105 writeln('Input a string not more than ',Max,' characters.',
\r
106 ' ''\''-Ends string.');
\r
107 x:=wherey;if(x>17)then x:=18;for stop:=1 to 7 do writeln;gotoxy(1,x);
\r
111 if letter = ^h then
\r
114 begin window(2,1,80,25);gotoxy(79,wherey-1)end;
\r
116 delete(text1,length(text1),2);
\r
120 if (letter <> '\') and (letter <> ^h) then text1:=text1+letter
\r
121 until (length(text1)=Max) or (letter='\');
\r
122 if letter = '\' then
\r
126 writeln('Total of ',length(text1),' characters.');
\r
128 writeln; highvideo;
\r
129 writeln('Total description length = ',length(text1),' characters.');
\r
130 writeln('Now WRITING string to disk.');
\r
131 writeln(' At what position? (Next open is # ',filesize(S1),')');
\r
132 textcolor(12);position:=position+1;readln(position);highvideo;
\r
133 Diskwrite(text1,position);
\r
135 else {Read from 'SPECIAL'.}
\r
138 writeln('To the S)creen or the P)rinter');
\r
140 if(upcase(answer)='P')then List:=True else List:=False;
\r
143 writeln('Filesize = ',filesize(S1),
\r
144 ' (From 0 to ',filesize(S1)-1,')');
\r
146 writeln('Enter starting position:');
\r
147 textcolor(12);readln(start);highvideo;
\r
148 if(start > filesize(S1)-5)then stop:=(filesize(S1)-1) else
\r
150 writeln('Enter final position:');
\r
151 textcolor(12);readln(stop);highvideo;
\r
153 Diskread(start,stop);
\r
154 end; {End of else clause.}
\r
155 until false; {End of Main loop.}
\r