X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=Ada95%2Fsamples%2Fsample-explanation.adb;h=66efb0db5190865a383125af885667c5178abb51;hb=55ccd2b959766810cf7db8d1c4462f338ce0afc8;hp=eb7f45779004962b50dbfdb2b1651a46a8f2c89c;hpb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1;p=ncurses.git diff --git a/Ada95/samples/sample-explanation.adb b/Ada95/samples/sample-explanation.adb index eb7f4577..66efb0db 100644 --- a/Ada95/samples/sample-explanation.adb +++ b/Ada95/samples/sample-explanation.adb @@ -7,7 +7,7 @@ -- B O D Y -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 1998 Free Software Foundation, Inc. -- +-- Copyright (c) 1998,2004 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- @@ -33,10 +33,11 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Juergen Pfeifer 1996 +-- Author: Juergen Pfeifer, 1996 -- Version Control --- $Revision: 1.9 $ --- Binding Version 00.93 +-- $Revision: 1.18 $ +-- $Date: 2004/08/21 21:37:00 $ +-- Binding Version 01.00 ------------------------------------------------------------------------------ -- Poor mans help system. This scans a sequential file for key lines and -- then reads the lines up to the next key. Those lines are presented in @@ -57,7 +58,7 @@ package body Sample.Explanation is Help_Keys : constant String := "HELPKEYS"; In_Help : constant String := "INHELP"; - File_Name : String := "explain.msg"; + File_Name : constant String := "explain.msg"; F : File_Type; type Help_Line; @@ -116,7 +117,7 @@ package body Sample.Explanation is Current : Help_Line_Access; Top_Line : Help_Line_Access; - Has_More : Boolean; + Has_More : Boolean := True; procedure Unknown_Key is @@ -299,7 +300,6 @@ package body Sample.Explanation is Root : Help_Line_Access := null; Current : Help_Line_Access; Tail : Help_Line_Access := null; - Save : String_Access; function Next_Line return Boolean; @@ -318,7 +318,7 @@ package body Sample.Explanation is Reset (F); Outer : loop - exit when not Next_Line; + exit Outer when not Next_Line; if Last = (1 + Key'Length) and then Key = Buffer (2 .. Last) and then Buffer (1) = '#' then loop