ncurses 6.1 - patch 20190907
[ncurses.git] / Ada95 / samples / sample-explanation.adb_p
similarity index 97%
rename from Ada95/samples/sample-explanation.adb
rename to Ada95/samples/sample-explanation.adb_p
index a2d18226fc3d5bbd886be2c79b3d806ed1d31e5d..e1752df137a23b04cdd727615c4bbe85ee9c86ec 100644 (file)
@@ -7,7 +7,7 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc.              --
+-- Copyright (c) 1998-2014,2019 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            --
@@ -35,8 +35,8 @@
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control
---  $Revision: 1.27 $
---  $Date: 2014/09/13 19:10:18 $
+--  $Revision: 1.4 $
+--  $Date: 2019/09/08 00:14:54 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
 --  Poor mans help system. This scans a sequential file for key lines and
@@ -419,14 +419,23 @@ package body Sample.Explanation is
    end Check_File;
 
 begin
-   if Check_File ("/usr/share/AdaCurses/" & File_Name) then
-      Open (F, In_File, "/usr/share/AdaCurses/" & File_Name);
+   if Check_File
+      ($THIS_DATADIR
+       & File_Name)
+   then
+      Open (F, In_File,
+            $THIS_DATADIR
+            & File_Name);
    elsif Check_File (File_Name) then
       Open (F, In_File, File_Name);
    else
       Put_Line (Standard_Error,
-                "The file explain.txt was not found in the current directory."
+                "The file "
+                & File_Name
+                & " was not found in "
+                & $THIS_DATADIR
                 );
       raise Name_Error;
    end if;
 end Sample.Explanation;
+--  vile:adamode