]> git.wh0rd.org - fontconfig.git/commitdiff
Update documentation for FcStrCopyFilename (bug 12964).
authorKeith Packard <keithp@koto.keithp.com>
Sun, 4 Nov 2007 05:31:16 +0000 (22:31 -0700)
committerKeith Packard <keithp@koto.keithp.com>
Sun, 4 Nov 2007 05:31:16 +0000 (22:31 -0700)
FcStrCopyFilename constructs a canonical path for any argument, including
expanding leading ~ and editing '.' and '..' elements out of the resulting
path.

doc/fcstring.fncs

index cea8981756b47d6d9551093f25e67be610d60159..8ee20e51c6ffd0e4b7ad891cc5585a48e1caa28c 100644 (file)
@@ -146,11 +146,16 @@ letters to lower case and returns the allocated buffer.
 @RET@          FcChar8 *
 @FUNC@         FcStrCopyFilename
 @TYPE1@                const FcChar8 *                 @ARG1@          s
-@PURPOSE@      copy a string, expanding '~'
-@DESC@
-Just like FcStrCopy except that it converts any leading '~' characters in
-<parameter>s</parameter> to the value of the HOME environment variable.
-Returns NULL if '~' is present in <parameter>s</parameter> and HOME is unset.
+@PURPOSE@      create a complete path from a filename
+@DESC@
+<function>FcStrCopyFilename</function> constructs an absolute pathname from
+<parameter>s</parameter>. It converts any leading '~' characters in
+to the value of the HOME environment variable, and any relative paths are
+converted to absolute paths using the current working directory. Sequences
+of '/' characters are converted to a single '/', and names containing the
+current directory '.' or parent directory '..' are correctly reconstructed.
+Returns NULL if '~' is the leading character and HOME is unset or disabled
+(see <function>FcConfigEnableHome</function>).
 @@
 
 @RET@          int