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

Unified Diff: source/common/ushape.cpp

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 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 | « source/common/uscript_props.cpp ('k') | source/common/usprep.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/ushape.cpp
diff --git a/source/common/ushape.cpp b/source/common/ushape.cpp
index 924a43a98f2cfeba48aed552f01f45d1649a991b..eeae57f3d4370ec9489776caed09363d75ac8666 100644
--- a/source/common/ushape.cpp
+++ b/source/common/ushape.cpp
@@ -1,7 +1,7 @@
/*
******************************************************************************
*
- * Copyright (C) 2000-2013, International Business Machines
+ * Copyright (C) 2000-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@@ -26,8 +26,6 @@
#include "ubidi_props.h"
#include "uassert.h"
-#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
-
/*
* This implementation is designed for 16-bit Unicode strings.
* The main assumption is that the Arabic characters and their
@@ -212,10 +210,20 @@ static const UChar araLink[178]=
0, /*0x0674*/
1 + 32, /*0x0675*/
1, 1, /*0x0676-0x0677*/
- 1+2, 1+2, 1+2, 1+2, 1+2, 1+2, /*0x0678-0x067D*/
+ 1 + 2, /*0x0678*/
+ 1 + 2 + 8 + 256 * 0x16,/*0x0679*/
+ 1 + 2 + 8 + 256 * 0x0E,/*0x067A*/
+ 1 + 2 + 8 + 256 * 0x02,/*0x067B*/
+ 1+2, 1+2, /*0x67C-0x067D*/
1+2+8+256 * 0x06, 1+2, 1+2, 1+2, 1+2, 1+2, /*0x067E-0x0683*/
1+2, 1+2, 1+2+8+256 * 0x2A, 1+2, /*0x0684-0x0687*/
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*0x0688-0x0691*/
+ 1 + 8 + 256 * 0x38,/*0x0688*/
+ 1, 1, 1, /*0x0689-0x068B*/
+ 1 + 8 + 256 * 0x34,/*0x068C*/
+ 1 + 8 + 256 * 0x32,/*0x068D*/
+ 1 + 8 + 256 * 0x36,/*0x068E*/
+ 1, 1, /*0x068F-0x0690*/
+ 1 + 8 + 256 * 0x3C,/*0x0691*/
1, 1, 1, 1, 1, 1, 1+8+256 * 0x3A, 1, /*0x0692-0x0699*/
1+2, 1+2, 1+2, 1+2, 1+2, 1+2, /*0x069A-0x06A3*/
1+2, 1+2, 1+2, 1+2, /*0x069A-0x06A3*/
@@ -223,15 +231,29 @@ static const UChar araLink[178]=
1+2, 1+2, 1+2, 1+2, /*0x06A4-0x06AD*/
1+2, 1+2+8+256 * 0x42, 1+2, 1+2, 1+2, 1+2, /*0x06AE-0x06B7*/
1+2, 1+2, 1+2, 1+2, /*0x06AE-0x06B7*/
- 1+2, 1+2, 1+2, 1+2, 1+2, 1+2, /*0x06B8-0x06BF*/
- 1+2, 1+2, /*0x06B8-0x06BF*/
- 1, /*0x06C0*/
- 1+2, /*0x06C1*/
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*0x06C2-0x06CB*/
- 1+2+8+256 * 0xAC, /*0x06CC*/
+ 1+2, 1+2, /*0x06B8-0x06B9*/
+ 1 + 8 + 256 * 0x4E,/*0x06BA*/
+ 1 + 2 + 8 + 256 * 0x50,/*0x06BB*/
+ 1+2, 1+2, /*0x06BC-0x06BD*/
+ 1 + 2 + 8 + 256 * 0x5A,/*0x06BE*/
+ 1+2, /*0x06BF*/
+ 1 + 8 + 256 * 0x54,/*0x06C0*/
+ 1 + 2 + 8 + 256 * 0x56,/*0x06C1*/
+ 1, 1, 1, /*0x06C2-0x06C4*/
+ 1 + 8 + 256 * 0x90,/*0x06C5*/
+ 1 + 8 + 256 * 0x89,/*0x06C6*/
+ 1 + 8 + 256 * 0x87,/*0x06C7*/
+ 1 + 8 + 256 * 0x8B,/*0x06C8*/
+ 1 + 8 + 256 * 0x92,/*0x06C9*/
+ 1, /*0x06CA*/
+ 1 + 8 + 256 * 0x8E,/*0x06CB*/
+ 1 + 2 + 8 + 256 * 0xAC,/*0x06CC*/
1, /*0x06CD*/
- 1+2, 1+2, 1+2, 1+2, /*0x06CE-0x06D1*/
- 1, 1 /*0x06D2-0x06D3*/
+ 1+2, 1+2, /*0x06CE-0x06CF*/
+ 1 + 2 + 8 + 256 * 0x94,/*0x06D0*/
+ 1+2, /*0x06D1*/
+ 1 + 8 + 256 * 0x5E,/*0x06D2*/
+ 1 + 8 + 256 * 0x60 /*0x06D3*/
};
static const uint8_t presALink[] = {
@@ -273,16 +295,16 @@ static const uint8_t presBLink[]=
static const UChar convertFBto06[] =
{
/***********0******1******2******3******4******5******6******7******8******9******A******B******C******D******E******F***/
-/*FB5*/ 0x671, 0x671, 0, 0, 0, 0, 0x67E, 0x67E, 0x67E, 0x67E, 0, 0, 0, 0, 0, 0,
-/*FB6*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+/*FB5*/ 0x671, 0x671, 0x67B, 0x67B, 0x67B, 0x67B, 0x67E, 0x67E, 0x67E, 0x67E, 0, 0, 0, 0, 0x67A, 0x67A,
+/*FB6*/ 0x67A, 0x67A, 0, 0, 0, 0, 0x679, 0x679, 0x679, 0x679, 0, 0, 0, 0, 0, 0,
/*FB7*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x686, 0x686, 0x686, 0x686, 0, 0,
-/*FB8*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x698, 0x698, 0, 0, 0x6A9, 0x6A9,
-/*FB9*/ 0x6A9, 0x6A9, 0x6AF, 0x6AF, 0x6AF, 0x6AF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-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 if(outputSize<=UPRV_LENGTHOF(buffer)) {
+ outputSize=UPRV_LENGTHOF(buffer);
tempbuffer=buffer;
} else {
tempbuffer = (UChar *)uprv_malloc(outputSize*U_SIZEOF_UCHAR);
« no previous file with comments | « source/common/uscript_props.cpp ('k') | source/common/usprep.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698