[AD] uconvert patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Here's the patch that increases uconvert's static buffer size to 1K from 512, 
and the relevant documentation change.
Index: src/unicode.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/unicode.c,v
retrieving revision 1.33
diff -u -r1.33 unicode.c
--- src/unicode.c	27 May 2005 07:36:38 -0000	1.33
+++ src/unicode.c	13 Sep 2005 00:50:28 -0000
@@ -696,7 +696,7 @@
  */
 char *uconvert(AL_CONST char *s, int type, char *buf, int newtype, int size)
 {
-   static char static_buf[512];
+   static char static_buf[1024];
    ASSERT(s);
    ASSERT(size >= 0);
 
Index: docs/src/allegro._tx
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/allegro._tx,v
retrieving revision 1.362
diff -u -r1.362 allegro._tx
--- docs/src/allegro._tx	28 Aug 2005 05:08:47 -0000	1.362
+++ docs/src/allegro._tx	13 Sep 2005 00:50:36 -0000
@@ -1164,8 +1164,8 @@
    internal static buffer and the `size' parameter will be ignored. You should
    be wary of using this feature, though, because that buffer will be
    overwritten the next time this routine is called, so don't expect the data
-   to persist across any other library calls. The static buffer has a size
-   shorter than 1K, so you won't be able to convert large chunks of text.
+   to persist across any other library calls. The static buffer may hold less
+   than 1024 characters, so you won't be able to convert large chunks of text.
    Example:
 <codeblock>
       char *p = uconvert(input_string, U_CURRENT, buffer, U_ASCII, 256);<endblock>


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/