Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Unified Diff: icu52/patches/nan.patch

Issue 224943002: icu local change part1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: function indentation changed Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « icu52/patches/khmer-dictbe.patch ('k') | icu52/patches/pandroid.h.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: icu52/patches/nan.patch
===================================================================
--- icu52/patches/nan.patch (revision 261238)
+++ icu52/patches/nan.patch (working copy)
@@ -1,65 +0,0 @@
-Index: source/i18n/digitlst.cpp
-===================================================================
---- source/i18n/digitlst.cpp (revision 88316)
-+++ source/i18n/digitlst.cpp (working copy)
-@@ -60,6 +60,18 @@
-
- U_NAMESPACE_BEGIN
-
-+static void
-+loadDecimalChar() {
-+ if (gDecimal == 0) {
-+ char rep[MAX_DIGITS];
-+ // For machines that decide to change the decimal on you,
-+ // and try to be too smart with localization.
-+ // This normally should be just a '.'.
-+ sprintf(rep, "%+1.1f", 1.0);
-+ gDecimal = rep[2];
-+ }
-+}
-+
- // -------------------------------------
- // default constructor
-
-@@ -398,15 +410,6 @@
- }
- DigitList *nonConstThis = const_cast<DigitList *>(this);
-
-- if (gDecimal == 0) {
-- char rep[MAX_DIGITS];
-- // For machines that decide to change the decimal on you,
-- // and try to be too smart with localization.
-- // This normally should be just a '.'.
-- sprintf(rep, "%+1.1f", 1.0);
-- gDecimal = rep[2];
-- }
--
- if (isZero()) {
- nonConstThis->fDouble = 0.0;
- if (decNumberIsNegative(fDecNumber)) {
-@@ -441,6 +444,7 @@
- }
- U_ASSERT(uprv_strlen(&s[0]) < MAX_DBL_DIGITS+18);
-
-+ loadDecimalChar();
- if (gDecimal != '.') {
- char *decimalPt = strchr(s, '.');
- if (decimalPt != NULL) {
-@@ -727,6 +731,17 @@
- sprintf(rep, "%+1.*e", MAX_DBL_DIGITS - 1, source);
- U_ASSERT(uprv_strlen(rep) < sizeof(rep));
-
-+ // uprv_decNumberFromString() will parse the string expecting '.' as a
-+ // decimal separator, however sprintf() can use ',' in certain locales.
-+ // Overwrite a different decimal separator with '.' here before proceeding.
-+ loadDecimalChar();
-+ if (gDecimal != '.') {
-+ char *decimalPt = strchr(rep, gDecimal);
-+ if (decimalPt != NULL) {
-+ *decimalPt = '.';
-+ }
-+ }
-+
- // Create a decNumber from the string.
- uprv_decNumberFromString(fDecNumber, rep, &fContext);
- uprv_decNumberTrim(fDecNumber);
« no previous file with comments | « icu52/patches/khmer-dictbe.patch ('k') | icu52/patches/pandroid.h.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698