2 * Sherlock Library: Reading and writing of UTF-8 on Fastbuf Streams
4 * (c) 2001--2004 Martin Mares <mj@ucw.cz>
5 * (c) 2004 Robert Spalek <robert@ucw.cz>
7 * This software may be freely distributed and used according to the terms
8 * of the GNU Lesser General Public License.
14 #include "lib/fastbuf.h"
15 #include "lib/unicode.h"
17 int bget_utf8_slow(struct fastbuf *b);
18 int bget_utf8_32_slow(struct fastbuf *b);
19 void bput_utf8_slow(struct fastbuf *b, uns u);
20 void bput_utf8_32_slow(struct fastbuf *b, uns u);
23 bget_utf8(struct fastbuf *b)
33 return bget_utf8_slow(b);
37 bput_utf8(struct fastbuf *b, uns u)
47 bget_utf8_32(struct fastbuf *b)
53 GET_UTF8_32(b->bptr, u);
57 return bget_utf8_32_slow(b);
61 bput_utf8_32(struct fastbuf *b, uns u)
65 PUT_UTF8_32(b->bptr, u);
67 bput_utf8_32_slow(b, u);