diff --git a/icu4c/source/io/ufile.c b/icu4c/source/io/ufile.c index 57476f22f92..038ae518459 100644 --- a/icu4c/source/io/ufile.c +++ b/icu4c/source/io/ufile.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1998-2012, International Business Machines +* Copyright (C) 1998-2013, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -299,4 +299,10 @@ u_fgetConverter(UFILE *file) { return file->fConverter; } +#if !UCONFIG_NO_FORMATTING +U_CAPI const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(const UFILE *file) +{ + return u_locbund_getNumberFormat(&file->str.fBundle, UNUM_DECIMAL); +} +#endif diff --git a/icu4c/source/io/unicode/ustdio.h b/icu4c/source/io/unicode/ustdio.h index 5732a7ec2bd..b220198a106 100644 --- a/icu4c/source/io/unicode/ustdio.h +++ b/icu4c/source/io/unicode/ustdio.h @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1998-2012, International Business Machines +* Copyright (C) 1998-2013, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -29,6 +29,7 @@ #include "unicode/ucnv.h" #include "unicode/utrans.h" #include "unicode/localpointer.h" +#include "unicode/unum.h" /* TODO @@ -438,6 +439,13 @@ u_fsetcodepage(const char *codepage, U_STABLE UConverter* U_EXPORT2 u_fgetConverter(UFILE *f); #if !UCONFIG_NO_FORMATTING +/** + * Returns an alias to the number formatter being used for this file. + * @param f The UFILE to get the value from + * @return alias to the number formatter (The formatter must not be modified or closed) + * @draft ICU 51 +*/ + U_DRAFT const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(const UFILE *f); /* Output functions */