From: Keith Packard Date: Sun, 4 Nov 2007 05:31:16 +0000 (-0700) Subject: Update documentation for FcStrCopyFilename (bug 12964). X-Git-Tag: 2.4.92~24 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=026fe895e487d0a9607a8506ab8be2ff6022ea19;p=fontconfig.git Update documentation for FcStrCopyFilename (bug 12964). FcStrCopyFilename constructs a canonical path for any argument, including expanding leading ~ and editing '.' and '..' elements out of the resulting path. --- diff --git a/doc/fcstring.fncs b/doc/fcstring.fncs index cea8981..8ee20e5 100644 --- a/doc/fcstring.fncs +++ b/doc/fcstring.fncs @@ -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 -s to the value of the HOME environment variable. -Returns NULL if '~' is present in s and HOME is unset. +@PURPOSE@ create a complete path from a filename +@DESC@ +FcStrCopyFilename constructs an absolute pathname from +s. 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 FcConfigEnableHome). @@ @RET@ int