Check for mandatory terminal window size and fail if it's not
[supernova.git] / src / CLUERITE.PAS
index 78e8840d0cd391c18c6fc2226b26209cc71812be..b379046a8a9357569af59ed5dde4f063f1a25fdc 100644 (file)
@@ -1,10 +1,32 @@
 {//-------------------------------------------------------------------------}\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
 {redistribute it and/or modify it under the terms of the GNU General Public }\r
-{License as published by the Free Software Foundation; either version 2     }\r
+{License as published by the Free Software Foundation; either version 3     }\r
 {of the License, or (at your option) any later version.                     }\r
 {                                                                           }\r
 {This program is distributed in the hope that it will be useful,            }\r
 {See the GNU General Public License for more details.                       }\r
 {                                                                           }\r
 {You should have received a copy of the GNU General Public License          }\r
-{along with this program; if not, write to the Free Software                }\r
-{Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.}\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
 {Original Source: 1990 Scott Miller                                         }\r
 {Prepared for public release: 03/19/09 - Joe Siegler, Apogee Software, Ltd. }\r
 {*/                                                                         }\r
 {//-------------------------------------------------------------------------}\r
 {$c-}\r
+uses crt;\r
+\r
 const\r
   Max = 77;\r
 \r
@@ -59,7 +86,7 @@ text1   : MaxLength;
       begin\r
         highvideo;\r
         READ(C1,text1);\r
-        if list then writeln(lst,counter,':',text1)\r
+        if list then writeln(counter,':',text1)\r
         else\r
           begin\r
             writeln('Here is CLUE # ',counter);\r
@@ -86,7 +113,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 'Clues'.}\r
     begin\r
@@ -100,7 +127,7 @@ if upcase(answer) <> 'R' then       {Write to 'Clues'.}
       x:=wherey;if(x>21)then x:=22;for stop:=1 to 3 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
               write(^h,' ',^h);\r
@@ -126,7 +153,7 @@ else                      {Read from 'Clues'.}
   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(C1,'C1');\r
     reset(C1);\r
@@ -144,4 +171,4 @@ else                      {Read from 'Clues'.}
   end;  {End of else clause.}\r
 until false;     {End of Main loop.}\r
 END.\r
-\1a
\ No newline at end of file
+\1a\r