ICU-2248 modularize ICU

X-SVN-Rev: 9934
This commit is contained in:
Markus Scherer 2002-10-01 01:26:49 +00:00
parent 755eb841a9
commit 61969c8c50
33 changed files with 286 additions and 34 deletions

View file

@ -3101,6 +3101,49 @@ InputPath=.\unicode\utf8.h
# Begin Source File
SOURCE=.\unicode\utf_old.h
!IF "$(CFG)" == "common - Win32 Release"
# Begin Custom Build
InputPath=.\unicode\utf_old.h
"..\..\include\unicode\utf_old.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy $(InputPath) ..\..\include\unicode
# End Custom Build
!ELSEIF "$(CFG)" == "common - Win32 Debug"
# Begin Custom Build
InputPath=.\unicode\utf_old.h
"..\..\include\unicode\utf_old.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy $(InputPath) ..\..\include\unicode
# End Custom Build
!ELSEIF "$(CFG)" == "common - Win64 Release"
# Begin Custom Build
InputPath=.\unicode\utf_old.h
"..\..\include\unicode\utf_old.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy $(InputPath) ..\..\include\unicode
# End Custom Build
!ELSEIF "$(CFG)" == "common - Win64 Debug"
# Begin Custom Build
InputPath=.\unicode\utf_old.h
"..\..\include\unicode\utf_old.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy $(InputPath) ..\..\include\unicode
# End Custom Build
!ENDIF
# End Source File
# Begin Source File

View file

@ -15,6 +15,9 @@
#define RBBI_H
#include "unicode/utypes.h"
#if !UCONFIG_NO_BREAK_ITERATION
#include "unicode/brkiter.h"
#include "unicode/udata.h"
#include "unicode/parseerr.h"
@ -460,4 +463,6 @@ inline UClassID RuleBasedBreakIterator::getStaticClassID(void) {
U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
#endif

View file

@ -331,6 +331,10 @@ static int printConverters(const char *pname, const char *lookfor,
static int printTransliterators(int canon)
{
#if UCONFIG_NO_TRANSLITERATION
printf("no transliterators available because of UCONFIG_NO_TRANSLITERATION, see uconfig.h\n");
return 1;
#else
int32_t numtrans = utrans_countAvailableIDs(), i;
int buflen = 512;
char *buf = (char *) uprv_malloc(buflen);
@ -384,6 +388,7 @@ static int printTransliterators(int canon)
/* Success. */
return 0;
#endif
}
/* Return the offset of a byte in its source, given the from and to offsets
@ -435,7 +440,9 @@ static UBool convertFile(const char *pname,
size_t rd, wr, tobufsz;
#if !UCONFIG_NO_TRANSLITERATION
Transliterator *t = 0; // Transliterator acting on Unicode data.
#endif
UnicodeString u; // String to do the transliteration.
// Open the correct input file or connect to stdin for reading input
@ -467,6 +474,7 @@ static UBool convertFile(const char *pname,
fprintf(stderr, "%s:\n", infilestr);
}
#if !UCONFIG_NO_TRANSLITERATION
// Create transliterator as needed.
if (translit != NULL && *translit) {
@ -505,6 +513,7 @@ static UBool convertFile(const char *pname,
goto error_exit;
}
}
#endif
// Create codepage converter. If the codepage or its aliases weren't
// available, it returns NULL and a failure code. We also set the
@ -607,18 +616,16 @@ static UBool convertFile(const char *pname,
willexit = 1;
}
// Prepare to transliterate and convert.
// Prepare to transliterate and convert. Transliterate if needed.
#if !UCONFIG_NO_TRANSLITERATION
if (t) {
u.setTo(unibuf, (int32_t)(unibufp - unibuf)); // Copy into string.
} else {
u.setTo(unibuf, (int32_t)(unibufp - unibuf), (int32_t)(bufsz)); // Share the buffer.
}
// Transliterate if needed.
if (t) {
t->transliterate(u);
} else
#endif
{
u.setTo(unibuf, (int32_t)(unibufp - unibuf), (int32_t)(bufsz)); // Share the buffer.
}
int32_t ulen = u.length();
@ -706,7 +713,9 @@ normal_exit:
if (convfrom) ucnv_close(convfrom);
if (convto) ucnv_close(convto);
#if !UCONFIG_NO_TRANSLITERATION
if (t) delete t;
#endif
if (buf) delete[] buf;
if (unibuf) delete[] unibuf;

View file

@ -25,6 +25,8 @@
#include <stdio.h>
#include <string.h>
#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0]))
#define BUF_SIZE 128
/* Print a ustring to the specified FILE* in the default codepage */
@ -84,6 +86,8 @@ finish:
static const char *gPath = 0;
static UResourceBundle *gBundle = NULL;
U_STRING_DECL(gNoFormatting, " (UCONFIG_NO_FORMATTING see uconfig.h)", 38);
U_CAPI UResourceBundle *u_wmsg_setPath(const char *path, UErrorCode *err)
{
if(U_FAILURE(*err))
@ -107,6 +111,8 @@ U_CAPI UResourceBundle *u_wmsg_setPath(const char *path, UErrorCode *err)
gPath = uprv_strdup(path);
gBundle = b;
U_STRING_INIT(gNoFormatting, " (UCONFIG_NO_FORMATTING see uconfig.h)", 38);
}
return gBundle;
@ -118,9 +124,11 @@ U_CAPI int u_wmsg(FILE *fp, const char *tag, ... )
const UChar *msg;
int32_t msgLen;
UErrorCode err = U_ZERO_ERROR;
#if !UCONFIG_NO_FORMATTING
va_list ap;
#endif
UChar result[4096];
int32_t resultLength = 4096;
int32_t resultLength = LENGTHOF(result);
if(gBundle == NULL)
{
@ -140,6 +148,17 @@ U_CAPI int u_wmsg(FILE *fp, const char *tag, ... )
return -1;
}
#if UCONFIG_NO_FORMATTING
resultLength = sizeof(gNoFormatting) / U_SIZEOF_UCHAR;
if((msgLen + resultLength) <= LENGTHOF(result)) {
memcpy(result, msg, msgLen * U_SIZEOF_UCHAR);
memcpy(result + msgLen, gNoFormatting, resultLength);
resultLength += msgLen;
uprint(result, resultLength, fp, &err);
} else {
uprint(msg,msgLen, fp, &err);
}
#else
va_start(ap, tag);
resultLength = u_vformatMessage(uloc_getDefault(), msg, msgLen, result, resultLength, ap, &err);
@ -160,6 +179,7 @@ U_CAPI int u_wmsg(FILE *fp, const char *tag, ... )
}
uprint(result, resultLength, fp, &err);
#endif
if(U_FAILURE(err))
{

View file

@ -17,6 +17,11 @@
*/
#include <stdlib.h>
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "locbund.h"
#include "cmemory.h"
@ -216,3 +221,5 @@ u_locbund_getTimeFormat(ULocaleBundle *bundle)
return bundle->fTimeFormat;
}
#endif /* #if !UCONFIG_NO_FORMATTING */

View file

@ -21,6 +21,8 @@
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "unicode/unum.h"
#include "unicode/udat.h"
@ -118,6 +120,6 @@ u_locbund_getDateFormat(ULocaleBundle *bundle);
UDateFormat*
u_locbund_getTimeFormat(ULocaleBundle *bundle);
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif

View file

@ -17,6 +17,10 @@
*******************************************************************************
*/
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "loccache.h"
#include "uhash.h"
#include "unicode/uloc.h"
@ -115,3 +119,4 @@ void ucln_ustdio_registerCleanup()
ucln_registerCleanup(UCLN_USTDIO, ustdio_cleanup);
}
#endif /* #if !UCONFIG_NO_FORMATTING */

View file

@ -19,6 +19,10 @@
#ifndef LOCCACHE_H
#define LOCCACHE_H
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "locbund.h"
/* The global LocaleCacheInfo cache */
@ -30,4 +34,6 @@ u_loccache_get(const char *loc);
/* Main library cleanup function. */
U_CFUNC void ucln_ustdio_registerCleanup(void);
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif

