Re: [AD] utf16, file functions

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


On Wed March 18 2009, Elias Pschernig wrote:
> I made a patch to add utf16 conversion as requested on the bug tracker.
> Is the API like you expected? Basically two functions:
>
> ALLEGRO_USTR *al_ustr_new_from_utf16(const char *s, size_t size)
>
> to go along with
>
> ALLEGRO_USTR *al_ustr_new_from_buffer(const char *s, size_t size)
>
> and
>
> char *al_utf16_dup(const ALLEGRO_USTR *us)
>
> to go along with
>
> char *al_cstr_dup(const ALLEGRO_USTR *us)
>
> There is no support for UTF-16BE and UTF-16LE. I assume filenames will
> always be returned in native order already - and it's probably the only
> use for those functions. Else it would be trivial to add 4 more
> functions with explicit endianness...
>
>
> I also wanted to replace the remaining uses of uconvert with this, but
> found that I'm confused about the state of our files API. Specifically:
>
> - What are src/win/wfile.c and src/unix/ufile.c? Are they superseded by
> src/fshook_stdio.c and can be removed?
>
> - What for is the addons/packfile directory? At first glance it looks
> like it was accidentally created during the fshook merge and has a copy
> of the old A4 API, so should it be removed?


It wasn't accidential, I was going to make the old api be a separate addon which plugs into fshooks. But the only people that were driving for it said to forget it ;)


--
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx



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