2 * The UniCode Library -- Debugging Support Functions
4 * (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
13 get_static_buffer(uns size)
15 static byte *static_debug_buffer;
16 static uns static_debug_size;
18 if (!static_debug_buffer)
22 static_debug_buffer = xmalloc(size);
23 static_debug_size = size;
25 else if (static_debug_size < size)
27 size = (size+1023) & ~1023;
28 static_debug_buffer = xrealloc(static_debug_buffer, size);
29 static_debug_size = size;
31 return static_debug_buffer;
35 static_ucs2_to_utf8(word *w)
37 byte *buf = get_static_buffer(Ustrlen(w) * 3 + 1);