diff options
author | Sergey Rybin <rybin@act-europe.fr> | 2004-10-04 17:00:26 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-10-04 17:00:26 +0200 |
commit | 259d6c3aa44c79b4fd360563064f8873e7be3b65 (patch) | |
tree | d6b4c7d1b9a3b05dab858f2d702da4e1be23cd63 /gcc | |
parent | 6f21ed26f63b49c96d8bedc34cda55614cac5893 (diff) | |
download | gcc-259d6c3aa44c79b4fd360563064f8873e7be3b65.zip gcc-259d6c3aa44c79b4fd360563064f8873e7be3b65.tar.gz gcc-259d6c3aa44c79b4fd360563064f8873e7be3b65.tar.bz2 |
g-dirope.ads (Base_Name): Clarify the meaning of the Suffix parameter in the documentation.
2004-10-04 Sergey Rybin <rybin@act-europe.fr>
* g-dirope.ads (Base_Name): Clarify the meaning of the Suffix parameter
in the documentation.
From-SVN: r88504
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/g-dirope.ads | 17 |
2 files changed, 16 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 32e47e1..6089e7d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2004-10-04 Sergey Rybin <rybin@act-europe.fr> + + * g-dirope.ads (Base_Name): Clarify the meaning of the Suffix parameter + in the documentation. + 2004-10-04 Robert Dewar <dewar@gnat.com> * sem_ch5.adb (Unblocked_Exit_Count): Now used for blocks as well as diff --git a/gcc/ada/g-dirope.ads b/gcc/ada/g-dirope.ads index c6c561d..b24ecc0 100644 --- a/gcc/ada/g-dirope.ads +++ b/gcc/ada/g-dirope.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1998-2003 Ada Core Technologies, Inc. -- +-- Copyright (C) 1998-2004 Ada Core Technologies, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -123,15 +123,20 @@ package GNAT.Directory_Operations is function Base_Name (Path : Path_Name; Suffix : String := "") return String; - -- Any directory prefix is removed. If Suffix is non-empty and is a - -- suffix of Path, it is removed. This is equivalent to the UNIX basename - -- command. The following rule is always true: + -- Any directory prefix is removed. A directory prefix is defined as + -- text up to and including the last directory separator character in + -- the input string. In addition if Path ends with the string given for + -- Suffix, then it is also removed. Note that Suffix here can be an + -- arbitrary string (it is not required to be a file extension). This + -- is equivalent to the UNIX basename command. The following rule is + -- always true: -- -- 'Path' and 'Dir_Name (Path) & Directory_Separator & Base_Name (Path)' -- represent the same file. -- - -- This function is not case-sensitive on systems that have a non - -- case-sensitive file system like Windows and OpenVMS. + -- The comparison of Suffix is case-insensitive on systems such as Windows + -- and VMS where the file search is case-insensitive (e.g. on such systems, + -- Base_Name ("/Users/AdaCore/BB12.patch", ".Patch") returns "BB12"). function File_Extension (Path : Path_Name) return String; -- Return the file extension. This is defined as the string after the |