1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/common/icudataver.c Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +/* 1.5 +****************************************************************************** 1.6 +* 1.7 +* Copyright (C) 2009-2011, International Business Machines 1.8 +* Corporation and others. All Rights Reserved. 1.9 +* 1.10 +****************************************************************************** 1.11 +*/ 1.12 + 1.13 +#include "unicode/utypes.h" 1.14 +#include "unicode/icudataver.h" 1.15 +#include "unicode/ures.h" 1.16 +#include "uresimp.h" /* for ures_getVersionByKey */ 1.17 + 1.18 +U_CAPI void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UErrorCode *status) { 1.19 + UResourceBundle *icudatares = NULL; 1.20 + 1.21 + if (U_FAILURE(*status)) { 1.22 + return; 1.23 + } 1.24 + 1.25 + if (dataVersionFillin != NULL) { 1.26 + icudatares = ures_openDirect(NULL, U_ICU_VERSION_BUNDLE , status); 1.27 + if (U_SUCCESS(*status)) { 1.28 + ures_getVersionByKey(icudatares, U_ICU_DATA_KEY, dataVersionFillin, status); 1.29 + } 1.30 + ures_close(icudatares); 1.31 + } 1.32 +}