7 Commits

Author SHA1 Message Date
David Herrmann
f919b3ad81 tsm: fix header comments
Remove "kmscon" from any TSM headers and replace it by "tsm".

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-18 14:50:02 +02:00
David Herrmann
32fec77420 tsm: unicode: remove tsm_symbol_get_u8()
This is no longer used. You should first retrieve the UCS4 string and then
use the UCS4 to U8 conversion helpers instead.

All users have already been converted so we can remove this helper safely.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-18 14:12:28 +02:00
David Herrmann
57928f5df0 tsm: unicode: add helper for ucs4->u8 string conversions
This small helper allocates a string big enough to hold the whole u8
string. This should be used for short and temporary strings only! It
allocates way to much memory for bigger or long-living strings.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-18 13:41:17 +02:00
David Herrmann
372948af53 tsm: unicode: add symbol-table helpers
Add three helpers to create and manage symbol-tables. Also fix internal
default-table to use them.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-18 12:03:17 +02:00
David Herrmann
4af046d39d tsm: unicode: export tsm_ucs4_to_utf8()
This helper function may be useful to other external code and allows us to
always return UCS4 strings. Other code can then use this helper to convert
it into UTF8.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-18 11:39:08 +02:00
David Herrmann
d5a0c9644c tsm: unicode: add symbol-table contexts
We should avoid any global state in shared libraries. As the TSM code is
becoming a shared library, we definitely need contexts for symbol tables.
However, we don't want to fix up all code now so we use a default table
NULL instead.

This can be fixed later but is ok for now.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-18 11:30:38 +02:00
David Herrmann
cca90781c0 tsm: move unicode.[ch] to tsm_unicode.[ch]
All TSM related files will get the tsm_* prefix so move unicode headers
and sources.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-18 10:54:06 +02:00