mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 00:43:32 +00:00
ICU-9596 cleanup U_NO_DEFAULT_INCLUDE_UTF_HEADERS - use utf_old.h in tests when needed
X-SVN-Rev: 32440
This commit is contained in:
parent
9adb3fd642
commit
6eef7bff7b
9 changed files with 26 additions and 8 deletions
icu4c/source
common/unicode
extra/uconv
test
tools
|
@ -1,11 +1,11 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2002-2011, International Business Machines
|
||||
* Copyright (C) 2002-2012, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
* file name: utf.h
|
||||
* file name: utf_old.h
|
||||
* encoding: US-ASCII
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
|
@ -298,7 +298,7 @@ typedef int32_t UTextOffset;
|
|||
* Code point comparisons need to be in uint32_t because UChar32
|
||||
* may be a signed type, and negative values must be recognized.
|
||||
*
|
||||
* @deprecated ICU 2.4. Use U8_LENGTH instead, see utf_old.h.
|
||||
* @deprecated ICU 2.4. Use U8_LENGTH instead, see utf.h.
|
||||
*/
|
||||
#if 1
|
||||
# define UTF8_CHAR_LENGTH(c) \
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <unicode/translit.h>
|
||||
#include <unicode/uset.h>
|
||||
#include <unicode/uclean.h>
|
||||
#include <unicode/utf16.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
|
|
@ -22,6 +22,12 @@ The main root for C API tests
|
|||
#include "unicode/utypes.h"
|
||||
#include "unicode/putil.h"
|
||||
#include "unicode/ctest.h"
|
||||
|
||||
#if U_NO_DEFAULT_INCLUDE_UTF_HEADERS
|
||||
/* deprecated - make tests pass with U_NO_DEFAULT_INCLUDE_UTF_HEADERS */
|
||||
#include "unicode/utf_old.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef U_USE_DEPRECATED_API
|
||||
|
|
|
@ -15,13 +15,19 @@
|
|||
#include "unicode/fmtable.h"
|
||||
#include "unicode/testlog.h"
|
||||
|
||||
|
||||
#if U_NO_DEFAULT_INCLUDE_UTF_HEADERS
|
||||
/* deprecated - make tests pass with U_NO_DEFAULT_INCLUDE_UTF_HEADERS */
|
||||
#include "unicode/utf_old.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \def ICU_USE_THREADS
|
||||
*
|
||||
* Enables multi-threaded testing. Moved here from uconfig.h.
|
||||
* Default: enabled
|
||||
*
|
||||
* This switched used to allow thread support (use of mutexes) to be compiled out of ICU.
|
||||
* This switch used to allow thread support (use of mutexes) to be compiled out of ICU.
|
||||
*/
|
||||
#ifdef ICU_USE_THREADS
|
||||
/* Use the predefined value. */
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "unicode/ucharstrie.h"
|
||||
#include "unicode/bytestrie.h"
|
||||
#include "unicode/ucnv.h"
|
||||
#include "unicode/utf16.h"
|
||||
|
||||
#include "charstr.h"
|
||||
#include "dictionarydata.h"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 1998-2011, International Business Machines
|
||||
* Copyright (C) 1998-2012, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
|
@ -19,6 +19,7 @@
|
|||
#include "read.h"
|
||||
#include "errmsg.h"
|
||||
#include "unicode/ustring.h"
|
||||
#include "unicode/utf16.h"
|
||||
|
||||
#define OPENBRACE 0x007B
|
||||
#define CLOSEBRACE 0x007D
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "uelement.h"
|
||||
#include "uinvchar.h"
|
||||
#include "ustr_imp.h"
|
||||
|
||||
#include "unicode/utf16.h"
|
||||
/*
|
||||
* Align binary data at a 16-byte offset from the start of the resource bundle,
|
||||
* to be safe for any data type it may contain.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
*
|
||||
* Copyright (C) 1998-2011, International Business Machines
|
||||
* Copyright (C) 1998-2012, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
*
|
||||
*******************************************************************************
|
||||
|
@ -20,6 +20,7 @@
|
|||
#include "cstring.h"
|
||||
#include "unicode/ustring.h"
|
||||
#include "unicode/putil.h"
|
||||
#include "unicode/utf16.h"
|
||||
|
||||
/* Protos */
|
||||
static void ustr_resize(struct UString *s, int32_t len, UErrorCode *status);
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
#include "ustr.h"
|
||||
#include "prscmnts.h"
|
||||
#include "unicode/unistr.h"
|
||||
#include "unicode/utf8.h"
|
||||
#include "unicode/utf16.h"
|
||||
#include <time.h>
|
||||
|
||||
U_NAMESPACE_USE
|
||||
|
@ -251,7 +253,7 @@ static char* convertAndEscape(char** pDest, int32_t destCap, int32_t* destLength
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if((destLen+UTF8_CHAR_LENGTH(c)) < destCap){
|
||||
if((destLen+U8_LENGTH(c)) < destCap){
|
||||
|
||||
/* ASCII Range */
|
||||
if(c <=0x007F){
|
||||
|
|
Loading…
Add table
Reference in a new issue