View file

@ -18,6 +18,9 @@
*/
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "sprintf.h"
#include "sprntf_p.h"
#include "unicode/ustdio.h"
@ -1426,3 +1429,4 @@ u_vsnprintf_u(UChar *buffer,
return written;
}
#endif /* #if !UCONFIG_NO_FORMATTING */

View file

@ -19,6 +19,9 @@
#define USPRINTF_H
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "unicode/ustdio.h"
#include "ufmt_cmn.h"
#include "locbund.h"
@ -70,6 +73,6 @@ typedef int32_t (*u_sprintf_handler) (u_localized_string *output,
const u_sprintf_spec_info *info,
const ufmt_args *args);
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif

View file

@ -15,6 +15,10 @@
******************************************************************************
*/
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "sprntf_p.h"
#include "ufmt_cmn.h"
@ -299,3 +303,5 @@ u_sprintf_parse_spec (const UChar *fmt,
/* return # of characters in this specifier */
return (int32_t)(s - fmt);
}
#endif /* #if !UCONFIG_NO_FORMATTING */

View file

@ -18,6 +18,10 @@
#ifndef USPRINTF_P_H
#define USPRINTF_P_H
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "sprintf.h"
/**
@ -42,5 +46,6 @@ int32_t
u_sprintf_parse_spec (const UChar *fmt,
u_sprintf_spec *spec);
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif

View file

@ -16,6 +16,9 @@
*/
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "unicode/uchar.h"
#include "sscanf.h"
@ -1321,3 +1324,4 @@ u_vsscanf_u(const UChar *buffer,
return converted;
}
#endif /* #if !UCONFIG_NO_FORMATTING */

View file

@ -18,6 +18,10 @@
#ifndef _USSCANF_H
#define _USSCANF_H
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "unicode/ustdio.h"
#include "ufmt_cmn.h"
#include "locbund.h"
@ -70,6 +74,6 @@ typedef int32_t (*u_sscanf_handler) (u_localized_string *input,
const UChar *fmt,
int32_t *consumed);
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif

View file

@ -15,6 +15,10 @@
******************************************************************************
*/
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "sscanf_p.h"
#include "ufmt_cmn.h"
@ -179,3 +183,5 @@ u_sscanf_parse_spec (const UChar *fmt,
/* return # of characters in this specifier */
return (int32_t)(s - fmt);
}
#endif /* #if !UCONFIG_NO_FORMATTING */

View file

