strcoll in lvm.c

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

strcoll in lvm.c

Daniel Collins
As part of porting Lua to run on some (mostly korean) mobile phone
platforms (WIPI, GIGA, GPANG and BREW) I need to tease apart the
dependencies on the C standard library, since this is not always present
on some hardware. So far this has been easy.

However strcoll is used on line 230 of lvm.c. Does anyone know why
strcoll was used here instead of strcmp. In my context, Lua wont know
anything about locales, so I assume that replacing strcoll with my
replacement for strcmp will work, but I just wanted to check in case
there is some gotcha I dont know about.

For what its worth, my usage is localisable, with english and korean
versions. But all this is handled outside of Lua using a custom string
database system. Lua scripts will simply refer to strings by an ID (eg:
OPTIONS_SET_VOLUME).

thanks,
DC

Reply | Threaded
Open this post in threaded view
|

Re: strcoll in lvm.c

Luiz Henrique de Figueiredo
> I assume that replacing strcoll with my replacement for strcmp will work

Yes, it will work. strcoll is used simply to support locales.
--lhf