[prev in list] [next in list] [prev in thread] [next in thread]
List: icu
Subject: icu4c proposal: modularize icu4c library code/turn off parts
From: Markus Scherer <markus.scherer () jtcsv ! com>
Date: 2002-09-19 20:44:49
[Download RAW message or body]
Proposal to add #if switches in the ICU4C library code to easily turn off parts of it \
at build-time. This is to build smaller ICU libraries for special purposes while \
maintaining a testable ICU build.
Expiration: Thu, 2002-sep-26
Jitterbug: 2248 http://www.jtcsv.com/cgibin/icu-bugs?findid=2248
Details:
So far, I am planning to add a uconfig.h to icu/source/common/unicode/.
It will be included by utypes.h to make the switches available everywhere.
I am appending my current uconfig.h prototype at the end.
Generally, I am trying to use few coarse switches that turn off large modules,
and I will add those switches to the test suites as well so that a pared-down ICU can \
still be tested with the normal test code.
The main thrust is to cut the size of the common+i18n libraries in half for a user \
scenario that has been requested: A small ICU build for collation.
Sincerely,
markus
---- 8< uconfig.h prototype 8< ----
/**
* This switch turns off modules that are not needed for collation.
*
* @draft ICU 2.4
*/
#ifndef UCONFIG_ONLY_COLLATION
# if UCONFIG_NO_COLLATION
# error Contradictory collation switches in uconfig.h.
# endif
# define UCONFIG_ONLY_COLLATION 0
#endif
#if UCONFIG_ONLY_COLLATION
# define UCONFIG_NO_LEGACY_CONVERSION 1
# define UCONFIG_NO_FORMATTING 1
# define UCONFIG_NO_TRANSLITERATION 1
# define UCONFIG_NO_BREAK_ITERATION 1
#endif
/**
* This switch turns off collation and collation-based string search.
*
* @draft ICU 2.4
*/
#ifndef UCONFIG_NO_COLLATION
# define UCONFIG_NO_COLLATION 0
#endif
/**
* This switch turns off all converters except for
* - Unicode charsets (UTF-7/8/16/32, CESU-8, SCSU, BOCU-1)
* - US-ASCII
* - ISO-8859-1
*
* @draft ICU 2.4
*/
#ifndef UCONFIG_NO_LEGACY_CONVERSION
# define UCONFIG_NO_LEGACY_CONVERSION 0
#endif
/**
* This switch turns off formatting and calendar/timezone services.
*
* @draft ICU 2.4
*/
#ifndef UCONFIG_NO_FORMATTING
# define UCONFIG_NO_FORMATTING 0
#endif
/**
* This switch turns off transliteration.
*
* @draft ICU 2.4
*/
#ifndef UCONFIG_NO_TRANSLITERATION
# define UCONFIG_NO_TRANSLITERATION 0
#endif
/**
* This switch turns off break iteration.
*
* @draft ICU 2.4
*/
#ifndef UCONFIG_NO_BREAK_ITERATION
# define UCONFIG_NO_BREAK_ITERATION 0
#endif
_______________________________________________
icu mailing list
icu@oss.software.ibm.com
http://oss.software.ibm.com/developerworks/oss/mailman/listinfo/icu
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic