diff options
author | Joel Brobecker <brobecker@adacore.com> | 2007-03-29 20:55:09 +0000 |
---|---|---|
committer | Joel Brobecker <brobecke@gcc.gnu.org> | 2007-03-29 20:55:09 +0000 |
commit | cde515d9f33b8d2ddc0f975cae3fe12d657ca0dd (patch) | |
tree | 106ebdb208dd8b737d7e34ca9f4cbd3b5a5d00ac /libiberty/functions.texi | |
parent | 7761c0db85ad1d7f31a42024f6b3df69335cf149 (diff) |
filename_cmp.c: New file.
* filename_cmp.c: New file.
* Makefile.in (CFILES): Add filename_cmp.c.
(REQUIRED_OFILES): Add filename_cmp.o
(filename_cmp.o): New rule.
* functions.texi: Regenerate.
From-SVN: r123342
Diffstat (limited to 'libiberty/functions.texi')
-rw-r--r-- | libiberty/functions.texi | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libiberty/functions.texi b/libiberty/functions.texi index 9f49ff484d6..fd3e8e74ea7 100644 --- a/libiberty/functions.texi +++ b/libiberty/functions.texi @@ -268,6 +268,22 @@ value 1). If @var{valu} is zero, zero is returned. @end deftypefn +@c filename_cmp.c:28 +@deftypefn Extension int filename_cmp (const char *@var{s1}, const char *@var{s2}) + +Return zero if the two paths @var{s1} and @var{s2} are equivalent. +If not equivalent, the returned value is similar to what strcmp would +return. In other words, it returns a negative value if @var{s1} is less +than @var{s2}, or a positive value if @var{s2} is greater than @var{s2}. + +This function does not normalize path names. As a result, this function +will treat filenames that are spelled differently as different even in +the case when the two filenames point to the same underlying file. +However, it does handle the fact that on DOS-like file systems, forward +and backward slashes are equal. + +@end deftypefn + @c fnmatch.txh:1 @deftypefn Replacement int fnmatch (const char *@var{pattern}, const char *@var{string}, int @var{flags}) |