]> git.wh0rd.org Git - fontconfig.git/commitdiff
Add const to a bunch of string APIs
authorKeith Packard <keithp@keithp.com>
Sat, 24 Aug 2002 20:08:53 +0000 (20:08 +0000)
committerKeith Packard <keithp@keithp.com>
Sat, 24 Aug 2002 20:08:53 +0000 (20:08 +0000)
fontconfig/fontconfig.h
src/fcstr.c

index c2ab09babcc4dc33baa1752680244f56197eccad..73b949ececd3fdc1c8bce17099638642dea02aec 100644 (file)
@@ -689,15 +689,15 @@ int
 FcStrCmp (const FcChar8 *s1, const FcChar8 *s2);
 
 int
-FcUtf8ToUcs4 (FcChar8   *src_orig,
-             FcChar32  *dst,
-             int       len);
+FcUtf8ToUcs4 (const FcChar8 *src_orig,
+             FcChar32      *dst,
+             int           len);
 
 FcBool
-FcUtf8Len (FcChar8     *string,
-          int          len,
-          int          *nchar,
-          int          *wchar);
+FcUtf8Len (const FcChar8    *string,
+          int              len,
+          int              *nchar,
+          int              *wchar);
 
 #define FC_UTF8_MAX_LEN        6
 
@@ -706,17 +706,17 @@ FcUcs4ToUtf8 (FcChar32    ucs4,
              FcChar8   dest[FC_UTF8_MAX_LEN]);
 
 int
-FcUtf16ToUcs4 (FcChar8 *src_orig,
-              FcEndian endian,
-              FcChar32 *dst,
-              int      len);       /* in bytes */
+FcUtf16ToUcs4 (const FcChar8   *src_orig,
+              FcEndian         endian,
+              FcChar32         *dst,
+              int              len);       /* in bytes */
 
 FcBool
-FcUtf16Len (FcChar8    *string,
-           FcEndian    endian,
-           int         len,        /* in bytes */
-           int         *nchar,
-           int         *wchar);
+FcUtf16Len (const FcChar8   *string,
+           FcEndian        endian,
+           int             len,            /* in bytes */
+           int             *nchar,
+           int             *wchar);
 
 FcChar8 *
 FcStrDirname (const FcChar8 *file);
index 940bf49aa377b025bc2299a1b6fb4b83628cb5b0..fadc1de7ce33e845699aae96e264084474f19315 100644 (file)
@@ -125,14 +125,14 @@ FcStrCmp (const FcChar8 *s1, const FcChar8 *s2)
 }
 
 int
-FcUtf8ToUcs4 (FcChar8   *src_orig,
-             FcChar32  *dst,
-             int       len)
+FcUtf8ToUcs4 (const FcChar8 *src_orig,
+             FcChar32      *dst,
+             int           len)
 {
-    FcChar8    *src = src_orig;
-    FcChar8    s;
-    int                extra;
-    FcChar32   result;
+    const FcChar8   *src = src_orig;
+    FcChar8        s;
+    int                    extra;
+    FcChar32       result;
 
     if (len == 0)
        return 0;
@@ -196,10 +196,10 @@ FcUtf8ToUcs4 (FcChar8   *src_orig,
 }
 
 FcBool
-FcUtf8Len (FcChar8     *string,
-           int         len,
-           int         *nchar,
-           int         *wchar)
+FcUtf8Len (const FcChar8    *string,
+          int              len,
+          int              *nchar,
+          int              *wchar)
 {
     int                n;
     int                clen;
@@ -255,14 +255,14 @@ FcUcs4ToUtf8 (FcChar32    ucs4,
      (FcChar16) ((src)[endian == FcEndianBig ? 1 : 0]))
 
 int
-FcUtf16ToUcs4 (FcChar8 *src_orig,
-              FcEndian endian,
-              FcChar32 *dst,
-              int      len)    /* in bytes */
+FcUtf16ToUcs4 (const FcChar8   *src_orig,
+              FcEndian         endian,
+              FcChar32         *dst,
+              int              len)    /* in bytes */
 {
-    FcChar8    *src = src_orig;
-    FcChar16   a, b;
-    FcChar32   result;
+    const FcChar8   *src = src_orig;
+    FcChar16       a, b;
+    FcChar32       result;
 
     if (len < 2)
        return 0;
@@ -292,11 +292,11 @@ FcUtf16ToUcs4 (FcChar8    *src_orig,
 }
 
 FcBool
-FcUtf16Len (FcChar8    *string,
-           FcEndian    endian,
-           int         len,    /* in bytes */
-           int         *nchar,
-           int         *wchar)
+FcUtf16Len (const FcChar8   *string,
+           FcEndian        endian,
+           int             len,        /* in bytes */
+           int             *nchar,
+           int             *wchar)
 {
     int                n;
     int                clen;