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 2 }
\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 S1 : file of MaxLength;
\r
35 Start,Stop,x : integer;
\r
41 procedure Diskwrite(text1: MaxLength; pointer: integer);
\r
45 writeln('SPECIAL decription ',pointer,
\r
46 ' is written! Size = ',filesize(S1));
\r
48 end; {End of Diskwrite.}
\r
50 procedure Diskread(start,stop: integer);
\r
58 for counter:= start to stop do
\r
64 writeln(lst,'Discription # ',counter);
\r
69 writeln('Here is SPECIAL description # ',counter);
\r
76 write('The file contains ',filesize(S1),' SPECIAL descriptions.');
\r
77 end; {End of Diskread.}
\r
81 if(length(text1)in[68,146,224])then
\r
82 begin sound(99);delay(50);nosound;end;
\r
92 writeln('Do you want to R)ead, W)rite or Q)uit?');
\r
94 if upcase(answer) = 'Q' then begin writeln('FINISHED');halt;end;
\r
95 if upcase(answer) <> 'R' then {Write to 'SPECIAL'.}
\r
99 textcolor(9);writeln('Now RESETing SPECIAL files.');highvideo;
\r
102 writeln('Input a string not more than ',Max,' characters.',
\r
103 ' ''\''-Ends string.');
\r
104 x:=wherey;if(x>17)then x:=18;for stop:=1 to 7 do writeln;gotoxy(1,x);
\r
108 if letter = ^h then
\r
111 begin window(2,1,80,25);gotoxy(79,wherey-1)end;
\r
113 delete(text1,length(text1),2);
\r
117 if (letter <> '\') and (letter <> ^h) then text1:=text1+letter
\r
118 until (length(text1)=Max) or (letter='\');
\r
119 if letter = '\' then
\r
123 writeln('Total of ',length(text1),' characters.');
\r
125 writeln; highvideo;
\r
126 writeln('Total description length = ',length(text1),' characters.');
\r
127 writeln('Now WRITING string to disk.');
\r
128 writeln(' At what position? (Next open is # ',filesize(S1),')');
\r
129 textcolor(12);position:=position+1;readln(position);highvideo;
\r
130 Diskwrite(text1,position);
\r
132 else {Read from 'SPECIAL'.}
\r
135 writeln('To the S)creen or the P)rinter');
\r
137 if(upcase(answer)='P')then List:=True else List:=False;
\r
140 writeln('Filesize = ',filesize(S1),
\r
141 ' (From 0 to ',filesize(S1)-1,')');
\r
143 writeln('Enter starting position:');
\r
144 textcolor(12);readln(start);highvideo;
\r
145 if(start > filesize(S1)-5)then stop:=(filesize(S1)-1) else
\r
147 writeln('Enter final position:');
\r
148 textcolor(12);readln(stop);highvideo;
\r
150 Diskread(start,stop);
\r
151 end; {End of else clause.}
\r
152 until false; {End of Main loop.}
\r