]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* include/grub/charset.h (grub_utf16_to_utf8): Make src a const pointer.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 14 Dec 2011 09:01:24 +0000 (10:01 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 14 Dec 2011 09:01:24 +0000 (10:01 +0100)
(grub_ucs4_to_utf8_alloc): Likewise.
(grub_ucs4_to_utf8): Likewise.
* grub-core/normal/charset.c (grub_ucs4_to_utf8): Likewise.
(grub_ucs4_to_utf8_alloc): Likewise.

ChangeLog
grub-core/normal/charset.c
include/grub/charset.h

index 2d811e710f1cd56e3ffeff133b1649731651141e..90f63fb7710b5b3684d1f2ae83635a08604a3b33 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-14  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * include/grub/charset.h (grub_utf16_to_utf8): Make src a const pointer.
+       (grub_ucs4_to_utf8_alloc): Likewise.
+       (grub_ucs4_to_utf8): Likewise.
+       * grub-core/normal/charset.c (grub_ucs4_to_utf8): Likewise.
+       (grub_ucs4_to_utf8_alloc): Likewise.
+
 2011-12-14  Vladimir Serbinenko  <phcoder@gmail.com>
 
        AFFS never uses unicode.
index d089843ccdc80bf5fa3914b4351ee4a7411e9aa0..ee4a7ef5f37d5f1a75f37ed977a845f689d6b977 100644 (file)
@@ -197,7 +197,7 @@ grub_encode_utf8_character (grub_uint8_t *dest, grub_uint8_t *destend,
 
 /* Convert UCS-4 to UTF-8.  */
 void
-grub_ucs4_to_utf8 (grub_uint32_t *src, grub_size_t size,
+grub_ucs4_to_utf8 (const grub_uint32_t *src, grub_size_t size,
                   grub_uint8_t *dest, grub_size_t destsize)
 {
   /* Keep last char for \0.  */
@@ -223,10 +223,10 @@ grub_ucs4_to_utf8 (grub_uint32_t *src, grub_size_t size,
 
 /* Convert UCS-4 to UTF-8.  */
 char *
-grub_ucs4_to_utf8_alloc (grub_uint32_t *src, grub_size_t size)
+grub_ucs4_to_utf8_alloc (const grub_uint32_t *src, grub_size_t size)
 {
   grub_size_t remaining;
-  grub_uint32_t *ptr;
+  const grub_uint32_t *ptr;
   grub_size_t cnt = 0;
   grub_uint8_t *ret;
 
index 2b1f54fe8b261abb563db390e50aa9b6c41b0836..b0960c940e00d8a267781e357e79f84147356abe 100644 (file)
@@ -51,7 +51,7 @@ grub_utf8_to_utf16 (grub_uint16_t *dest, grub_size_t destsize,
 
 /* Convert UTF-16 to UTF-8.  */
 static inline grub_uint8_t *
-grub_utf16_to_utf8 (grub_uint8_t *dest, grub_uint16_t *src,
+grub_utf16_to_utf8 (grub_uint8_t *dest, const grub_uint16_t *src,
                    grub_size_t size)
 {
   grub_uint32_t code_high = 0;
@@ -141,7 +141,7 @@ grub_latin1_to_utf8 (grub_uint8_t *dest, const grub_uint8_t *src,
 }
 
 /* Convert UCS-4 to UTF-8.  */
-char *grub_ucs4_to_utf8_alloc (grub_uint32_t *src, grub_size_t size);
+char *grub_ucs4_to_utf8_alloc (const grub_uint32_t *src, grub_size_t size);
 
 int
 grub_is_valid_utf8 (const grub_uint8_t *src, grub_size_t srcsize);
@@ -156,7 +156,7 @@ int
 grub_utf8_process (grub_uint8_t c, grub_uint32_t *code, int *count);
 
 void
-grub_ucs4_to_utf8 (grub_uint32_t *src, grub_size_t size,
+grub_ucs4_to_utf8 (const grub_uint32_t *src, grub_size_t size,
                   grub_uint8_t *dest, grub_size_t destsize);
 grub_size_t grub_utf8_to_ucs4 (grub_uint32_t *dest, grub_size_t destsize,
                               const grub_uint8_t *src, grub_size_t srcsize,