Modifying software to compile with the Free Pascal compiler and run on modern systems...
[supernova.git] / src / SPECIAL.PAS
index fed6d97cad26c613430bd3ce57147200db63b4c6..97031c289f0dfa22a2c86a28a67bd982f470f90b 100644 (file)
@@ -1,5 +1,27 @@
 {//-------------------------------------------------------------------------}\r
 {/*                                                                         }\r
+{Copyright (C) 2014 Jason Self <j@jxself.org>                               }\r
+{                                                                           }\r
+{This file is free software: you may copy, redistribute and/or modify it    }\r
+{under the terms of the GNU Affero General Public License as published by   }\r
+{the Free Software Foundation, either version 3 of the License, or (at your }\r
+{option) any later version.                                                 }\r
+{                                                                           }\r
+{This file is distributed in the hope that it will be useful, but WITHOUT   }\r
+{ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      }\r
+{FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License}\r
+{for more details.                                                          }\r
+{                                                                           }\r
+{You should have received a copy of the GNU Affero General Public License   }\r
+{along with this program; if not, see https://gnu.org/licenses or write to: }\r
+{  Free Software Foundation, Inc.                                           }\r
+{  51 Franklin Street, Fifth Floor                                          }\r
+{  Boston, MA 02110-1301                                                    }\r
+{  USA                                                                      }\r
+{                                                                           }\r
+{This file incorporates work covered by the following copyright and         }\r
+{permission notice:                                                         }\r
+{                                                                           }\r
 {Copyright (C) 1990, 2009 - Apogee Software, Ltd.                           }\r
 {                                                                           }\r
 {This file is part of Supernova.  Supernova is free software; you can       }\r
@@ -25,6 +47,8 @@
 {*/                                                                         }\r
 {//-------------------------------------------------------------------------}\r
 {$c-}\r
+uses crt, dos;\r
+\r
 const\r
   Max = 234;\r
 \r
@@ -64,8 +88,8 @@ text1   : MaxLength;
         READ(S1,text1);\r
         if list then\r
           begin\r
-            writeln(lst,'Discription # ',counter);\r
-            writeln(lst,text1);\r
+            writeln('Discription # ',counter);\r
+            writeln(text1);\r
           end\r
         else\r
           begin\r
@@ -93,7 +117,7 @@ repeat          {Main loop.}
 \r
 writeln;\r
 writeln('Do you want to R)ead, W)rite or Q)uit?');\r
-read(kbd,answer);\r
+answer:=readkey;\r
 if upcase(answer) = 'Q' then begin writeln('FINISHED');halt;end;\r
 if upcase(answer) <> 'R' then       {Write to 'SPECIAL'.}\r
     begin\r
@@ -107,7 +131,7 @@ if upcase(answer) <> 'R' then       {Write to 'SPECIAL'.}
       x:=wherey;if(x>17)then x:=18;for stop:=1 to 7 do writeln;gotoxy(1,x);\r
       textcolor(11);\r
         repeat\r
-          read(trm,letter);\r
+          letter:=readkey;\r
           if letter = ^h then\r
             begin\r
               if(wherex=1)then\r
@@ -136,7 +160,7 @@ else                      {Read from 'SPECIAL'.}
   begin\r
     writeln;writeln;\r
     writeln('To the S)creen or the P)rinter');\r
-    read(kbd,answer);\r
+    answer:=readkey;\r
     if(upcase(answer)='P')then List:=True else List:=False;\r
     assign(S1,'S1');\r
     reset(S1);\r