File and Path Function
char *canonicalize_file_name(const char *name);
Internationalization (I18n) Function Overview
The canonicalize_file_name function returns the absolute name of the file named
by name which contains no ., .. components nor any repeated path
separators (/ ) or symlinks. The result is passed back as the return value of the
function in a block of memory allocated with malloc . If the result is not used
anymore the memory should be freed with a call to free .
In the case of an error, NULL is returned and the global errno variable
is set with the error value.
I18n Issues
On ANSI UTF-16 platforms, use a conversion function to convert the
wide-character string to a multibyte-character string and then call canonicalize_file_name .
See Pathnames for a discussion of path and filename considerations in
an internationalized application.
Recommended Replacements*
*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.
File and Path Functions
|