then
if test "$GCC" = yes
then
- case "${host}" in
- *-*-solaris*)
- CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";;
- *-*-hpux*)
- echo "# Note: We are not using '-ansi' with HP/UX GCC because int64_t broke, see <http://bugs.icu-project.org/trac/ticket/8493>"
- CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";;
- *)
- CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";;
- esac
+ # Do not use -ansi. It limits us to C90, and it breaks some platforms.
+ # We use -std=c99 to disable the gnu99 defaults and its associated warnings
+ CFLAGS="$CFLAGS -Wall -std=c99 -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
else
case "${host}" in
*-*-cygwin)
fi
if test "$GXX" = yes
then
- CXXFLAGS="$CXXFLAGS -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
+ CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
else
case "${host}" in
*-*-cygwin)
* does not support u"abc" string literals.
* gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but
* does not support u"abc" string literals.
+ * C++11 requires support for UTF-16 literals
*/
-# define U_HAVE_CHAR16_T 0
+# if (defined(__cplusplus) && __cplusplus >= 201103L)
+# define U_HAVE_CHAR16_T 1
+# else
+# define U_HAVE_CHAR16_T 0
+# endif
#endif
/**
*/
#ifdef U_DECLARE_UTF16
/* Use the predefined value. */
-#elif (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T != 2) \
+#elif U_HAVE_CHAR16_T \
+ || (defined(__xlC__) && defined(__IBM_UTF_LITERAL) && U_SIZEOF_WCHAR_T != 2) \
|| (defined(__HP_aCC) && __HP_aCC >= 035000) \
- || (defined(__HP_cc) && __HP_cc >= 111106) \
- || U_HAVE_CHAR16_T
+ || (defined(__HP_cc) && __HP_cc >= 111106)
# define U_DECLARE_UTF16(string) u ## string
-#elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550)
-/* || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x580) */
-/* Sun's C compiler has issues with this notation, and it's unreliable. */
-# define U_DECLARE_UTF16(string) U ## string
#elif U_SIZEOF_WCHAR_T == 2 \
&& (U_CHARSET_FAMILY == 0 || (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400 && defined(__UCS2__)))
# define U_DECLARE_UTF16(string) L ## string
LAYOUT_TRUE
ICUIO_TRUE
EXTRAS_TRUE
-U_CHECK_UTF16_STRING
-U_CHECK_GNUC_UTF16_STRING
U_HAVE_WCSCPY
U_HAVE_WCHAR_H
U_TIMEZONE
U_HAVE_POPEN
U_HAVE_PLACEMENT_NEW
U_OVERRIDE_CXX_ALLOCATION
-U_HAVE_NAMESPACE
U_NL_LANGINFO_CODESET
U_HAVE_NL_LANGINFO_CODESET
U_IS_BIG_ENDIAN
: ${CFLAGS=""}
: ${CXXFLAGS=""}
-# Checks for programs
+# Checks for compilers
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+# Make sure that we try clang++ first, which provides C++11 support.
+# The g++ compiler is less likely to support C++11.
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
CXX=$CCC
else
if test -n "$ac_tool_prefix"; then
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ for ac_prog in clang++ g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe FCC KCC RCC
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
fi
if test -z "$CXX"; then
ac_ct_CXX=$CXX
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ for ac_prog in clang++ g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe FCC KCC RCC
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
then
if test "$GCC" = yes
then
- case "${host}" in
- *-*-solaris*)
- CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";;
- *-*-hpux*)
- echo "# Note: We are not using '-ansi' with HP/UX GCC because int64_t broke, see <http://bugs.icu-project.org/trac/ticket/8493>"
- CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";;
- *)
- CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";;
- esac
+ # Do not use -ansi. It limits us to C90, and it breaks some platforms.
+ # We use -std=c99 to disable the gnu99 defaults and its associated warnings
+ CFLAGS="$CFLAGS -Wall -std=c99 -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
else
case "${host}" in
*-*-cygwin)
fi
if test "$GXX" = yes
then
- CXXFLAGS="$CXXFLAGS -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
+ CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
else
case "${host}" in
*-*-cygwin)
case "${host}" in
*-linux*|i*86-*-*bsd*|i*86-pc-gnu)
- if test "$ac_cv_c_compiler_gnu" = yes; then
+ if test "$GCC" = yes; then
CPPFLAGS="${CPPFLAGS} -ffunction-sections -fdata-sections"
LDFLAGS="${LDFLAGS} -Wl,--gc-sections"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_namespace_ok" >&5
$as_echo "$ac_cv_namespace_ok" >&6; }
-U_HAVE_NAMESPACE=1
if test $ac_cv_namespace_ok = no
then
as_fn_error $? "Namespace support is required to build ICU." "$LINENO" 5
- U_HAVE_NAMESPACE=0
fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for properly overriding new and delete" >&5
$as_echo_n "checking for properly overriding new and delete... " >&6; }
U_OVERRIDE_CXX_ALLOCATION=0
case "${host}" in
*-*-aix*|powerpc64-*-linux*)
- if test "$ac_cv_c_compiler_gnu" = no; then
+ if test "$GCC" = no; then
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
CFLAGS="${CFLAGS} -qutf"
fi
;;
*-*-solaris*)
- if test "$ac_cv_c_compiler_gnu" = no; then
+ if test "$GCC" = no; then
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
CFLAGS="${CFLAGS} -xustr=ascii_utf16_ushort"
fi
;;
*-*-hpux*)
- if test "$ac_cv_c_compiler_gnu" = no; then
+ if test "$GCC" = no; then
# The option will be detected at compile time without additional compiler options.
CHECK_UTF16_STRING_RESULT="available"
fi
esac
# GCC >= 4.4 supports UTF16 string literals. The CFLAGS and CXXFLAGS may change in the future.
-# Since we have to use a different standard, if strict is enable, don't enable UTF16 string literals.
-U_CHECK_GNUC_UTF16_STRING=0
-if test "$ac_use_strict_options" = no && test "$CHECK_UTF16_STRING_RESULT" = "unknown"; then
- if test "$ac_cv_c_compiler_gnu" = yes; then
+if test "$CHECK_UTF16_STRING_RESULT" = "unknown"; then
+ if test "$GCC" = yes; then
OLD_CFLAGS="${CFLAGS}"
- OLD_CXXFLAGS="${CXXFLAGS}"
- CFLAGS="${CFLAGS} -std=gnu99 -D_GCC_"
- CXXFLAGS="${CXXFLAGS} -std=c++0x"
+ CFLAGS="${CFLAGS} -std=gnu99"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
-#ifdef _GCC_
-typedef __CHAR16_TYPE__ char16_t;
-#endif
-char16_t test[] = u"This is a UTF16 literal string.";
-#else
-GCC IS TOO OLD!
-#endif
+static const char16_t test[] = u"This is a UTF16 literal string.";
int
main ()
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- U_CHECK_UTF16_STRING=1
+ CC_UTF16_STRING=1
else
- U_CHECK_UTF16_STRING=0
+ CC_UTF16_STRING=0
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "$U_CHECK_UTF16_STRING" = 1; then
- CHECK_UTF16_STRING_RESULT="available";
- U_CHECK_GNUC_UTF16_STRING=1
+ if test "$CC_UTF16_STRING" = 1; then
+ CHECK_UTF16_STRING_RESULT="C only";
else
CFLAGS="${OLD_CFLAGS}"
- CXXFLAGS="${OLD_CXXFLAGS}"
fi
fi
-fi
+ if test "$GXX" = yes; then
+ OLD_CXXFLAGS="${CXXFLAGS}"
+ # -Wno-return-type-c-linkage is desired so that stable ICU API is not warned about.
+ CXXFLAGS="${CXXFLAGS} -std=c++11"
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+static const char16_t test[] = u"This is a UTF16 literal string.";
+
+int
+main ()
+{
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ CXX_UTF16_STRING=1
+else
+ CXX_UTF16_STRING=0
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ if test "$CXX_UTF16_STRING" = 1; then
+ if test "$CC_UTF16_STRING" = 1; then
+ CHECK_UTF16_STRING_RESULT="available";
+ else
+ CHECK_UTF16_STRING_RESULT="C++ only";
+ fi
+ else
+ CXXFLAGS="${OLD_CXXFLAGS}"
+ fi
+ fi
+fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_UTF16_STRING_RESULT" >&5
$as_echo "$CHECK_UTF16_STRING_RESULT" >&6; }
-
# Enable/disable extras
# Check whether --enable-extras was given.
if test "${enable_extras+set}" = set; then :
: ${CFLAGS=""}
: ${CXXFLAGS=""}
-# Checks for programs
+# Checks for compilers
AC_PROG_CC
-AC_PROG_CXX
+# Make sure that we try clang++ first, which provides C++11 support.
+# The g++ compiler is less likely to support C++11.
+AC_PROG_CXX([clang++ g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe FCC KCC RCC])
# Ensure that if CXXFLAGS/CFLAGS were not set when calling configure, set it correctly based on (enable/disable) debug or release option
# The release mode use is the default one for autoconf
case "${host}" in
*-linux*|i*86-*-*bsd*|i*86-pc-gnu)
- if test "$ac_cv_c_compiler_gnu" = yes; then
+ if test "$GCC" = yes; then
CPPFLAGS="${CPPFLAGS} -ffunction-sections -fdata-sections"
LDFLAGS="${LDFLAGS} -Wl,--gc-sections"
fi
using namespace x_version;
], [f();])],[ac_cv_namespace_ok=yes],[ac_cv_namespace_ok=no])] )
AC_MSG_RESULT($ac_cv_namespace_ok)
-U_HAVE_NAMESPACE=1
if test $ac_cv_namespace_ok = no
then
AC_MSG_ERROR(Namespace support is required to build ICU.)
- U_HAVE_NAMESPACE=0
fi
-AC_SUBST(U_HAVE_NAMESPACE)
AC_MSG_CHECKING([for properly overriding new and delete])
U_OVERRIDE_CXX_ALLOCATION=0
case "${host}" in
*-*-aix*|powerpc64-*-linux*)
- if test "$ac_cv_c_compiler_gnu" = no; then
+ if test "$GCC" = no; then
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
CFLAGS="${CFLAGS} -qutf"
fi
;;
*-*-solaris*)
- if test "$ac_cv_c_compiler_gnu" = no; then
+ if test "$GCC" = no; then
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
CFLAGS="${CFLAGS} -xustr=ascii_utf16_ushort"
fi
;;
*-*-hpux*)
- if test "$ac_cv_c_compiler_gnu" = no; then
+ if test "$GCC" = no; then
# The option will be detected at compile time without additional compiler options.
CHECK_UTF16_STRING_RESULT="available"
fi
esac
# GCC >= 4.4 supports UTF16 string literals. The CFLAGS and CXXFLAGS may change in the future.
-# Since we have to use a different standard, if strict is enable, don't enable UTF16 string literals.
-U_CHECK_GNUC_UTF16_STRING=0
-if test "$ac_use_strict_options" = no && test "$CHECK_UTF16_STRING_RESULT" = "unknown"; then
- if test "$ac_cv_c_compiler_gnu" = yes; then
+if test "$CHECK_UTF16_STRING_RESULT" = "unknown"; then
+ if test "$GCC" = yes; then
OLD_CFLAGS="${CFLAGS}"
- OLD_CXXFLAGS="${CXXFLAGS}"
- CFLAGS="${CFLAGS} -std=gnu99 -D_GCC_"
- CXXFLAGS="${CXXFLAGS} -std=c++0x"
+ CFLAGS="${CFLAGS} -std=gnu99"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
-#ifdef _GCC_
-typedef __CHAR16_TYPE__ char16_t;
-#endif
-char16_t test[] = u"This is a UTF16 literal string.";
-#else
-GCC IS TOO OLD!
-#endif
- ]], [[]])],[U_CHECK_UTF16_STRING=1],[U_CHECK_UTF16_STRING=0])
- if test "$U_CHECK_UTF16_STRING" = 1; then
- CHECK_UTF16_STRING_RESULT="available";
- U_CHECK_GNUC_UTF16_STRING=1
+static const char16_t test[] = u"This is a UTF16 literal string.";
+ ]], [[]])],[CC_UTF16_STRING=1],[CC_UTF16_STRING=0])
+ if test "$CC_UTF16_STRING" = 1; then
+ CHECK_UTF16_STRING_RESULT="C only";
else
CFLAGS="${OLD_CFLAGS}"
+ fi
+ fi
+ if test "$GXX" = yes; then
+ OLD_CXXFLAGS="${CXXFLAGS}"
+ # -Wno-return-type-c-linkage is desired so that stable ICU API is not warned about.
+ CXXFLAGS="${CXXFLAGS} -std=c++11"
+ AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+static const char16_t test[] = u"This is a UTF16 literal string.";
+ ]], [[]])],[CXX_UTF16_STRING=1],[CXX_UTF16_STRING=0])
+ AC_LANG_POP([C++])
+ if test "$CXX_UTF16_STRING" = 1; then
+ if test "$CC_UTF16_STRING" = 1; then
+ CHECK_UTF16_STRING_RESULT="available";
+ else
+ CHECK_UTF16_STRING_RESULT="C++ only";
+ fi
+ else
CXXFLAGS="${OLD_CXXFLAGS}"
fi
fi
fi
-AC_SUBST(U_CHECK_GNUC_UTF16_STRING)
-
AC_MSG_RESULT($CHECK_UTF16_STRING_RESULT)
-AC_SUBST(U_CHECK_UTF16_STRING)
# Enable/disable extras
AC_ARG_ENABLE(extras,
*
* @stable ICU 4.2
*/
-U_STABLE icu::UnicodeString & U_EXPORT2
+U_I18N_API icu::UnicodeString & U_EXPORT2
uspoof_getSkeletonUnicodeString(const USpoofChecker *sc,
uint32_t type,
const icu::UnicodeString &s,
/*
***************************************************************************
-* Copyright (C) 2008-2011, International Business Machines Corporation
+* Copyright (C) 2008-2012, International Business Machines Corporation
* and others. All Rights Reserved.
***************************************************************************
* file name: uspoof.cpp
-U_CAPI UnicodeString & U_EXPORT2
+U_I18N_API UnicodeString & U_EXPORT2
uspoof_getSkeletonUnicodeString(const USpoofChecker *sc,
uint32_t type,
const UnicodeString &s,
/*
******************************************************************************
*
-* Copyright (C) 1998-2011, International Business Machines
+* Copyright (C) 1998-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
******************************************************************************
*/
-/*
- * Defines _XOPEN_SOURCE for access to POSIX functions.
- * Must be before any other #includes.
- */
-#include "uposixdefs.h"
-
#include "locmap.h"
#include "unicode/ustdio.h"
#include "ufile.h"
#!/bin/sh
-# Copyright (c) 1999-2011, International Business Machines Corporation and
+# Copyright (c) 1999-2012, International Business Machines Corporation and
# others. All Rights Reserved.
# runConfigureICU: This script will run the "configure" script for the appropriate platform
Linux*)
THE_OS="Linux"
THE_COMP="the GNU C++"
- CC=gcc; export CC
- CXX=g++; export CXX
DEBUG_CFLAGS='-g -O0'
DEBUG_CXFLAGS='-g -O0'
;;
}
-#if 0
+/*
&m < a
&[before 1] a < x <<< X << q <<< Q < z
assert: m <<< M < x <<< X << q <<< Q < z < a < n
&[before 3] \u24DC <<< x <<< X << q <<< Q < z
assert: m <<< x <<< X <<< \u24DC <<< M << q <<< Q < z < n
-#endif
+*/
#if 0
/*
*******************************************************************************
-* Copyright (C) 2010-2011, International Business Machines
+* Copyright (C) 2010-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* file name: bytetrietest.cpp
{ "t", 0x400000 },
{ "uu", 0x800000 },
{ "vv", 0x7fffffff },
- { "zz", 0x80000000 }
+ { "zz", (int32_t)0x80000000 }
};
for(int32_t length=2; length<=LENGTHOF(data); ++length) {
infoln("TestBranches length=%d", (int)length);
{ "r", 0x333333 },
{ "s2345", 0x4444444 },
{ "t234567890", 0x77777777 },
- { "z", 0x80000001 }
+ { "z", (int32_t)0x80000001 }
};
checkData(data, LENGTHOF(data));
}
}
// call individual tests, to be overriden to call implementations
-void IntlTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
+void IntlTest::runIndexedTest( int32_t /*index*/, UBool /*exec*/, const char* & /*name*/, char* /*par*/ )
{
// to be overriden by a method like:
/*
}
*/
this->errln("*** runIndexedTest needs to be overriden! ***");
- name = ""; exec = exec; index = index; par = par;
}
virtual UnicodeString& format( double number,
UnicodeString& toAppendTo,
- FieldPosition& pos,
+ FieldPositionIterator* posIter,
UErrorCode& status) const
{
- return NumberFormat::format(number, toAppendTo, pos, status);
+ return NumberFormat::format(number, toAppendTo, posIter, status);
}
/* Just keep this here to make some of the compilers happy */
/*
*******************************************************************************
-* Copyright (C) 2010-2011, International Business Machines
+* Copyright (C) 2010-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* file name: ucharstrietest.cpp
{ "t", 0x400000 },
{ "uu", 0x800000 },
{ "vv", 0x7fffffff },
- { "zz", 0x80000000 }
+ { "zz", (int32_t)0x80000000 }
};
for(int32_t length=2; length<=LENGTHOF(data); ++length) {
infoln("TestBranches length=%d", (int)length);
{ "r", 0x333333 },
{ "s2345", 0x4444444 },
{ "t234567890", 0x77777777 },
- { "z", 0x80000001 }
+ { "z", (int32_t)0x80000001 }
};
checkData(data, LENGTHOF(data));
}
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 2002-2011, International Business Machines Corporation and
+ * Copyright (c) 2002-2012, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
}
// call individual tests, to be overriden to call implementations
-UPerfFunction* UPerfTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* par )
+UPerfFunction* UPerfTest::runIndexedTest( int32_t /*index*/, UBool /*exec*/, const char* & /*name*/, char* /*par*/ )
{
// to be overriden by a method like:
/*
}
*/
fprintf(stderr,"*** runIndexedTest needs to be overriden! ***");
- name = ""; exec = exec; index = index; par = par;
return NULL;
}
/*
*******************************************************************************
*
-* Copyright (C) 1999-2011, International Business Machines
+* Copyright (C) 1999-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
static const int32_t indentsize = 4;
static int32_t truncsize = DERB_DEFAULT_TRUNC;
-static UBool trunc = FALSE;
+static UBool truncate = FALSE;
static const char *getEncodingName(const char *encoding);
static void reportError(const char *pname, UErrorCode *status, const char *when);
}
if(options[4].doesOccur) {
- trunc = TRUE;
+ truncate = TRUE;
if(options[4].value != NULL) {
truncsize = atoi(options[4].value); /* user defined printable size */
} else {
truncsize = DERB_DEFAULT_TRUNC; /* we'll use default omitting size */
}
} else {
- trunc = FALSE;
+ truncate = FALSE;
}
if(options[5].doesOccur) {
int32_t len = 0;
const UChar* thestr = res_getAlias(&(parent->fResData), r, &len);
UChar *string = quotedString(thestr);
- if(trunc && len > truncsize) {
+ if(truncate && len > truncsize) {
char msg[128];
printIndent(out, converter, indent);
sprintf(msg, "// WARNING: this resource, size %li is truncated to %li\n",
UChar *string = quotedString(thestr);
/* TODO: String truncation */
- if(trunc && len > truncsize) {
+ if(truncate && len > truncsize) {
char msg[128];
printIndent(out, converter, indent);
sprintf(msg, "// WARNING: this resource, size %li is truncated to %li\n",
{
int32_t len = 0;
const int8_t *data = (const int8_t *)ures_getBinary(resource, &len, status);
- if(trunc && len > truncsize) {
+ if(truncate && len > truncsize) {
char msg[128];
printIndent(out, converter, indent);
sprintf(msg, "// WARNING: this resource, size %li is truncated to %li\n",
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 2007-2010, International Business Machines Corporation and
+ * Copyright (c) 2007-2012, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
-U_CAPI const UnicodeString& U_EXPORT2 udbg_enumString(UDebugEnumType type, int32_t field) {
+U_TOOLUTIL_API const UnicodeString& U_EXPORT2 udbg_enumString(UDebugEnumType type, int32_t field) {
if(strs == NULL ) {
udbg_setup();
}
/*
************************************************************************
-* Copyright (c) 2007-2011, International Business Machines
+* Copyright (c) 2007-2012, International Business Machines
* Corporation and others. All Rights Reserved.
************************************************************************
*/
#if !UCONFIG_NO_FORMATTING
-U_CAPI const icu::UnicodeString& U_EXPORT2
+U_TOOLUTIL_API const icu::UnicodeString& U_EXPORT2
udbg_enumString(UDebugEnumType type, int32_t field);
/**