Subversion Repositories Kolibri OS

Rev

Rev 5191 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5191 Rev 6324
Line 22... Line 22...
22
 
22
 
23
#ifdef HAVE_STRING_H
23
#ifdef HAVE_STRING_H
24
#include 
24
#include 
Line -... Line 25...
-
 
25
#endif
-
 
26
 
-
 
27
#ifdef HAVE_STDLIB_H
-
 
28
#include 
25
#endif
29
#endif
26
 
30
 
-
 
31
#include "filenames.h"
Line 27... Line 32...
27
#include "filenames.h"
32
#include "safe-ctype.h"
Line 28... Line 33...
28
#include "safe-ctype.h"
33
#include "libiberty.h"
Line 188... Line 193...
188
filename_eq (const void *s1, const void *s2)
193
filename_eq (const void *s1, const void *s2)
189
{
194
{
190
  /* The casts are for -Wc++-compat.  */
195
  /* The casts are for -Wc++-compat.  */
191
  return filename_cmp ((const char *) s1, (const char *) s2) == 0;
196
  return filename_cmp ((const char *) s1, (const char *) s2) == 0;
192
}
197
}
-
 
198
 
-
 
199
/*
-
 
200
 
-
 
201
@deftypefn Extension int canonical_filename_eq (const char *@var{a}, const char *@var{b})
-
 
202
 
-
 
203
Return non-zero if file names @var{a} and @var{b} are equivalent.
-
 
204
This function compares the canonical versions of the filenames as returned by
-
 
205
@code{lrealpath()}, so that so that different file names pointing to the same
-
 
206
underlying file are treated as being identical.
-
 
207
 
-
 
208
@end deftypefn
-
 
209
 
-
 
210
*/
-
 
211
 
-
 
212
int
-
 
213
canonical_filename_eq (const char * a, const char * b)
-
 
214
{
-
 
215
  char * ca = lrealpath(a);
-
 
216
  char * cb = lrealpath(b);
-
 
217
  int res = filename_eq (ca, cb);
-
 
218
  free (ca);
-
 
219
  free (cb);
-
 
220
  return res;
-
 
221
}