X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Fsamples%2Fsample-explanation.adb_p;fp=Ada95%2Fsamples%2Fsample-explanation.adb;h=e1752df137a23b04cdd727615c4bbe85ee9c86ec;hp=a2d18226fc3d5bbd886be2c79b3d806ed1d31e5d;hb=3ab4db240283db0682a66a8587f2174508348bc6;hpb=5ed80e8d7031c3fa12b4915d5e1f040257a24323 diff --git a/Ada95/samples/sample-explanation.adb b/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 a2d18226..e1752df1 100644 --- a/Ada95/samples/sample-explanation.adb +++ b/Ada95/samples/sample-explanation.adb_p @@ -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