X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=doc%2Ffcstring.fncs;h=6cb75ce01de52f6d44820c16e6a85ecb6c4479dd;hb=5aaf466d3899842763e746a9c2b745748eb34b48;hp=3fbf75e9edc39903ca8dc398f84333877c4042df;hpb=46b51147d10db21a4d5992074bcdc9022f45856b;p=fontconfig.git diff --git a/doc/fcstring.fncs b/doc/fcstring.fncs index 3fbf75e..6cb75ce 100644 --- a/doc/fcstring.fncs +++ b/doc/fcstring.fncs @@ -1,5 +1,5 @@ /* - * $Id$ + * fontconfig/doc/fcstring.fncs * * Copyright © 2003 Keith Packard * @@ -7,15 +7,15 @@ * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in + * documentation, and that the name of the author(s) not be used in * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no + * specific, written prior permission. The authors make no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR @@ -27,19 +27,19 @@ @FUNC@ FcUtf8ToUcs4 @TYPE1@ FcChar8 * @ARG1@ src @TYPE2@ FcChar32 * @ARG2@ dst -@TYPE3@ int @ARG3@ len +@TYPE3@ int% @ARG3@ len @PURPOSE@ convert UTF-8 to UCS4 @DESC@ Converts the next Unicode char from src into dst and returns the number of bytes containing the -char. src nust be at least +char. src must be at least len bytes long. @@ @RET@ int @FUNC@ FcUcs4ToUtf8 -@TYPE1@ FcChar32 @ARG1@ src -@TYPE2@ FcChar8 @ARG2@ dst[FC_UTF8_MAX_LEN] +@TYPE1@ FcChar32% @ARG1@ src +@TYPE2@ FcChar8% @ARG2@ dst[FC_UTF8_MAX_LEN] @PURPOSE@ convert UCS4 to UTF-8 @DESC@ Converts the Unicode char from src into @@ -50,7 +50,7 @@ the char. @RET@ FcBool @FUNC@ FcUtf8Len @TYPE1@ FcChar8 * @ARG1@ src -@TYPE2@ int @ARG2@ len +@TYPE2@ int% @ARG2@ len @TYPE3@ int * @ARG3@ nchar @TYPE4@ int * @ARG4@ wchar @PURPOSE@ count UTF-8 encoded chars @@ -66,9 +66,9 @@ well-formed UTF8 string. @RET@ int @FUNC@ FcUtf16ToUcs4 @TYPE1@ FcChar8 * @ARG1@ src -@TYPE2@ FcEndian @ARG2@ endian +@TYPE2@ FcEndian% @ARG2@ endian @TYPE3@ FcChar32 * @ARG3@ dst -@TYPE4@ int @ARG4@ len +@TYPE4@ int% @ARG4@ len @PURPOSE@ convert UTF-16 to UCS4 @DESC@ Converts the next Unicode char from src into @@ -81,8 +81,8 @@ units according to endian. @RET@ FcBool @FUNC@ FcUtf16Len @TYPE1@ FcChar8 * @ARG1@ src -@TYPE2@ FcEndian @ARG2@ endian -@TYPE3@ int @ARG3@ len +@TYPE2@ FcEndian% @ARG2@ endian +@TYPE3@ int% @ARG3@ len @TYPE4@ int * @ARG4@ nchar @TYPE5@ int * @ARG5@ wchar @PURPOSE@ count UTF-16 encoded chars @@ -97,6 +97,33 @@ indicates whether string is a well-formed UTF16 string. @@ +@RET@ FcBool +@FUNC@ FcIsLower +@TYPE1@ FcChar8 @ARG1@ c +@PURPOSE@ check for lower case ASCII character +@DESC@ +This macro checks whether c is an lower case ASCII +letter. +@@ + +@RET@ FcBool +@FUNC@ FcIsUpper +@TYPE1@ FcChar8 @ARG1@ c +@PURPOSE@ check for upper case ASCII character +@DESC@ +This macro checks whether c is a upper case ASCII +letter. +@@ + +@RET@ FcChar8 +@FUNC@ FcToLower +@TYPE1@ FcChar8 @ARG1@ c +@PURPOSE@ convert upper case ASCII to lower case +@DESC@ +This macro converts upper case ASCII c to the +equivalent lower case letter. +@@ + @RET@ FcChar8 * @FUNC@ FcStrCopy @TYPE1@ const FcChar8 * @ARG1@ s @@ -107,26 +134,93 @@ buffer. Yes, this is strdup, but that function isn't available on every platform. @@ +@RET@ FcChar8 * +@FUNC@ FcStrDowncase +@TYPE1@ const FcChar8 * @ARG1@ s +@PURPOSE@ create a lower case translation of a string +@DESC@ +Allocates memory, copies s, converting upper case +letters to lower case and returns the allocated buffer. +@@ + @RET@ FcChar8 * @FUNC@ FcStrCopyFilename @TYPE1@ const FcChar8 * @ARG1@ s -@PURPOSE@ copy a string, expanding '~' +@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 +@FUNC@ FcStrCmp +@TYPE1@ const FcChar8 * @ARG1@ s1 +@TYPE2@ const FcChar8 * @ARG2@ s2 +@PURPOSE@ compare UTF-8 strings @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. +Returns the usual <0, 0, >0 result of comparing +s1 and s2. @@ @RET@ int @FUNC@ FcStrCmpIgnoreCase -@TYPE1@ const char * @ARG1@ s1 -@TYPE2@ const char * @ARG2@ s2 -@PURPOSE@ compare UTF-8 strings ignoring ASCII case +@TYPE1@ const FcChar8 * @ARG1@ s1 +@TYPE2@ const FcChar8 * @ARG2@ s2 +@PURPOSE@ compare UTF-8 strings ignoring case @DESC@ Returns the usual <0, 0, >0 result of comparing -s1 and s2. This test is -case-insensitive in the ASCII range and will operate properly with UTF8 -encoded strings, although it does not check for well formed strings. +s1 and s2. This test is +case-insensitive for all proper UTF-8 encoded strings. +@@ + +@RET@ FcChar8 * +@FUNC@ FcStrStr +@TYPE1@ const FcChar8 * @ARG1@ s1 +@TYPE2@ const FcChar8 * @ARG2@ s2 +@PURPOSE@ locate UTF-8 substring +@DESC@ +Returns the location of s2 in +s1. Returns NULL if s2 +is not present in s1. This test will operate properly +with UTF8 encoded strings. +@@ + +@RET@ FcChar8 * +@FUNC@ FcStrStrIgnoreCase +@TYPE1@ const FcChar8 * @ARG1@ s1 +@TYPE2@ const FcChar8 * @ARG2@ s2 +@PURPOSE@ locate UTF-8 substring ignoring ASCII case +@DESC@ +Returns the location of s2 in +s1, ignoring case. Returns NULL if +s2 is not present in s1. +This test is case-insensitive for all proper UTF-8 encoded strings. +@@ + +@RET@ FcChar8 * +@FUNC@ FcStrPlus +@TYPE1@ const FcChar8 * @ARG1@ s1 +@TYPE2@ const FcChar8 * @ARG2@ s2 +@PURPOSE@ concatenate two strings +@DESC@ +This function allocates new storage and places the concatenation of +s1 and s2 there, returning the +new string. +@@ + +@RET@ void +@FUNC@ FcStrFree +@TYPE1@ FcChar8 * @ARG1@ s +@PURPOSE@ free a string +@DESC@ +This is just a wrapper around free(3) which helps track memory usage of +strings within the fontconfig library. @@ @RET@ FcChar8 *