@ -18,6 +18,10 @@
#ifndef _USSCANF_P_H
#define _USSCANF_P_H
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "sscanf.h"
/**
@ -41,5 +45,6 @@ int32_t
u_sscanf_parse_spec (const UChar *fmt,
u_sscanf_spec *spec);
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif

View file

@ -87,21 +87,18 @@ u_finit(FILE *f,
return 0;
}
uprv_memset(result, 0, sizeof(UFILE));
#ifdef WIN32
result->fFile = &_iob[_fileno(f)];
#else
result->fFile = f;
#endif
result->fTranslit = NULL;
result->fOwnFile = FALSE;
result->fOwnBundle = FALSE;
result->fUCPos = result->fUCBuffer;
result->fUCLimit = result->fUCBuffer;
result->fConverter = NULL;
result->fBundle = NULL;
if(hasICUData(codepage)) {
#if !UCONFIG_NO_FORMATTING
/* if locale is 0, use the default */
if(locale == 0) {
locale = uloc_getDefault();
@ -113,6 +110,7 @@ u_finit(FILE *f,
uprv_free(result);
return 0;
}
#endif
} else {
/* bootstrap mode */
return result;
@ -160,8 +158,10 @@ u_fclose(UFILE *file)
if(file->fOwnFile)
fclose(file->fFile);
#if !UCONFIG_NO_FORMATTING
if(file->fOwnBundle)
u_locbund_delete(file->fBundle);
#endif
ucnv_close(file->fConverter);
uprv_free(file);
@ -173,6 +173,8 @@ u_fgetfile( UFILE *f)
return f->fFile;
}
#if !UCONFIG_NO_FORMATTING
U_CAPI const char* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
u_fgetlocale( UFILE *file)
{
@ -192,6 +194,8 @@ u_fsetlocale(const char *locale,
return file->fBundle == 0 ? -1 : 0;
}
#endif
U_CAPI const char* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
u_fgetcodepage(UFILE *file)
{
@ -212,12 +216,14 @@ u_fsetcodepage( const char *codepage,
{
UErrorCode status = U_ZERO_ERROR;
#if !UCONFIG_NO_FORMATTING
/* if the codepage is 0, use the default for the locale */
if(codepage == 0) {
codepage = uprv_defaultCodePageForLocale(file->fBundle->fLocale);
/* if the codepage is still 0, fall back on the default codepage */
}
#endif
ucnv_close(file->fConverter);
file->fConverter = ucnv_open(codepage, &status);

View file

@ -32,8 +32,9 @@
/* A UFILE */
#if !UCONFIG_NO_TRANSLITERATION
typedef struct {
UTransliterator *fTranslit;
UChar *buffer; /* Beginning of buffer */
int32_t capacity; /* Capacity of buffer */
int32_t pos; /* Beginning of untranslitted data */
@ -41,12 +42,16 @@ typedef struct {
UTransliterator *translit;
} UFILETranslitBuffer;
#endif
struct UFILE {
FILE *fFile; /* the actual fs interface */
UBool fOwnFile; /* TRUE if fFile should be closed */
#if !UCONFIG_NO_FORMATTING
ULocaleBundle *fBundle; /* formatters */
UBool fOwnBundle; /* TRUE if fBundle should be deleted */
#endif
UConverter *fConverter; /* for codeset conversion */
@ -59,7 +64,9 @@ struct UFILE {
UChar *fUCLimit; /* data limit in fUCBuffer */
UChar *fUCPos; /* current pos in fUCBuffer */
#if !UCONFIG_NO_TRANSLITERATION
UFILETranslitBuffer *fTranslit;
#endif
};
/**

View file

@ -184,6 +184,8 @@ u_fflush(UFILE *file);
U_CAPI FILE* U_EXPORT2
u_fgetfile(UFILE *f);
#if !UCONFIG_NO_FORMATTING
/**
* Get the locale whose conventions are used to format and parse output.
* This is the same locale passed in the preceding call to<TT>u_fsetlocale</TT>
@ -207,6 +209,8 @@ U_CAPI int32_t U_EXPORT2
u_fsetlocale(const char *locale,
UFILE *file);
#endif
/**
* Get the codepage in which data is written to and read from the UFILE.
* This is the same codepage passed in the preceding call to
@ -483,6 +487,8 @@ u_file_read(UChar *chars,
int32_t count,
UFILE *f);
#if !UCONFIG_NO_TRANSLITERATION
/**
* Set a transliterator on the UFILE. The transliterator will be owned by the
* UFILE.
@ -504,13 +510,7 @@ U_CAPI UTransliterator* U_EXPORT2
u_fsettransliterator(UFILE *file, UFileDirection direction,
UTransliterator *adopt, UErrorCode *status);
#endif
/* Output string functions */

View file

@ -18,6 +18,9 @@
*/
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "uprintf.h"
#include "uprntf_p.h"
#include "unicode/ustdio.h"
@ -1314,3 +1317,4 @@ u_vfprintf_u( UFILE *f,
return written;
}
#endif /* #if !UCONFIG_NO_FORMATTING */

View file

@ -20,6 +20,9 @@
#define UPRINTF_H
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "unicode/ustdio.h"
#include "ufmt_cmn.h"
@ -62,6 +65,6 @@ typedef int32_t (*u_printf_handler) (UFILE *stream,
const u_printf_spec_info *info,
const ufmt_args *args);
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif

View file

@ -16,6 +16,10 @@
*******************************************************************************
*/
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "uprntf_p.h"
#include "ufmt_cmn.h"
@ -300,3 +304,5 @@ u_printf_parse_spec (const UChar *fmt,
/* return # of characters in this specifier */
return (int32_t)(s - fmt);
}
#endif /* #if !UCONFIG_NO_FORMATTING */

View file

@ -19,6 +19,10 @@
#ifndef UPRNTF_P_H
#define UPRNTF_P_H
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "uprintf.h"
/**
@ -43,5 +47,6 @@ int32_t
u_printf_parse_spec (const UChar *fmt,
u_printf_spec *spec);
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif

View file

@ -17,6 +17,9 @@
*/
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "unicode/uchar.h"
#include "uscanf.h"
@ -1334,3 +1337,4 @@ u_vfscanf_u(UFILE *f,
return converted;
}
#endif /* #if !UCONFIG_NO_FORMATTING */

View file

@ -19,6 +19,10 @@
#ifndef USCANF_H
#define USCANF_H
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "unicode/ustdio.h"
#include "ufmt_cmn.h"
@ -60,6 +64,6 @@ typedef int32_t (*u_scanf_handler) (UFILE *stream,
const UChar *fmt,
int32_t *consumed);
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif

View file

@ -16,6 +16,10 @@
*******************************************************************************
*/
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "uscanf_p.h"
#include "ufmt_cmn.h"
@ -180,3 +184,5 @@ u_scanf_parse_spec (const UChar *fmt,
/* return # of characters in this specifier */
return (int32_t)(s - fmt);
}
#endif /* #if !UCONFIG_NO_FORMATTING */

View file

@ -19,6 +19,10 @@
#ifndef _USCANF_P
#define _USCANF_P
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "uscanf.h"
/**
@ -42,5 +46,6 @@ int32_t
u_scanf_parse_spec (const UChar *fmt,
u_scanf_spec *spec);
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif

View file

@ -41,6 +41,7 @@ static const uint32_t DELIMITERS_LEN = 1;
#define IS_STRING_DELIMITER(s) (UBool)( (s) == DELIM_CR || \
(s) == DELIM_LF )
#if !UCONFIG_NO_TRANSLITERATION
U_CAPI UTransliterator* U_EXPORT2
u_fsettransliterator(UFILE *file, UFileDirection direction,
@ -105,7 +106,6 @@ u_fsettransliterator(UFILE *file, UFileDirection direction,
return old;
}
static const UChar * u_file_translit(UFILE *f, const UChar *src, int32_t *count, UBool flush)
{
int32_t newlen;
@ -217,12 +217,15 @@ static const UChar * u_file_translit(UFILE *f, const UChar *src, int32_t *count,
}
}
#endif
void
ufile_flush_translit(UFILE *f)
{
#if !UCONFIG_NO_TRANSLITERATION
if((!f)||(!f->fTranslit))
return;
#endif
u_file_write_flush(NULL, 0, f, TRUE);
}
@ -231,11 +234,14 @@ ufile_flush_translit(UFILE *f)
void
ufile_close_translit(UFILE *f)
{
#if !UCONFIG_NO_TRANSLITERATION
if((!f)||(!f->fTranslit))
return;
#endif
ufile_flush_translit(f);
#if !UCONFIG_NO_TRANSLITERATION
if(f->fTranslit->translit)
utrans_close(f->fTranslit->translit);
@ -246,6 +252,7 @@ ufile_close_translit(UFILE *f)
uprv_free(f->fTranslit);
f->fTranslit = NULL;
#endif
}
@ -284,6 +291,7 @@ u_file_write_flush( const UChar *chars,
int32_t written = 0;
int32_t numConverted = 0;
#if !UCONFIG_NO_TRANSLITERATION
if((f->fTranslit) && (f->fTranslit->translit))
{
/* Do the transliteration */
@ -291,6 +299,7 @@ u_file_write_flush( const UChar *chars,
sourceAlias = mySource;
mySourceEnd = mySource + count;
}
#endif
/* Perform the conversion in a loop */
do {

View file

@ -21,6 +21,21 @@
#include "unicode/utypes.h"
/*
* Dummy code:
* If all modules in the I18N library are switched off, then there are no
* library exports and MSVC 6 writes a .dll but not a .lib file.
* Unless we export _something_ in that case...
*/
#if UCONFIG_NO_COLLATION && UCONFIG_NO_FORMATTING && UCONFIG_NO_TRANSLITERATION
U_CAPI int32_t U_EXPORT2
uprv_icuin_lib_dummy(int32_t i) {
return -i;
}
#endif
/* Format class implementation ---------------------------------------------- */
#if !UCONFIG_NO_FORMATTING
#include "unicode/format.h"

View file

@ -26,6 +26,19 @@
//
//--------------------------------------------------------------------
#include <stdio.h>
#include "unicode/utypes.h"
#if UCONFIG_NO_BREAK_ITERATION
extern int
main(int argc, const char *argv[]) {
fprintf(stderr, "genbrk performs no-op because of UCONFIG_NO_BREAK_ITERATION, see uconfig.h\n");
return 0;
}
#else
#include "unicode/ucnv.h"
#include "unicode/unistr.h"
#include "unicode/rbbi.h"
@ -253,3 +266,5 @@ int main(int argc, char **argv) {
printf("genbrk: tool completed successfully.\n");
return 0;
}
#endif /* #if !UCONFIG_NO_BREAK_ITERATION */

View file

@ -579,7 +579,7 @@ parseCollationElements(char *tag, uint32_t startline, UErrorCode *status)
}
else
{
error(line, "enexpected token %s", tokenNames[token]);
error(line, "Unexpected token %s", tokenNames[token]);
}
return NULL;
@ -626,13 +626,15 @@ parseCollationElements(char *tag, uint32_t startline, UErrorCode *status)
}
else if (uprv_strcmp(subtag, "Sequence") == 0)
{
#if UCONFIG_NO_COLLATION
warning(line, "Not building collation elements because of UCONFIG_NO_COLLATION, see uconfig.h");
#else
UErrorCode intStatus = U_ZERO_ERROR;
/* do the collation elements */
int32_t len = 0;
uint8_t *data = NULL;
UCollator *coll = NULL;
UChar *rules = NULL;
UParseError parseError;
coll = ucol_openRules(tokenValue->fChars, tokenValue->fLength,
UCOL_OFF, UCOL_DEFAULT_STRENGTH,&parseError, &intStatus);
@ -662,8 +664,7 @@ parseCollationElements(char *tag, uint32_t startline, UErrorCode *status)
{
warning(line, "%%Collation could not be constructed from CollationElements - check context!");
}
uprv_free(rules);
#endif
}
member = string_open(bundle, subtag, tokenValue->fChars, tokenValue->fLength, status);

View file

@ -28,6 +28,17 @@
#include <stdio.h>
#include <stdlib.h>
#include "unicode/utypes.h"
#if UCONFIG_NO_FORMATTING
extern int
main(int argc, const char *argv[]) {
fprintf(stderr, "gentz performs no-op because of UCONFIG_NO_FORMATTING, see uconfig.h\n");
return 0;
}
#else
#include "unicode/putil.h"
#include "cmemory.h"
#include "cstring.h"
@ -790,3 +801,5 @@ int32_t gentz::readLine(FileStream* in) {
// then read the next line.
return (*buffer == NUL) ? readLine(in) : uprv_strlen(buffer);
}
#endif /* #if !UCONFIG_NO_FORMATTING */

View file

@ -23,6 +23,19 @@
* 05/09/2001 weiv Case bits are now in the CEs, not in front
*/
#include <stdio.h>
#include "unicode/utypes.h"
#if UCONFIG_NO_COLLATION
extern int
main(int argc, const char *argv[]) {
fprintf(stderr, "genuca performs no-op because of UCONFIG_NO_COLLATION, see uconfig.h\n");
return 0;
}
#else
#include "genuca.h"
#include "uoptions.h"
#include "toolutil.h"
@ -991,6 +1004,8 @@ int main(int argc, char* argv[]) {
return write_uca_table(filename, destdir, copyright, &status);
}
#endif /* #if !UCONFIG_NO_COLLATION */
/*
* Hey, Emacs, please set the following:
*