Merge m-i to m-c, a=merge

MozReview-Commit-ID: H4VKCYDq5cD

--HG--
rename : xpcom/tests/TestAutoRef.cpp => xpcom/tests/gtest/TestAutoRef.cpp
rename : xpcom/tests/TestCOMArray.cpp => xpcom/tests/gtest/TestCOMArray.cpp
rename : xpcom/tests/TestCOMPtr.cpp => xpcom/tests/gtest/TestCOMPtr.cpp
rename : xpcom/tests/TestCOMPtrEq.cpp => xpcom/tests/gtest/TestCOMPtrEq.cpp
rename : xpcom/tests/TestFile.cpp => xpcom/tests/gtest/TestFile.cpp
rename : xpcom/tests/TestHashtables.cpp => xpcom/tests/gtest/TestHashtables.cpp
rename : xpcom/tests/TestID.cpp => xpcom/tests/gtest/TestID.cpp
This commit is contained in:
Phil Ringnalda 2016-11-05 13:36:25 -07:00
commit a7bc94158c
3430 changed files with 170076 additions and 78047 deletions

View File

@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please # changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more. # don't change CLOBBER for WebIDL changes any more.
Bug 1311178 - File removals in devtools on OS X Bug 1299615 - Update to ICU 58 requires clobber

View File

@ -2084,7 +2084,7 @@
this._outerWindowIDBrowserMap.set(browser.outerWindowID, browser); this._outerWindowIDBrowserMap.set(browser.outerWindowID, browser);
} }
var evt = new CustomEvent("TabBrowserCreated", { bubbles: true, detail: {} }); var evt = new CustomEvent("TabBrowserInserted", { bubbles: true, detail: {} });
aTab.dispatchEvent(evt); aTab.dispatchEvent(evt);
return { usingPreloadedContent: usingPreloadedContent }; return { usingPreloadedContent: usingPreloadedContent };

View File

@ -125,7 +125,7 @@ const CLOSED_MESSAGES = new Set([
// These are tab events that we listen to. // These are tab events that we listen to.
const TAB_EVENTS = [ const TAB_EVENTS = [
"TabOpen", "TabBrowserCreated", "TabClose", "TabSelect", "TabShow", "TabHide", "TabPinned", "TabOpen", "TabBrowserInserted", "TabClose", "TabSelect", "TabShow", "TabHide", "TabPinned",
"TabUnpinned" "TabUnpinned"
]; ];
@ -935,8 +935,8 @@ var SessionStoreInternal = {
case "TabOpen": case "TabOpen":
this.onTabAdd(win); this.onTabAdd(win);
break; break;
case "TabBrowserCreated": case "TabBrowserInserted":
this.onTabBrowserCreated(win, target); this.onTabBrowserInserted(win, target);
break; break;
case "TabClose": case "TabClose":
// `adoptedBy` will be set if the tab was closed because it is being // `adoptedBy` will be set if the tab was closed because it is being
@ -1028,7 +1028,7 @@ var SessionStoreInternal = {
// add tab change listeners to all already existing tabs // add tab change listeners to all already existing tabs
for (let i = 0; i < tabbrowser.tabs.length; i++) { for (let i = 0; i < tabbrowser.tabs.length; i++) {
this.onTabBrowserCreated(aWindow, tabbrowser.tabs[i]); this.onTabBrowserInserted(aWindow, tabbrowser.tabs[i]);
} }
// notification of tab add/remove/selection/show/hide // notification of tab add/remove/selection/show/hide
TAB_EVENTS.forEach(function(aEvent) { TAB_EVENTS.forEach(function(aEvent) {
@ -1768,7 +1768,7 @@ var SessionStoreInternal = {
* @param aTab * @param aTab
* Tab reference * Tab reference
*/ */
onTabBrowserCreated: function ssi_onTabBrowserCreated(aWindow, aTab) { onTabBrowserInserted: function ssi_onTabBrowserInserted(aWindow, aTab) {
let browser = aTab.linkedBrowser; let browser = aTab.linkedBrowser;
browser.addEventListener("SwapDocShells", this); browser.addEventListener("SwapDocShells", this);
browser.addEventListener("oop-browser-crashed", this); browser.addEventListener("oop-browser-crashed", this);

View File

@ -1,3 +1,3 @@
This is the pdf.js project output, https://github.com/mozilla/pdf.js This is the pdf.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 1.6.274 Current extension version is: 1.6.304

View File

@ -93,7 +93,8 @@ function initializeDefaultPreferences() {
"useOnlyCssZoom": false, "useOnlyCssZoom": false,
"externalLinkTarget": 0, "externalLinkTarget": 0,
"enhanceTextSelection": false, "enhanceTextSelection": false,
"renderInteractiveForms": false "renderInteractiveForms": false,
"disablePageLabels": false
} }

View File

@ -51,7 +51,8 @@ var DEFAULT_PREFERENCES =
"useOnlyCssZoom": false, "useOnlyCssZoom": false,
"externalLinkTarget": 0, "externalLinkTarget": 0,
"enhanceTextSelection": false, "enhanceTextSelection": false,
"renderInteractiveForms": false "renderInteractiveForms": false,
"disablePageLabels": false
} }

View File

@ -24,8 +24,8 @@
}(this, function (exports) { }(this, function (exports) {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.6.274'; var pdfjsVersion = '1.6.304';
var pdfjsBuild = '1c3fb17'; var pdfjsBuild = 'b4100ba';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {}; var pdfjsLibs = {};
(function pdfjsWrapper() { (function pdfjsWrapper() {

View File

@ -24,8 +24,8 @@
}(this, function (exports) { }(this, function (exports) {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.6.274'; var pdfjsVersion = '1.6.304';
var pdfjsBuild = '1c3fb17'; var pdfjsBuild = 'b4100ba';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {}; var pdfjsLibs = {};
(function pdfjsWrapper() { (function pdfjsWrapper() {
@ -5979,9 +5979,9 @@
} else if (value >= 251 && value <= 254) { } else if (value >= 251 && value <= 254) {
return -((value - 251) * 256) - dict[pos++] - 108; return -((value - 251) * 256) - dict[pos++] - 108;
} else { } else {
error('255 is not a valid DICT command'); warn('CFFParser_parseDict: "' + value + '" is a reserved command.');
return NaN;
} }
return -1;
} }
function parseFloatOperand() { function parseFloatOperand() {
var str = ''; var str = '';
@ -6620,19 +6620,22 @@
if (!(key in this.keyToNameMap)) { if (!(key in this.keyToNameMap)) {
return false; return false;
} }
var valueLength = value.length;
// ignore empty values // ignore empty values
if (value.length === 0) { if (valueLength === 0) {
return true; return true;
} }
// Ignore invalid values (fixes bug1068432.pdf and bug1308536.pdf).
for (var i = 0; i < valueLength; i++) {
if (isNaN(value[i])) {
warn('Invalid CFFDict value: "' + value + '" for key "' + key + '".');
return true;
}
}
var type = this.types[key]; var type = this.types[key];
// remove the array wrapping these types of values // remove the array wrapping these types of values
if (type === 'num' || type === 'sid' || type === 'offset') { if (type === 'num' || type === 'sid' || type === 'offset') {
value = value[0]; value = value[0];
// Ignore invalid values (fixes bug 1068432).
if (isNaN(value)) {
warn('Invalid CFFDict value: ' + value + ', for key: ' + key + '.');
return true;
}
} }
this.values[key] = value; this.values[key] = value;
return true; return true;
@ -44591,6 +44594,7 @@
var outlineItem = { var outlineItem = {
dest: data.dest, dest: data.dest,
url: data.url, url: data.url,
unsafeUrl: data.unsafeUrl,
newWindow: data.newWindow, newWindow: data.newWindow,
title: stringToPDFString(title), title: stringToPDFString(title),
color: rgbColor, color: rgbColor,
@ -44701,7 +44705,6 @@
var pageLabels = new Array(this.numPages); var pageLabels = new Array(this.numPages);
var style = null; var style = null;
var prefix = ''; var prefix = '';
var start = 1;
var numberTree = new NumberTree(obj, this.xref); var numberTree = new NumberTree(obj, this.xref);
var nums = numberTree.getAll(); var nums = numberTree.getAll();
var currentLabel = '', currentIndex = 1; var currentLabel = '', currentIndex = 1;
@ -44714,11 +44717,12 @@
var s = labelDict.get('S'); var s = labelDict.get('S');
assert(!s || isName(s), 'Invalid style in PageLabel dictionary.'); assert(!s || isName(s), 'Invalid style in PageLabel dictionary.');
style = s ? s.name : null; style = s ? s.name : null;
prefix = labelDict.get('P') || ''; var p = labelDict.get('P');
assert(isString(prefix), 'Invalid prefix in PageLabel dictionary.'); assert(!p || isString(p), 'Invalid prefix in PageLabel dictionary.');
start = labelDict.get('St') || 1; prefix = p ? stringToPDFString(p) : '';
assert(isInt(start), 'Invalid start in PageLabel dictionary.'); var st = labelDict.get('St');
currentIndex = start; assert(!st || isInt(st) && st >= 1, 'Invalid start in PageLabel dictionary.');
currentIndex = st || 1;
} }
switch (style) { switch (style) {
case 'D': case 'D':
@ -45032,6 +45036,10 @@
case 'GoTo': case 'GoTo':
dest = action.get('D'); dest = action.get('D');
break; break;
case 'Launch':
// We neither want, nor can, support arbitrary 'Launch' actions.
// However, in practice they are mostly used for linking to other PDF
// files, which we thus attempt to support (utilizing `docBaseUrl`).
case 'GoToR': case 'GoToR':
var urlDict = action.get('F'); var urlDict = action.get('F');
if (isDict(urlDict)) { if (isDict(urlDict)) {
@ -50744,6 +50752,7 @@
var dict = params.dict; var dict = params.dict;
var data = this.data; var data = this.data;
data.annotationType = AnnotationType.WIDGET; data.annotationType = AnnotationType.WIDGET;
data.fieldName = this._constructFieldName(dict);
data.fieldValue = Util.getInheritableProperty(dict, 'V', /* getArray = */ data.fieldValue = Util.getInheritableProperty(dict, 'V', /* getArray = */
true); true);
data.alternativeText = stringToPDFString(dict.get('TU') || ''); data.alternativeText = stringToPDFString(dict.get('TU') || '');
@ -50760,39 +50769,43 @@
if (data.fieldType === 'Sig') { if (data.fieldType === 'Sig') {
this.setFlags(AnnotationFlag.HIDDEN); this.setFlags(AnnotationFlag.HIDDEN);
} }
// Building the full field name by collecting the field and
// its ancestors 'T' data and joining them using '.'.
var fieldName = [];
var namedItem = dict;
var ref = params.ref;
while (namedItem) {
var parent = namedItem.get('Parent');
var parentRef = namedItem.getRaw('Parent');
var name = namedItem.get('T');
if (name) {
fieldName.unshift(stringToPDFString(name));
} else if (parent && ref) {
// The field name is absent, that means more than one field
// with the same name may exist. Replacing the empty name
// with the '`' plus index in the parent's 'Kids' array.
// This is not in the PDF spec but necessary to id the
// the input controls.
var kids = parent.get('Kids');
var j, jj;
for (j = 0, jj = kids.length; j < jj; j++) {
var kidRef = kids[j];
if (kidRef.num === ref.num && kidRef.gen === ref.gen) {
break;
}
}
fieldName.unshift('`' + j);
}
namedItem = parent;
ref = parentRef;
}
data.fullName = fieldName.join('.');
} }
Util.inherit(WidgetAnnotation, Annotation, { Util.inherit(WidgetAnnotation, Annotation, {
/**
* Construct the (fully qualified) field name from the (partial) field
* names of the field and its ancestors.
*
* @private
* @memberof WidgetAnnotation
* @param {Dict} dict - Complete widget annotation dictionary
* @return {string}
*/
_constructFieldName: function WidgetAnnotation_constructFieldName(dict) {
// Both the `Parent` and `T` fields are optional. While at least one of
// them should be provided, bad PDF generators may fail to do so.
if (!dict.has('T') && !dict.has('Parent')) {
warn('Unknown field name, falling back to empty field name.');
return '';
}
// If no parent exists, the partial and fully qualified names are equal.
if (!dict.has('Parent')) {
return stringToPDFString(dict.get('T'));
}
// Form the fully qualified field name by appending the partial name to
// the parent's fully qualified name, separated by a period.
var fieldName = [];
if (dict.has('T')) {
fieldName.unshift(stringToPDFString(dict.get('T')));
}
var loopDict = dict;
while (loopDict.has('Parent')) {
loopDict = loopDict.get('Parent');
if (loopDict.has('T')) {
fieldName.unshift(stringToPDFString(loopDict.get('T')));
}
}
return fieldName.join('.');
},
/** /**
* Check if a provided field flag is set. * Check if a provided field flag is set.
* *

View File

@ -2069,7 +2069,7 @@ html[dir='rtl'] #documentPropertiesOverlay .row > * {
} }
@media all and (max-width: 510px) { @media all and (max-width: 510px) {
#scaleSelectContainer, #pageNumberLabel { #scaleSelectContainer {
display: none; display: none;
} }
} }

View File

@ -165,8 +165,7 @@ See https://github.com/adobe-type-tools/cmap-resources
<span data-l10n-id="next_label">Next</span> <span data-l10n-id="next_label">Next</span>
</button> </button>
</div> </div>
<label id="pageNumberLabel" class="toolbarLabel" for="pageNumber" data-l10n-id="page_label">Page: </label> <input type="number" id="pageNumber" class="toolbarField pageNumber" title="Page" value="1" size="4" min="1" tabindex="15" data-l10n-id="page">
<input type="number" id="pageNumber" class="toolbarField pageNumber" value="1" size="4" min="1" tabindex="15">
<span id="numPages" class="toolbarLabel"></span> <span id="numPages" class="toolbarLabel"></span>
</div> </div>
<div id="toolbarViewerRight"> <div id="toolbarViewerRight">

View File

@ -509,7 +509,8 @@ var pdfjsWebLibs;
"useOnlyCssZoom": false, "useOnlyCssZoom": false,
"externalLinkTarget": 0, "externalLinkTarget": 0,
"enhanceTextSelection": false, "enhanceTextSelection": false,
"renderInteractiveForms": false "renderInteractiveForms": false,
"disablePageLabels": false
}); });
function cloneObj(obj) { function cloneObj(obj) {
var result = {}; var result = {};
@ -3161,6 +3162,7 @@ var pdfjsWebLibs;
var disableCanvasToImageConversion = options.disableCanvasToImageConversion || false; var disableCanvasToImageConversion = options.disableCanvasToImageConversion || false;
this.id = id; this.id = id;
this.renderingId = 'thumbnail' + id; this.renderingId = 'thumbnail' + id;
this.pageLabel = null;
this.pdfPage = null; this.pdfPage = null;
this.rotation = 0; this.rotation = 0;
this.viewport = defaultViewport; this.viewport = defaultViewport;
@ -3184,6 +3186,7 @@ var pdfjsWebLibs;
linkService.page = id; linkService.page = id;
return false; return false;
}; };
this.anchor = anchor;
var div = document.createElement('div'); var div = document.createElement('div');
div.id = 'thumbnailContainer' + id; div.id = 'thumbnailContainer' + id;
div.className = 'thumbnail'; div.className = 'thumbnail';
@ -3290,7 +3293,7 @@ var pdfjsWebLibs;
} }
var id = this.renderingId; var id = this.renderingId;
var className = 'thumbnailImage'; var className = 'thumbnailImage';
var ariaLabel = mozL10n.get('thumb_page_canvas', { page: this.id }, 'Thumbnail of Page {{page}}'); var ariaLabel = mozL10n.get('thumb_page_canvas', { page: this.pageId }, 'Thumbnail of Page {{page}}');
if (this.disableCanvasToImageConversion) { if (this.disableCanvasToImageConversion) {
this.canvas.id = id; this.canvas.id = id;
this.canvas.className = className; this.canvas.className = className;
@ -3409,6 +3412,25 @@ var pdfjsWebLibs;
} }
ctx.drawImage(reducedImage, 0, 0, reducedWidth, reducedHeight, 0, 0, canvas.width, canvas.height); ctx.drawImage(reducedImage, 0, 0, reducedWidth, reducedHeight, 0, 0, canvas.width, canvas.height);
this._convertCanvasToImage(); this._convertCanvasToImage();
},
get pageId() {
return this.pageLabel !== null ? this.pageLabel : this.id;
},
/**
* @param {string|null} label
*/
setPageLabel: function PDFThumbnailView_setPageLabel(label) {
this.pageLabel = typeof label === 'string' ? label : null;
this.anchor.title = mozL10n.get('thumb_page_title', { page: this.pageId }, 'Page {{page}}');
if (this.renderingState !== RenderingStates.FINISHED) {
return;
}
var ariaLabel = mozL10n.get('thumb_page_canvas', { page: this.pageId }, 'Thumbnail of Page {{page}}');
if (this.image) {
this.image.setAttribute('aria-label', ariaLabel);
} else if (this.disableCanvasToImageConversion && this.canvas) {
this.canvas.setAttribute('aria-label', ariaLabel);
}
} }
}; };
return PDFThumbnailView; return PDFThumbnailView;
@ -4582,6 +4604,7 @@ var pdfjsWebLibs;
var renderInteractiveForms = options.renderInteractiveForms || false; var renderInteractiveForms = options.renderInteractiveForms || false;
this.id = id; this.id = id;
this.renderingId = 'page' + id; this.renderingId = 'page' + id;
this.pageLabel = null;
this.rotation = 0; this.rotation = 0;
this.scale = scale || DEFAULT_SCALE; this.scale = scale || DEFAULT_SCALE;
this.viewport = defaultViewport; this.viewport = defaultViewport;
@ -4980,6 +5003,17 @@ var pdfjsWebLibs;
self.onBeforeDraw(); self.onBeforeDraw();
} }
return promise; return promise;
},
/**
* @param {string|null} label
*/
setPageLabel: function PDFView_setPageLabel(label) {
this.pageLabel = typeof label === 'string' ? label : null;
if (this.pageLabel !== null) {
this.div.setAttribute('data-page-label', this.pageLabel);
} else {
this.div.removeAttribute('data-page-label');
}
} }
}; };
return PDFPageView; return PDFPageView;
@ -5080,6 +5114,7 @@ var pdfjsWebLibs;
*/ */
_resetView: function PDFThumbnailViewer_resetView() { _resetView: function PDFThumbnailViewer_resetView() {
this.thumbnails = []; this.thumbnails = [];
this._pageLabels = null;
this._pagesRotation = 0; this._pagesRotation = 0;
this._pagesRequests = []; this._pagesRequests = [];
// Remove the thumbnails from the DOM. // Remove the thumbnails from the DOM.
@ -5120,6 +5155,28 @@ var pdfjsWebLibs;
} }
} }
}, },
/**
* @param {Array|null} labels
*/
setPageLabels: function PDFThumbnailViewer_setPageLabels(labels) {
if (!this.pdfDocument) {
return;
}
if (!labels) {
this._pageLabels = null;
} else if (!(labels instanceof Array && this.pdfDocument.numPages === labels.length)) {
this._pageLabels = null;
console.error('PDFThumbnailViewer_setPageLabels: Invalid page labels.');
} else {
this._pageLabels = labels;
}
// Update all the `PDFThumbnailView` instances.
for (var i = 0, ii = this.thumbnails.length; i < ii; i++) {
var thumbnailView = this.thumbnails[i];
var label = this._pageLabels && this._pageLabels[i];
thumbnailView.setPageLabel(label);
}
},
/** /**
* @param {PDFThumbnailView} thumbView * @param {PDFThumbnailView} thumbView
* @returns {PDFPage} * @returns {PDFPage}
@ -5736,7 +5793,8 @@ var pdfjsWebLibs;
} }
var arg = { var arg = {
source: this, source: this,
pageNumber: val pageNumber: val,
pageLabel: this._pageLabels && this._pageLabels[val - 1]
}; };
this._currentPageNumber = val; this._currentPageNumber = val;
this.eventBus.dispatch('pagechanging', arg); this.eventBus.dispatch('pagechanging', arg);
@ -5745,6 +5803,27 @@ var pdfjsWebLibs;
this._resetCurrentPageView(); this._resetCurrentPageView();
} }
}, },
/**
* @returns {string|null} Returns the current page label,
* or `null` if no page labels exist.
*/
get currentPageLabel() {
return this._pageLabels && this._pageLabels[this._currentPageNumber - 1];
},
/**
* @param {string} val - The page label.
*/
set currentPageLabel(val) {
var pageNumber = val | 0;
// Fallback page number.
if (this._pageLabels) {
var i = this._pageLabels.indexOf(val);
if (i >= 0) {
pageNumber = i + 1;
}
}
this.currentPageNumber = pageNumber;
},
/** /**
* @returns {number} * @returns {number}
*/ */
@ -5915,11 +5994,34 @@ var pdfjsWebLibs;
} }
}.bind(this)); }.bind(this));
}, },
/**
* @param {Array|null} labels
*/
setPageLabels: function PDFViewer_setPageLabels(labels) {
if (!this.pdfDocument) {
return;
}
if (!labels) {
this._pageLabels = null;
} else if (!(labels instanceof Array && this.pdfDocument.numPages === labels.length)) {
this._pageLabels = null;
console.error('PDFViewer_setPageLabels: Invalid page labels.');
} else {
this._pageLabels = labels;
}
// Update all the `PDFPageView` instances.
for (var i = 0, ii = this._pages.length; i < ii; i++) {
var pageView = this._pages[i];
var label = this._pageLabels && this._pageLabels[i];
pageView.setPageLabel(label);
}
},
_resetView: function () { _resetView: function () {
this._pages = []; this._pages = [];
this._currentPageNumber = 1; this._currentPageNumber = 1;
this._currentScale = UNKNOWN_SCALE; this._currentScale = UNKNOWN_SCALE;
this._currentScaleValue = null; this._currentScaleValue = null;
this._pageLabels = null;
this._buffer = new PDFPageViewBuffer(DEFAULT_CACHE_SIZE); this._buffer = new PDFPageViewBuffer(DEFAULT_CACHE_SIZE);
this._location = null; this._location = null;
this._pagesRotation = 0; this._pagesRotation = 0;
@ -6447,10 +6549,12 @@ var pdfjsWebLibs;
preferencePdfBugEnabled: false, preferencePdfBugEnabled: false,
preferenceShowPreviousViewOnLoad: true, preferenceShowPreviousViewOnLoad: true,
preferenceDefaultZoomValue: '', preferenceDefaultZoomValue: '',
preferenceDisablePageLabels: false,
isViewerEmbedded: window.parent !== window, isViewerEmbedded: window.parent !== window,
url: '', url: '',
baseUrl: '', baseUrl: '',
externalServices: DefaultExernalServices, externalServices: DefaultExernalServices,
hasPageLabels: false,
// called once when the document is loaded // called once when the document is loaded
initialize: function pdfViewInitialize(appConfig) { initialize: function pdfViewInitialize(appConfig) {
configure(pdfjsLib.PDFJS); configure(pdfjsLib.PDFJS);
@ -6622,6 +6726,9 @@ var pdfjsWebLibs;
// initialization and fetching of `Preferences` to occur // initialization and fetching of `Preferences` to occur
// before the various viewer components are initialized. // before the various viewer components are initialized.
self.pdfViewer.renderInteractiveForms = value; self.pdfViewer.renderInteractiveForms = value;
}),
Preferences.get('disablePageLabels').then(function resolved(value) {
self.preferenceDisablePageLabels = value;
}) })
]).catch(function (reason) { ]).catch(function (reason) {
}); });
@ -6765,6 +6872,7 @@ var pdfjsWebLibs;
} }
this.store = null; this.store = null;
this.isInitialViewSet = false; this.isInitialViewSet = false;
this.hasPageLabels = false;
this.pdfSidebar.reset(); this.pdfSidebar.reset();
this.pdfOutlineViewer.reset(); this.pdfOutlineViewer.reset();
this.pdfAttachmentViewer.reset(); this.pdfAttachmentViewer.reset();
@ -6970,7 +7078,8 @@ var pdfjsWebLibs;
var pagesPromise = pdfViewer.pagesPromise; var pagesPromise = pdfViewer.pagesPromise;
var onePageRendered = pdfViewer.onePageRendered; var onePageRendered = pdfViewer.onePageRendered;
this.pageRotation = 0; this.pageRotation = 0;
this.pdfThumbnailViewer.setDocument(pdfDocument); var pdfThumbnailViewer = this.pdfThumbnailViewer;
pdfThumbnailViewer.setDocument(pdfDocument);
firstPagePromise.then(function (pdfPage) { firstPagePromise.then(function (pdfPage) {
downloadedPromise.then(function () { downloadedPromise.then(function () {
self.eventBus.dispatch('documentload', { source: self }); self.eventBus.dispatch('documentload', { source: self });
@ -7035,6 +7144,27 @@ var pdfjsWebLibs;
self.setInitialView(initialParams.hash); self.setInitialView(initialParams.hash);
}); });
}); });
pdfDocument.getPageLabels().then(function (labels) {
if (!labels || self.preferenceDisablePageLabels) {
return;
}
var i = 0, numLabels = labels.length;
if (numLabels !== self.pagesCount) {
console.error('The number of Page Labels does not match ' + 'the number of pages in the document.');
return;
}
// Ignore page labels that correspond to standard page numbering.
while (i < numLabels && labels[i] === (i + 1).toString()) {
i++;
}
if (i === numLabels) {
return;
}
pdfViewer.setPageLabels(labels);
pdfThumbnailViewer.setPageLabels(labels);
self.hasPageLabels = true;
self._updateUIToolbar({ resetNumPages: true });
});
pagesPromise.then(function () { pagesPromise.then(function () {
if (self.supportsPrinting) { if (self.supportsPrinting) {
pdfDocument.getJavaScript().then(function (javaScript) { pdfDocument.getJavaScript().then(function (javaScript) {
@ -7237,6 +7367,7 @@ var pdfjsWebLibs;
/** /**
* @typedef UpdateUIToolbarParameters * @typedef UpdateUIToolbarParameters
* @property {number} pageNumber * @property {number} pageNumber
* @property {string} pageLabel
* @property {string} scaleValue * @property {string} scaleValue
* @property {number} scale * @property {number} scale
* @property {boolean} resetNumPages * @property {boolean} resetNumPages
@ -7271,10 +7402,23 @@ var pdfjsWebLibs;
var toolbarConfig = this.appConfig.toolbar; var toolbarConfig = this.appConfig.toolbar;
var pagesCount = this.pagesCount; var pagesCount = this.pagesCount;
if (resetNumPages) { if (resetNumPages) {
toolbarConfig.numPages.textContent = mozL10n.get('page_of', { pageCount: pagesCount }, 'of {{pageCount}}'); if (this.hasPageLabels) {
toolbarConfig.pageNumber.type = 'text';
} else {
toolbarConfig.pageNumber.type = 'number';
toolbarConfig.numPages.textContent = mozL10n.get('of_pages', { pagesCount: pagesCount }, 'of {{pagesCount}}');
}
toolbarConfig.pageNumber.max = pagesCount; toolbarConfig.pageNumber.max = pagesCount;
} }
if (this.hasPageLabels) {
toolbarConfig.pageNumber.value = params.pageLabel || this.pdfViewer.currentPageLabel;
toolbarConfig.numPages.textContent = mozL10n.get('page_of_pages', {
pageNumber: pageNumber,
pagesCount: pagesCount
}, '({{pageNumber}} of {{pagesCount}})');
} else {
toolbarConfig.pageNumber.value = pageNumber; toolbarConfig.pageNumber.value = pageNumber;
}
toolbarConfig.previous.disabled = pageNumber <= 1; toolbarConfig.previous.disabled = pageNumber <= 1;
toolbarConfig.next.disabled = pageNumber >= pagesCount; toolbarConfig.next.disabled = pageNumber >= pagesCount;
toolbarConfig.firstPage.disabled = pageNumber <= 1; toolbarConfig.firstPage.disabled = pageNumber <= 1;
@ -7433,10 +7577,11 @@ var pdfjsWebLibs;
this.select(); this.select();
}); });
appConfig.toolbar.pageNumber.addEventListener('change', function () { appConfig.toolbar.pageNumber.addEventListener('change', function () {
PDFViewerApplication.page = this.value | 0; var pdfViewer = PDFViewerApplication.pdfViewer;
pdfViewer.currentPageLabel = this.value;
// Ensure that the page number input displays the correct value, even if the // Ensure that the page number input displays the correct value, even if the
// value entered by the user was invalid (e.g. a floating point number). // value entered by the user was invalid (e.g. a floating point number).
if (this.value !== PDFViewerApplication.page.toString()) { if (this.value !== pdfViewer.currentPageNumber.toString() && this.value !== pdfViewer.currentPageLabel) {
PDFViewerApplication._updateUIToolbar({}); PDFViewerApplication._updateUIToolbar({});
} }
}); });
@ -7729,7 +7874,10 @@ var pdfjsWebLibs;
} }
function webViewerPageChanging(e) { function webViewerPageChanging(e) {
var page = e.pageNumber; var page = e.pageNumber;
PDFViewerApplication._updateUIToolbar({ pageNumber: page }); PDFViewerApplication._updateUIToolbar({
pageNumber: page,
pageLabel: e.pageLabel
});
if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) { if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) {
PDFViewerApplication.pdfThumbnailViewer.scrollThumbnailIntoView(page); PDFViewerApplication.pdfThumbnailViewer.scrollThumbnailIntoView(page);
} }
@ -7744,7 +7892,7 @@ var pdfjsWebLibs;
var zoomDisabled = false, zoomDisabledTimeout; var zoomDisabled = false, zoomDisabledTimeout;
function handleMouseWheel(evt) { function handleMouseWheel(evt) {
var pdfViewer = PDFViewerApplication.pdfViewer; var pdfViewer = PDFViewerApplication.pdfViewer;
if (pdfViewer.isInPresentationMode) { if (!pdfViewer || pdfViewer.isInPresentationMode) {
return; return;
} }
if (evt.ctrlKey || evt.metaKey) { if (evt.ctrlKey || evt.metaKey) {

View File

@ -18,12 +18,15 @@ previous_label=Previous
next.title=Next Page next.title=Next Page
next_label=Next next_label=Next
# LOCALIZATION NOTE (page_label, page_of): # LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
# These strings are concatenated to form the "Page: X of Y" string. page.title=Page
# Do not translate "{{pageCount}}", it will be substituted with a number # LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
# representing the total number of pages. # representing the total number of pages in the document.
page_label=Page: of_pages=of {{pagesCount}}
page_of=of {{pageCount}} # LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
# will be replaced by a number representing the currently visible page,
# respectively a number representing the total number of pages in the document.
page_of_pages=({{pageNumber}} of {{pagesCount}})
zoom_out.title=Zoom Out zoom_out.title=Zoom Out
zoom_out_label=Zoom Out zoom_out_label=Zoom Out

View File

@ -27,7 +27,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "_focusManager",
// Constants // Constants
const TAB_EVENTS = ["TabBrowserCreated", "TabSelect", "TabRemotenessChange"]; const TAB_EVENTS = ["TabBrowserInserted", "TabSelect", "TabRemotenessChange"];
const WINDOW_EVENTS = ["activate", "unload"]; const WINDOW_EVENTS = ["activate", "unload"];
// lower value means higher priority // lower value means higher priority
const PRIORITY_DELTA = Ci.nsISupportsPriority.PRIORITY_NORMAL - Ci.nsISupportsPriority.PRIORITY_LOW; const PRIORITY_DELTA = Ci.nsISupportsPriority.PRIORITY_NORMAL - Ci.nsISupportsPriority.PRIORITY_LOW;
@ -49,7 +49,7 @@ this.trackBrowserWindow = function trackBrowserWindow(aWindow) {
// Global methods // Global methods
function _handleEvent(aEvent) { function _handleEvent(aEvent) {
switch (aEvent.type) { switch (aEvent.type) {
case "TabBrowserCreated": case "TabBrowserInserted":
BrowserHelper.onOpen(aEvent.target.linkedBrowser); BrowserHelper.onOpen(aEvent.target.linkedBrowser);
break; break;
case "TabSelect": case "TabSelect":

View File

@ -297,7 +297,8 @@ bool isIgnoredPathForImplicitCtor(const Decl *Declaration) {
Begin->compare_lower(StringRef("harfbuzz")) == 0 || Begin->compare_lower(StringRef("harfbuzz")) == 0 ||
Begin->compare_lower(StringRef("hunspell")) == 0 || Begin->compare_lower(StringRef("hunspell")) == 0 ||
Begin->compare_lower(StringRef("scoped_ptr.h")) == 0 || Begin->compare_lower(StringRef("scoped_ptr.h")) == 0 ||
Begin->compare_lower(StringRef("graphite2")) == 0) { Begin->compare_lower(StringRef("graphite2")) == 0 ||
Begin->compare_lower(StringRef("icu")) == 0) {
return true; return true;
} }
if (Begin->compare_lower(StringRef("chromium")) == 0) { if (Begin->compare_lower(StringRef("chromium")) == 0) {

View File

@ -12,6 +12,7 @@ SOURCES += [
'/intl/icu/source/common/chariter.cpp', '/intl/icu/source/common/chariter.cpp',
'/intl/icu/source/common/charstr.cpp', '/intl/icu/source/common/charstr.cpp',
'/intl/icu/source/common/cmemory.c', '/intl/icu/source/common/cmemory.c',
'/intl/icu/source/common/cstr.cpp',
'/intl/icu/source/common/cstring.c', '/intl/icu/source/common/cstring.c',
'/intl/icu/source/common/cwchar.c', '/intl/icu/source/common/cwchar.c',
'/intl/icu/source/common/dictbe.cpp', '/intl/icu/source/common/dictbe.cpp',
@ -27,6 +28,7 @@ SOURCES += [
'/intl/icu/source/common/locavailable.cpp', '/intl/icu/source/common/locavailable.cpp',
'/intl/icu/source/common/locbased.cpp', '/intl/icu/source/common/locbased.cpp',
'/intl/icu/source/common/locdispnames.cpp', '/intl/icu/source/common/locdispnames.cpp',
'/intl/icu/source/common/locdspnm.cpp',
'/intl/icu/source/common/locid.cpp', '/intl/icu/source/common/locid.cpp',
'/intl/icu/source/common/loclikely.cpp', '/intl/icu/source/common/loclikely.cpp',
'/intl/icu/source/common/locmap.c', '/intl/icu/source/common/locmap.c',
@ -53,6 +55,7 @@ SOURCES += [
'/intl/icu/source/common/rbbitblb.cpp', '/intl/icu/source/common/rbbitblb.cpp',
'/intl/icu/source/common/resbund.cpp', '/intl/icu/source/common/resbund.cpp',
'/intl/icu/source/common/resbund_cnv.cpp', '/intl/icu/source/common/resbund_cnv.cpp',
'/intl/icu/source/common/resource.cpp',
'/intl/icu/source/common/ruleiter.cpp', '/intl/icu/source/common/ruleiter.cpp',
'/intl/icu/source/common/schriter.cpp', '/intl/icu/source/common/schriter.cpp',
'/intl/icu/source/common/serv.cpp', '/intl/icu/source/common/serv.cpp',
@ -63,13 +66,14 @@ SOURCES += [
'/intl/icu/source/common/servrbf.cpp', '/intl/icu/source/common/servrbf.cpp',
'/intl/icu/source/common/servslkf.cpp', '/intl/icu/source/common/servslkf.cpp',
'/intl/icu/source/common/sharedobject.cpp', '/intl/icu/source/common/sharedobject.cpp',
'/intl/icu/source/common/simplepatternformatter.cpp', '/intl/icu/source/common/simpleformatter.cpp',
'/intl/icu/source/common/stringpiece.cpp', '/intl/icu/source/common/stringpiece.cpp',
'/intl/icu/source/common/stringtriebuilder.cpp', '/intl/icu/source/common/stringtriebuilder.cpp',
'/intl/icu/source/common/uarrsort.c', '/intl/icu/source/common/uarrsort.c',
'/intl/icu/source/common/ubidi.c', '/intl/icu/source/common/ubidi.c',
'/intl/icu/source/common/ubidi_props.c', '/intl/icu/source/common/ubidi_props.c',
'/intl/icu/source/common/ubidiln.c', '/intl/icu/source/common/ubidiln.c',
'/intl/icu/source/common/ubiditransform.c',
'/intl/icu/source/common/ubidiwrt.c', '/intl/icu/source/common/ubidiwrt.c',
'/intl/icu/source/common/ubrk.cpp', '/intl/icu/source/common/ubrk.cpp',
'/intl/icu/source/common/ucase.cpp', '/intl/icu/source/common/ucase.cpp',
@ -107,6 +111,7 @@ SOURCES += [
'/intl/icu/source/common/ucnvscsu.c', '/intl/icu/source/common/ucnvscsu.c',
'/intl/icu/source/common/ucnvsel.cpp', '/intl/icu/source/common/ucnvsel.cpp',
'/intl/icu/source/common/ucol_swp.cpp', '/intl/icu/source/common/ucol_swp.cpp',
'/intl/icu/source/common/ucurr.cpp',
'/intl/icu/source/common/udata.cpp', '/intl/icu/source/common/udata.cpp',
'/intl/icu/source/common/udatamem.c', '/intl/icu/source/common/udatamem.c',
'/intl/icu/source/common/udataswp.c', '/intl/icu/source/common/udataswp.c',
@ -145,7 +150,7 @@ SOURCES += [
'/intl/icu/source/common/uprops.cpp', '/intl/icu/source/common/uprops.cpp',
'/intl/icu/source/common/ures_cnv.c', '/intl/icu/source/common/ures_cnv.c',
'/intl/icu/source/common/uresbund.cpp', '/intl/icu/source/common/uresbund.cpp',
'/intl/icu/source/common/uresdata.c', '/intl/icu/source/common/uresdata.cpp',
'/intl/icu/source/common/usc_impl.c', '/intl/icu/source/common/usc_impl.c',
'/intl/icu/source/common/uscript.c', '/intl/icu/source/common/uscript.c',
'/intl/icu/source/common/uscript_props.cpp', '/intl/icu/source/common/uscript_props.cpp',
@ -199,6 +204,7 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/idna.h', '/intl/icu/source/common/unicode/idna.h',
'/intl/icu/source/common/unicode/listformatter.h', '/intl/icu/source/common/unicode/listformatter.h',
'/intl/icu/source/common/unicode/localpointer.h', '/intl/icu/source/common/unicode/localpointer.h',
'/intl/icu/source/common/unicode/locdspnm.h',
'/intl/icu/source/common/unicode/locid.h', '/intl/icu/source/common/unicode/locid.h',
'/intl/icu/source/common/unicode/messagepattern.h', '/intl/icu/source/common/unicode/messagepattern.h',
'/intl/icu/source/common/unicode/normalizer2.h', '/intl/icu/source/common/unicode/normalizer2.h',
@ -212,12 +218,14 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/rep.h', '/intl/icu/source/common/unicode/rep.h',
'/intl/icu/source/common/unicode/resbund.h', '/intl/icu/source/common/unicode/resbund.h',
'/intl/icu/source/common/unicode/schriter.h', '/intl/icu/source/common/unicode/schriter.h',
'/intl/icu/source/common/unicode/simpleformatter.h',
'/intl/icu/source/common/unicode/std_string.h', '/intl/icu/source/common/unicode/std_string.h',
'/intl/icu/source/common/unicode/strenum.h', '/intl/icu/source/common/unicode/strenum.h',
'/intl/icu/source/common/unicode/stringpiece.h', '/intl/icu/source/common/unicode/stringpiece.h',
'/intl/icu/source/common/unicode/stringtriebuilder.h', '/intl/icu/source/common/unicode/stringtriebuilder.h',
'/intl/icu/source/common/unicode/symtable.h', '/intl/icu/source/common/unicode/symtable.h',
'/intl/icu/source/common/unicode/ubidi.h', '/intl/icu/source/common/unicode/ubidi.h',
'/intl/icu/source/common/unicode/ubiditransform.h',
'/intl/icu/source/common/unicode/ubrk.h', '/intl/icu/source/common/unicode/ubrk.h',
'/intl/icu/source/common/unicode/ucasemap.h', '/intl/icu/source/common/unicode/ucasemap.h',
'/intl/icu/source/common/unicode/ucat.h', '/intl/icu/source/common/unicode/ucat.h',
@ -231,10 +239,13 @@ EXPORTS.unicode += [
'/intl/icu/source/common/unicode/ucnv_err.h', '/intl/icu/source/common/unicode/ucnv_err.h',
'/intl/icu/source/common/unicode/ucnvsel.h', '/intl/icu/source/common/unicode/ucnvsel.h',
'/intl/icu/source/common/unicode/uconfig.h', '/intl/icu/source/common/unicode/uconfig.h',
'/intl/icu/source/common/unicode/ucurr.h',
'/intl/icu/source/common/unicode/udata.h', '/intl/icu/source/common/unicode/udata.h',
'/intl/icu/source/common/unicode/udisplaycontext.h',
'/intl/icu/source/common/unicode/uenum.h', '/intl/icu/source/common/unicode/uenum.h',
'/intl/icu/source/common/unicode/uidna.h', '/intl/icu/source/common/unicode/uidna.h',
'/intl/icu/source/common/unicode/uiter.h', '/intl/icu/source/common/unicode/uiter.h',
'/intl/icu/source/common/unicode/uldnames.h',
'/intl/icu/source/common/unicode/ulistformatter.h', '/intl/icu/source/common/unicode/ulistformatter.h',
'/intl/icu/source/common/unicode/uloc.h', '/intl/icu/source/common/unicode/uloc.h',
'/intl/icu/source/common/unicode/umachine.h', '/intl/icu/source/common/unicode/umachine.h',

View File

@ -51,6 +51,7 @@ SOURCES += [
'/intl/icu/source/i18n/currunit.cpp', '/intl/icu/source/i18n/currunit.cpp',
'/intl/icu/source/i18n/dangical.cpp', '/intl/icu/source/i18n/dangical.cpp',
'/intl/icu/source/i18n/datefmt.cpp', '/intl/icu/source/i18n/datefmt.cpp',
'/intl/icu/source/i18n/dayperiodrules.cpp',
'/intl/icu/source/i18n/dcfmtsym.cpp', '/intl/icu/source/i18n/dcfmtsym.cpp',
'/intl/icu/source/i18n/decContext.c', '/intl/icu/source/i18n/decContext.c',
'/intl/icu/source/i18n/decfmtst.cpp', '/intl/icu/source/i18n/decfmtst.cpp',
@ -81,12 +82,10 @@ SOURCES += [
'/intl/icu/source/i18n/gregocal.cpp', '/intl/icu/source/i18n/gregocal.cpp',
'/intl/icu/source/i18n/gregoimp.cpp', '/intl/icu/source/i18n/gregoimp.cpp',
'/intl/icu/source/i18n/hebrwcal.cpp', '/intl/icu/source/i18n/hebrwcal.cpp',
'/intl/icu/source/i18n/identifier_info.cpp',
'/intl/icu/source/i18n/indiancal.cpp', '/intl/icu/source/i18n/indiancal.cpp',
'/intl/icu/source/i18n/inputext.cpp', '/intl/icu/source/i18n/inputext.cpp',
'/intl/icu/source/i18n/islamcal.cpp', '/intl/icu/source/i18n/islamcal.cpp',
'/intl/icu/source/i18n/japancal.cpp', '/intl/icu/source/i18n/japancal.cpp',
'/intl/icu/source/i18n/locdspnm.cpp',
'/intl/icu/source/i18n/measfmt.cpp', '/intl/icu/source/i18n/measfmt.cpp',
'/intl/icu/source/i18n/measunit.cpp', '/intl/icu/source/i18n/measunit.cpp',
'/intl/icu/source/i18n/measure.cpp', '/intl/icu/source/i18n/measure.cpp',
@ -135,6 +134,7 @@ SOURCES += [
'/intl/icu/source/i18n/smpdtfmt.cpp', '/intl/icu/source/i18n/smpdtfmt.cpp',
'/intl/icu/source/i18n/smpdtfst.cpp', '/intl/icu/source/i18n/smpdtfst.cpp',
'/intl/icu/source/i18n/sortkey.cpp', '/intl/icu/source/i18n/sortkey.cpp',
'/intl/icu/source/i18n/standardplural.cpp',
'/intl/icu/source/i18n/strmatch.cpp', '/intl/icu/source/i18n/strmatch.cpp',
'/intl/icu/source/i18n/strrepl.cpp', '/intl/icu/source/i18n/strrepl.cpp',
'/intl/icu/source/i18n/stsearch.cpp', '/intl/icu/source/i18n/stsearch.cpp',
@ -162,7 +162,6 @@ SOURCES += [
'/intl/icu/source/i18n/ucol_sit.cpp', '/intl/icu/source/i18n/ucol_sit.cpp',
'/intl/icu/source/i18n/ucoleitr.cpp', '/intl/icu/source/i18n/ucoleitr.cpp',
'/intl/icu/source/i18n/ucsdet.cpp', '/intl/icu/source/i18n/ucsdet.cpp',
'/intl/icu/source/i18n/ucurr.cpp',
'/intl/icu/source/i18n/udat.cpp', '/intl/icu/source/i18n/udat.cpp',
'/intl/icu/source/i18n/udateintervalformat.cpp', '/intl/icu/source/i18n/udateintervalformat.cpp',
'/intl/icu/source/i18n/udatpg.cpp', '/intl/icu/source/i18n/udatpg.cpp',
@ -183,7 +182,6 @@ SOURCES += [
'/intl/icu/source/i18n/uspoof_build.cpp', '/intl/icu/source/i18n/uspoof_build.cpp',
'/intl/icu/source/i18n/uspoof_conf.cpp', '/intl/icu/source/i18n/uspoof_conf.cpp',
'/intl/icu/source/i18n/uspoof_impl.cpp', '/intl/icu/source/i18n/uspoof_impl.cpp',
'/intl/icu/source/i18n/uspoof_wsconf.cpp',
'/intl/icu/source/i18n/utf16collationiterator.cpp', '/intl/icu/source/i18n/utf16collationiterator.cpp',
'/intl/icu/source/i18n/utf8collationiterator.cpp', '/intl/icu/source/i18n/utf8collationiterator.cpp',
'/intl/icu/source/i18n/utmscale.c', '/intl/icu/source/i18n/utmscale.c',
@ -225,7 +223,6 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/fpositer.h', '/intl/icu/source/i18n/unicode/fpositer.h',
'/intl/icu/source/i18n/unicode/gender.h', '/intl/icu/source/i18n/unicode/gender.h',
'/intl/icu/source/i18n/unicode/gregocal.h', '/intl/icu/source/i18n/unicode/gregocal.h',
'/intl/icu/source/i18n/unicode/locdspnm.h',
'/intl/icu/source/i18n/unicode/measfmt.h', '/intl/icu/source/i18n/unicode/measfmt.h',
'/intl/icu/source/i18n/unicode/measunit.h', '/intl/icu/source/i18n/unicode/measunit.h',
'/intl/icu/source/i18n/unicode/measure.h', '/intl/icu/source/i18n/unicode/measure.h',
@ -260,15 +257,12 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/ucol.h', '/intl/icu/source/i18n/unicode/ucol.h',
'/intl/icu/source/i18n/unicode/ucoleitr.h', '/intl/icu/source/i18n/unicode/ucoleitr.h',
'/intl/icu/source/i18n/unicode/ucsdet.h', '/intl/icu/source/i18n/unicode/ucsdet.h',
'/intl/icu/source/i18n/unicode/ucurr.h',
'/intl/icu/source/i18n/unicode/udat.h', '/intl/icu/source/i18n/unicode/udat.h',
'/intl/icu/source/i18n/unicode/udateintervalformat.h', '/intl/icu/source/i18n/unicode/udateintervalformat.h',
'/intl/icu/source/i18n/unicode/udatpg.h', '/intl/icu/source/i18n/unicode/udatpg.h',
'/intl/icu/source/i18n/unicode/udisplaycontext.h',
'/intl/icu/source/i18n/unicode/ufieldpositer.h', '/intl/icu/source/i18n/unicode/ufieldpositer.h',
'/intl/icu/source/i18n/unicode/uformattable.h', '/intl/icu/source/i18n/unicode/uformattable.h',
'/intl/icu/source/i18n/unicode/ugender.h', '/intl/icu/source/i18n/unicode/ugender.h',
'/intl/icu/source/i18n/unicode/uldnames.h',
'/intl/icu/source/i18n/unicode/ulocdata.h', '/intl/icu/source/i18n/unicode/ulocdata.h',
'/intl/icu/source/i18n/unicode/umsg.h', '/intl/icu/source/i18n/unicode/umsg.h',
'/intl/icu/source/i18n/unicode/unirepl.h', '/intl/icu/source/i18n/unicode/unirepl.h',
@ -277,6 +271,7 @@ EXPORTS.unicode += [
'/intl/icu/source/i18n/unicode/upluralrules.h', '/intl/icu/source/i18n/unicode/upluralrules.h',
'/intl/icu/source/i18n/unicode/uregex.h', '/intl/icu/source/i18n/unicode/uregex.h',
'/intl/icu/source/i18n/unicode/uregion.h', '/intl/icu/source/i18n/unicode/uregion.h',
'/intl/icu/source/i18n/unicode/ureldatefmt.h',
'/intl/icu/source/i18n/unicode/usearch.h', '/intl/icu/source/i18n/unicode/usearch.h',
'/intl/icu/source/i18n/unicode/uspoof.h', '/intl/icu/source/i18n/unicode/uspoof.h',
'/intl/icu/source/i18n/unicode/utmscale.h', '/intl/icu/source/i18n/unicode/utmscale.h',

63
db/sqlite3/src/sqlite3.c Normal file → Executable file
View File

@ -1,6 +1,6 @@
/****************************************************************************** /******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite ** This file is an amalgamation of many separate C source files from SQLite
** version 3.15.0. By combining all the individual C code files into this ** version 3.15.1. By combining all the individual C code files into this
** single large file, the entire code can be compiled as a single translation ** single large file, the entire code can be compiled as a single translation
** unit. This allows many compilers to do optimizations that would not be ** unit. This allows many compilers to do optimizations that would not be
** possible if the files were compiled separately. Performance improvements ** possible if the files were compiled separately. Performance improvements
@ -381,9 +381,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()]. ** [sqlite_version()] and [sqlite_source_id()].
*/ */
#define SQLITE_VERSION "3.15.0" #define SQLITE_VERSION "3.15.1"
#define SQLITE_VERSION_NUMBER 3015000 #define SQLITE_VERSION_NUMBER 3015001
#define SQLITE_SOURCE_ID "2016-10-14 10:20:30 707875582fcba352b4906a595ad89198d84711d8" #define SQLITE_SOURCE_ID "2016-11-04 12:08:49 1136863c76576110e710dd5d69ab6bf347c65e36"
/* /*
** CAPI3REF: Run-Time Library Version Numbers ** CAPI3REF: Run-Time Library Version Numbers
@ -1238,6 +1238,12 @@ struct sqlite3_io_methods {
** on whether or not the file has been renamed, moved, or deleted since it ** on whether or not the file has been renamed, moved, or deleted since it
** was first opened. ** was first opened.
** **
** <li>[[SQLITE_FCNTL_WIN32_GET_HANDLE]]
** The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the
** underlying native file handle associated with a file handle. This file
** control interprets its argument as a pointer to a native file handle and
** writes the resulting value there.
**
** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]] ** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]]
** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This ** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
** opcode causes the xFileControl method to swap the file handle with the one ** opcode causes the xFileControl method to swap the file handle with the one
@ -1288,6 +1294,7 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_RBU 26 #define SQLITE_FCNTL_RBU 26
#define SQLITE_FCNTL_VFS_POINTER 27 #define SQLITE_FCNTL_VFS_POINTER 27
#define SQLITE_FCNTL_JOURNAL_POINTER 28 #define SQLITE_FCNTL_JOURNAL_POINTER 28
#define SQLITE_FCNTL_WIN32_GET_HANDLE 29
/* deprecated names */ /* deprecated names */
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
@ -13088,10 +13095,13 @@ SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager);
SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager); SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager);
SQLITE_PRIVATE int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen); SQLITE_PRIVATE int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen);
SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager); SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager);
SQLITE_PRIVATE int sqlite3PagerUseWal(Pager *pPager);
# ifdef SQLITE_ENABLE_SNAPSHOT # ifdef SQLITE_ENABLE_SNAPSHOT
SQLITE_PRIVATE int sqlite3PagerSnapshotGet(Pager *pPager, sqlite3_snapshot **ppSnapshot); SQLITE_PRIVATE int sqlite3PagerSnapshotGet(Pager *pPager, sqlite3_snapshot **ppSnapshot);
SQLITE_PRIVATE int sqlite3PagerSnapshotOpen(Pager *pPager, sqlite3_snapshot *pSnapshot); SQLITE_PRIVATE int sqlite3PagerSnapshotOpen(Pager *pPager, sqlite3_snapshot *pSnapshot);
# endif # endif
#else
# define sqlite3PagerUseWal(x) 0
#endif #endif
#ifdef SQLITE_ENABLE_ZIPVFS #ifdef SQLITE_ENABLE_ZIPVFS
@ -18107,8 +18117,8 @@ struct PreUpdate {
int iNewReg; /* Register for new.* values */ int iNewReg; /* Register for new.* values */
i64 iKey1; /* First key value passed to hook */ i64 iKey1; /* First key value passed to hook */
i64 iKey2; /* Second key value passed to hook */ i64 iKey2; /* Second key value passed to hook */
int iPKey; /* If not negative index of IPK column */
Mem *aNew; /* Array of new.* values */ Mem *aNew; /* Array of new.* values */
Table *pTab; /* Schema object being upated */
}; };
/* /*
@ -40676,6 +40686,12 @@ static int winFileControl(sqlite3_file *id, int op, void *pArg){
OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h)); OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK; return SQLITE_OK;
} }
case SQLITE_FCNTL_WIN32_GET_HANDLE: {
LPHANDLE phFile = (LPHANDLE)pArg;
*phFile = pFile->h;
OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
#ifdef SQLITE_TEST #ifdef SQLITE_TEST
case SQLITE_FCNTL_WIN32_SET_HANDLE: { case SQLITE_FCNTL_WIN32_SET_HANDLE: {
LPHANDLE phFile = (LPHANDLE)pArg; LPHANDLE phFile = (LPHANDLE)pArg;
@ -47166,9 +47182,10 @@ static const unsigned char aJournalMagic[] = {
** rollback journal. Otherwise false. ** rollback journal. Otherwise false.
*/ */
#ifndef SQLITE_OMIT_WAL #ifndef SQLITE_OMIT_WAL
static int pagerUseWal(Pager *pPager){ SQLITE_PRIVATE int sqlite3PagerUseWal(Pager *pPager){
return (pPager->pWal!=0); return (pPager->pWal!=0);
} }
# define pagerUseWal(x) sqlite3PagerUseWal(x)
#else #else
# define pagerUseWal(x) 0 # define pagerUseWal(x) 0
# define pagerRollbackWal(x) 0 # define pagerRollbackWal(x) 0
@ -62827,7 +62844,7 @@ static int accessPayload(
&& (bEnd || a==ovflSize) /* (6) */ && (bEnd || a==ovflSize) /* (6) */
&& pBt->inTransaction==TRANS_READ /* (4) */ && pBt->inTransaction==TRANS_READ /* (4) */
&& (fd = sqlite3PagerFile(pBt->pPager))->pMethods /* (3) */ && (fd = sqlite3PagerFile(pBt->pPager))->pMethods /* (3) */
&& pBt->pPage1->aData[19]==0x01 /* (5) */ && 0==sqlite3PagerUseWal(pBt->pPager) /* (5) */
&& &pBuf[-4]>=pBufStart /* (7) */ && &pBuf[-4]>=pBufStart /* (7) */
){ ){
u8 aSave[4]; u8 aSave[4];
@ -75078,7 +75095,7 @@ SQLITE_PRIVATE void sqlite3VdbePreUpdateHook(
preupdate.keyinfo.aSortOrder = (u8*)&fakeSortOrder; preupdate.keyinfo.aSortOrder = (u8*)&fakeSortOrder;
preupdate.iKey1 = iKey1; preupdate.iKey1 = iKey1;
preupdate.iKey2 = iKey2; preupdate.iKey2 = iKey2;
preupdate.iPKey = pTab->iPKey; preupdate.pTab = pTab;
db->pPreUpdate = &preupdate; db->pPreUpdate = &preupdate;
db->xPreUpdateCallback(db->pPreUpdateArg, db, op, zDb, zTbl, iKey1, iKey2); db->xPreUpdateCallback(db->pPreUpdateArg, db, op, zDb, zTbl, iKey1, iKey2);
@ -76810,9 +76827,14 @@ SQLITE_API int sqlite3_preupdate_old(sqlite3 *db, int iIdx, sqlite3_value **ppVa
if( iIdx>=p->pUnpacked->nField ){ if( iIdx>=p->pUnpacked->nField ){
*ppValue = (sqlite3_value *)columnNullValue(); *ppValue = (sqlite3_value *)columnNullValue();
}else{ }else{
Mem *pMem = *ppValue = &p->pUnpacked->aMem[iIdx];
*ppValue = &p->pUnpacked->aMem[iIdx]; *ppValue = &p->pUnpacked->aMem[iIdx];
if( iIdx==p->iPKey ){ if( iIdx==p->pTab->iPKey ){
sqlite3VdbeMemSetInt64(*ppValue, p->iKey1); sqlite3VdbeMemSetInt64(pMem, p->iKey1);
}else if( p->pTab->aCol[iIdx].affinity==SQLITE_AFF_REAL ){
if( pMem->flags & MEM_Int ){
sqlite3VdbeMemRealify(pMem);
}
} }
} }
@ -76889,7 +76911,7 @@ SQLITE_API int sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppVa
pMem = (sqlite3_value *)columnNullValue(); pMem = (sqlite3_value *)columnNullValue();
}else{ }else{
pMem = &pUnpack->aMem[iIdx]; pMem = &pUnpack->aMem[iIdx];
if( iIdx==p->iPKey ){ if( iIdx==p->pTab->iPKey ){
sqlite3VdbeMemSetInt64(pMem, p->iKey2); sqlite3VdbeMemSetInt64(pMem, p->iKey2);
} }
} }
@ -76910,7 +76932,7 @@ SQLITE_API int sqlite3_preupdate_new(sqlite3 *db, int iIdx, sqlite3_value **ppVa
assert( iIdx>=0 && iIdx<p->pCsr->nField ); assert( iIdx>=0 && iIdx<p->pCsr->nField );
pMem = &p->aNew[iIdx]; pMem = &p->aNew[iIdx];
if( pMem->flags==0 ){ if( pMem->flags==0 ){
if( iIdx==p->iPKey ){ if( iIdx==p->pTab->iPKey ){
sqlite3VdbeMemSetInt64(pMem, p->iKey2); sqlite3VdbeMemSetInt64(pMem, p->iKey2);
}else{ }else{
rc = sqlite3VdbeMemCopy(pMem, &p->v->aMem[p->iNewReg+1+iIdx]); rc = sqlite3VdbeMemCopy(pMem, &p->v->aMem[p->iNewReg+1+iIdx]);
@ -122356,7 +122378,7 @@ SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db, int iDb){
sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size); sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);
sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0)); sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0));
sqlite3BtreeSetPagerFlags(pTemp, PAGER_SYNCHRONOUS_OFF); sqlite3BtreeSetPagerFlags(pTemp, PAGER_SYNCHRONOUS_OFF|PAGER_CACHESPILL);
/* Begin a transaction and take an exclusive lock on the main database /* Begin a transaction and take an exclusive lock on the main database
** file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, ** file. This is done before the sqlite3BtreeGetPageSize(pMain) call below,
@ -127539,6 +127561,7 @@ static void exprAnalyze(
Expr *pRight = sqlite3ExprForVectorField(pParse, pExpr->pRight, i); Expr *pRight = sqlite3ExprForVectorField(pParse, pExpr->pRight, i);
pNew = sqlite3PExpr(pParse, pExpr->op, pLeft, pRight, 0); pNew = sqlite3PExpr(pParse, pExpr->op, pLeft, pRight, 0);
transferJoinMarkings(pNew, pExpr);
idxNew = whereClauseInsert(pWC, pNew, TERM_DYNAMIC); idxNew = whereClauseInsert(pWC, pNew, TERM_DYNAMIC);
exprAnalyze(pSrc, pWC, idxNew); exprAnalyze(pSrc, pWC, idxNew);
} }
@ -132642,13 +132665,15 @@ SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){
} }
#endif #endif
if( pLevel->iLeftJoin ){ if( pLevel->iLeftJoin ){
int ws = pLoop->wsFlags;
addr = sqlite3VdbeAddOp1(v, OP_IfPos, pLevel->iLeftJoin); VdbeCoverage(v); addr = sqlite3VdbeAddOp1(v, OP_IfPos, pLevel->iLeftJoin); VdbeCoverage(v);
assert( (pLoop->wsFlags & WHERE_IDX_ONLY)==0 assert( (ws & WHERE_IDX_ONLY)==0 || (ws & WHERE_INDEXED)!=0 );
|| (pLoop->wsFlags & WHERE_INDEXED)!=0 ); if( (ws & WHERE_IDX_ONLY)==0 ){
if( (pLoop->wsFlags & WHERE_IDX_ONLY)==0 ){
sqlite3VdbeAddOp1(v, OP_NullRow, pTabList->a[i].iCursor); sqlite3VdbeAddOp1(v, OP_NullRow, pTabList->a[i].iCursor);
} }
if( pLoop->wsFlags & WHERE_INDEXED ){ if( (ws & WHERE_INDEXED)
|| ((ws & WHERE_MULTI_OR) && pLevel->u.pCovidx)
){
sqlite3VdbeAddOp1(v, OP_NullRow, pLevel->iIdxCur); sqlite3VdbeAddOp1(v, OP_NullRow, pLevel->iIdxCur);
} }
if( pLevel->op==OP_Return ){ if( pLevel->op==OP_Return ){
@ -165209,7 +165234,7 @@ static void icuRegexpFunc(sqlite3_context *p, int nArg, sqlite3_value **apArg){
** of upper() or lower(). ** of upper() or lower().
** **
** lower('I', 'en_us') -> 'i' ** lower('I', 'en_us') -> 'i'
** lower('I', 'tr_tr') -> 'ı' (small dotless i) ** lower('I', 'tr_tr') -> '\u131' (small dotless i)
** **
** http://www.icu-project.org/userguide/posix.html#case_mappings ** http://www.icu-project.org/userguide/posix.html#case_mappings
*/ */
@ -195598,7 +195623,7 @@ static void fts5SourceIdFunc(
){ ){
assert( nArg==0 ); assert( nArg==0 );
UNUSED_PARAM2(nArg, apUnused); UNUSED_PARAM2(nArg, apUnused);
sqlite3_result_text(pCtx, "fts5: 2016-10-14 10:20:30 707875582fcba352b4906a595ad89198d84711d8", -1, SQLITE_TRANSIENT); sqlite3_result_text(pCtx, "fts5: 2016-11-04 12:08:49 1136863c76576110e710dd5d69ab6bf347c65e36", -1, SQLITE_TRANSIENT);
} }
static int fts5Init(sqlite3 *db){ static int fts5Init(sqlite3 *db){

13
db/sqlite3/src/sqlite3.h Normal file → Executable file
View File

@ -121,9 +121,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()]. ** [sqlite_version()] and [sqlite_source_id()].
*/ */
#define SQLITE_VERSION "3.15.0" #define SQLITE_VERSION "3.15.1"
#define SQLITE_VERSION_NUMBER 3015000 #define SQLITE_VERSION_NUMBER 3015001
#define SQLITE_SOURCE_ID "2016-10-14 10:20:30 707875582fcba352b4906a595ad89198d84711d8" #define SQLITE_SOURCE_ID "2016-11-04 12:08:49 1136863c76576110e710dd5d69ab6bf347c65e36"
/* /*
** CAPI3REF: Run-Time Library Version Numbers ** CAPI3REF: Run-Time Library Version Numbers
@ -978,6 +978,12 @@ struct sqlite3_io_methods {
** on whether or not the file has been renamed, moved, or deleted since it ** on whether or not the file has been renamed, moved, or deleted since it
** was first opened. ** was first opened.
** **
** <li>[[SQLITE_FCNTL_WIN32_GET_HANDLE]]
** The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the
** underlying native file handle associated with a file handle. This file
** control interprets its argument as a pointer to a native file handle and
** writes the resulting value there.
**
** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]] ** <li>[[SQLITE_FCNTL_WIN32_SET_HANDLE]]
** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This ** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
** opcode causes the xFileControl method to swap the file handle with the one ** opcode causes the xFileControl method to swap the file handle with the one
@ -1028,6 +1034,7 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_RBU 26 #define SQLITE_FCNTL_RBU 26
#define SQLITE_FCNTL_VFS_POINTER 27 #define SQLITE_FCNTL_VFS_POINTER 27
#define SQLITE_FCNTL_JOURNAL_POINTER 28 #define SQLITE_FCNTL_JOURNAL_POINTER 28
#define SQLITE_FCNTL_WIN32_GET_HANDLE 29
/* deprecated names */ /* deprecated names */
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE

View File

@ -0,0 +1,14 @@
"react-virtualized" uses UMD style loading to work in many different environments.
It assumes that "react", "react-addons-shallow-compare", and "react-dom" are all included
separately via require statements. The paths to our installations are different.
If upgrading:
- Define the correct paths for React, etc and replace the require statements for the
module.exports case with the correct paths.
- Replace any references to React.addons.shallowCompare with the webpack module id.
- To support use in XUL documents, replace calls to createElement with
createElementNS("http://www.w3.org/1999/xhtml", but make sure that you aren't replacing
any calls to React.createElement.
- Also required for XUL, replace document.head and document.body with
document.firstElementChild

View File

@ -7,6 +7,7 @@ modules = []
modules += [ modules += [
'immutable.js', 'immutable.js',
'jsol.js', 'jsol.js',
'react-addons-shallow-compare.js',
] ]
# react-dev is used if either debug mode is enabled, # react-dev is used if either debug mode is enabled,
@ -18,6 +19,7 @@ modules += [
'react-dom.js', 'react-dom.js',
'react-proxy.js', 'react-proxy.js',
'react-redux.js', 'react-redux.js',
'react-virtualized.js',
'react.js', 'react.js',
'redux.js', 'redux.js',
'reselect.js', 'reselect.js',

View File

@ -0,0 +1,9 @@
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
module.exports = require("devtools/client/shared/vendor/react").addons.shallowCompare;

File diff suppressed because it is too large Load Diff

View File

@ -1514,7 +1514,7 @@ exports.CSS_PROPERTIES = {
"flex-start", "flex-start",
"inherit", "inherit",
"initial", "initial",
"last-baseline", "last baseline",
"left", "left",
"normal", "normal",
"right", "right",
@ -1540,7 +1540,7 @@ exports.CSS_PROPERTIES = {
"flex-start", "flex-start",
"inherit", "inherit",
"initial", "initial",
"last-baseline", "last baseline",
"left", "left",
"normal", "normal",
"right", "right",
@ -1566,7 +1566,7 @@ exports.CSS_PROPERTIES = {
"flex-start", "flex-start",
"inherit", "inherit",
"initial", "initial",
"last-baseline", "last baseline",
"left", "left",
"normal", "normal",
"right", "right",
@ -2192,7 +2192,7 @@ exports.CSS_PROPERTIES = {
"flex-start", "flex-start",
"inherit", "inherit",
"initial", "initial",
"last-baseline", "last baseline",
"left", "left",
"normal", "normal",
"right", "right",
@ -2730,7 +2730,7 @@ exports.CSS_PROPERTIES = {
"flex-start", "flex-start",
"inherit", "inherit",
"initial", "initial",
"last-baseline", "last baseline",
"left", "left",
"normal", "normal",
"right", "right",
@ -2756,7 +2756,7 @@ exports.CSS_PROPERTIES = {
"flex-start", "flex-start",
"inherit", "inherit",
"initial", "initial",
"last-baseline", "last baseline",
"left", "left",
"normal", "normal",
"right", "right",
@ -2782,7 +2782,7 @@ exports.CSS_PROPERTIES = {
"flex-start", "flex-start",
"inherit", "inherit",
"initial", "initial",
"last-baseline", "last baseline",
"left", "left",
"normal", "normal",
"right", "right",
@ -3306,7 +3306,7 @@ exports.CSS_PROPERTIES = {
"keep-all", "keep-all",
"large", "large",
"larger", "larger",
"last-baseline", "last baseline",
"left", "left",
"lighten", "lighten",
"linear", "linear",
@ -6712,7 +6712,7 @@ exports.CSS_PROPERTIES = {
"flex-start", "flex-start",
"inherit", "inherit",
"initial", "initial",
"last-baseline", "last baseline",
"left", "left",
"normal", "normal",
"right", "right",
@ -6739,7 +6739,7 @@ exports.CSS_PROPERTIES = {
"flex-start", "flex-start",
"inherit", "inherit",
"initial", "initial",
"last-baseline", "last baseline",
"left", "left",
"normal", "normal",
"right", "right",
@ -6765,7 +6765,7 @@ exports.CSS_PROPERTIES = {
"flex-start", "flex-start",
"inherit", "inherit",
"initial", "initial",
"last-baseline", "last baseline",
"left", "left",
"normal", "normal",
"right", "right",

View File

@ -1073,9 +1073,6 @@ Scanner.prototype = {
this.ScanString(aToken); this.ScanString(aToken);
if (aToken.mType == eCSSToken_Bad_String) { if (aToken.mType == eCSSToken_Bad_String) {
aToken.mType = eCSSToken_Bad_URL; aToken.mType = eCSSToken_Bad_URL;
// Flag us as having been a Bad_String.
aToken.mInteger2 = 1;
this.ConsumeBadURLRemnants(aToken);
return; return;
} }
} else { } else {
@ -1096,42 +1093,7 @@ Scanner.prototype = {
} }
} else { } else {
aToken.mType = eCSSToken_Bad_URL; aToken.mType = eCSSToken_Bad_URL;
if (aToken.mSymbol != 0) {
// Flag us as having been a String, not a Bad_String.
aToken.mInteger2 = 0;
} }
this.ConsumeBadURLRemnants(aToken);
}
},
ConsumeBadURLRemnants: function (aToken) {
aToken.mInteger = aToken.mIdent.length;
let ch = this.Peek();
do {
if (ch < 0) {
this.AddEOFCharacters(eEOFCharacters_CloseParen);
break;
}
if (ch == REVERSE_SOLIDUS && this.GatherEscape(aToken.mIdent, false)) {
// Nothing else needs to be done here for the moment; we've consumed the
// backslash and following escape.
} else {
// We always want to consume this character.
if (IsVertSpace(ch)) {
this.AdvanceLine();
} else {
this.Advance();
}
if (ch == 0) {
aToken.mIdent.push(UCS2_REPLACEMENT_CHAR);
} else {
aToken.mIdent.push(ch);
}
}
ch = this.Peek();
} while (ch != RIGHT_PARENTHESIS);
}, },
/** /**

View File

@ -128,9 +128,8 @@ var LEX_TESTS = [
["url:http://example.com"]], ["url:http://example.com"]],
// In CSS Level 3, this is an ordinary URL, not a BAD_URL. // In CSS Level 3, this is an ordinary URL, not a BAD_URL.
["url(http://example.com", ["url:http://example.com"]], ["url(http://example.com", ["url:http://example.com"]],
// We end up losing the whitespace before the '@' because it's skipped by the // See bug 1153981 to understand why this gets a SYMBOL token.
// lexer before we discover we have a BAD_URL token. ["url(http://example.com @", ["bad_url:http://example.com", "symbol:@"]],
["url(http://example.com @", ["bad_url:http://example.com@"]],
["quo\\ting", ["ident:quoting"]], ["quo\\ting", ["ident:quoting"]],
["'bad string\n", ["bad_string:bad string", "whitespace"]], ["'bad string\n", ["bad_string:bad string", "whitespace"]],
["~=", ["includes"]], ["~=", ["includes"]],

View File

@ -9330,9 +9330,9 @@ nsDocument::MaybePreconnect(nsIURI* aOrigURI, mozilla::CORSMode aCORSMode)
} }
if (aCORSMode == CORS_ANONYMOUS) { if (aCORSMode == CORS_ANONYMOUS) {
speculator->SpeculativeAnonymousConnect(uri, nullptr); speculator->SpeculativeAnonymousConnect2(uri, NodePrincipal(), nullptr);
} else { } else {
speculator->SpeculativeConnect(uri, nullptr); speculator->SpeculativeConnect2(uri, NodePrincipal(), nullptr);
} }
} }
@ -12258,6 +12258,24 @@ nsIDocument::HasScriptsBlockedBySandbox()
return mSandboxFlags & SANDBOXED_SCRIPTS; return mSandboxFlags & SANDBOXED_SCRIPTS;
} }
bool
nsIDocument::InlineScriptAllowedByCSP()
{
nsCOMPtr<nsIContentSecurityPolicy> csp;
nsresult rv = NodePrincipal()->GetCsp(getter_AddRefs(csp));
NS_ENSURE_SUCCESS(rv, true);
bool allowsInlineScript = true;
if (csp) {
nsresult rv = csp->GetAllowsInline(nsIContentPolicy::TYPE_SCRIPT,
EmptyString(), // aNonce
EmptyString(), // FIXME get script sample (bug 1314567)
0, // aLineNumber
&allowsInlineScript);
NS_ENSURE_SUCCESS(rv, true);
}
return allowsInlineScript;
}
static bool static bool
MightBeAboutOrChromeScheme(nsIURI* aURI) MightBeAboutOrChromeScheme(nsIURI* aURI)
{ {

View File

@ -2840,6 +2840,8 @@ public:
bool HasScriptsBlockedBySandbox(); bool HasScriptsBlockedBySandbox();
bool InlineScriptAllowedByCSP();
void ReportHasScrollLinkedEffect(); void ReportHasScrollLinkedEffect();
bool HasScrollLinkedEffect() const bool HasScrollLinkedEffect() const
{ {

View File

@ -4087,6 +4087,26 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
} }
} }
// Stop the event if the related target's first non-native ancestor is the
// same as the original target's first non-native ancestor (we are moving
// inside of the same element).
if (mType == NS_FORM_INPUT_TIME && !IsExperimentalMobileType(mType) &&
(aVisitor.mEvent->mMessage == eFocus ||
aVisitor.mEvent->mMessage == eFocusIn ||
aVisitor.mEvent->mMessage == eFocusOut ||
aVisitor.mEvent->mMessage == eBlur)) {
nsCOMPtr<nsIContent> originalTarget =
do_QueryInterface(aVisitor.mEvent->AsFocusEvent()->mRelatedTarget);
nsCOMPtr<nsIContent> relatedTarget =
do_QueryInterface(aVisitor.mEvent->AsFocusEvent()->mRelatedTarget);
if (originalTarget && relatedTarget &&
originalTarget->FindFirstNonChromeOnlyAccessContent() ==
relatedTarget->FindFirstNonChromeOnlyAccessContent()) {
aVisitor.mCanHandle = false;
}
}
return rv; return rv;
} }

View File

@ -290,13 +290,6 @@ ImageDocument::OnPageShow(bool aPersisted,
MediaDocument::OnPageShow(aPersisted, aDispatchStartTarget); MediaDocument::OnPageShow(aPersisted, aDispatchStartTarget);
} }
NS_IMETHODIMP
ImageDocument::GetImageResizingEnabled(bool* aImageResizingEnabled)
{
*aImageResizingEnabled = ImageResizingEnabled();
return NS_OK;
}
NS_IMETHODIMP NS_IMETHODIMP
ImageDocument::GetImageIsOverflowing(bool* aImageIsOverflowing) ImageDocument::GetImageIsOverflowing(bool* aImageIsOverflowing)
{ {

View File

@ -56,10 +56,6 @@ public:
virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
override; override;
bool ImageResizingEnabled() const
{
return true;
}
bool ImageIsOverflowing() const bool ImageIsOverflowing() const
{ {
return mImageIsOverflowingHorizontally || mImageIsOverflowingVertically; return mImageIsOverflowingHorizontally || mImageIsOverflowingVertically;

View File

@ -14,9 +14,6 @@ interface imgIRequest;
[scriptable, uuid(87c27f98-37dc-4b64-a8cd-92003624bcee)] [scriptable, uuid(87c27f98-37dc-4b64-a8cd-92003624bcee)]
interface nsIImageDocument : nsISupports { interface nsIImageDocument : nsISupports {
/* Whether the pref for image resizing has been set. */
readonly attribute boolean imageResizingEnabled;
/* Whether the image is overflowing visible area. */ /* Whether the image is overflowing visible area. */
readonly attribute boolean imageIsOverflowing; readonly attribute boolean imageIsOverflowing;

View File

@ -61,6 +61,8 @@ skip-if = os == "android"
[test_input_textarea_set_value_no_scroll.html] [test_input_textarea_set_value_no_scroll.html]
[test_input_time_key_events.html] [test_input_time_key_events.html]
skip-if = os == "android" skip-if = os == "android"
[test_input_time_focus_blur_events.html]
skip-if = os == "android"
[test_input_types_pref.html] [test_input_types_pref.html]
[test_input_typing_sanitization.html] [test_input_typing_sanitization.html]
[test_input_untrusted_key_events.html] [test_input_untrusted_key_events.html]

View File

@ -0,0 +1,82 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1301306
-->
<head>
<title>Test for Bug 1301306</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1301306">Mozilla Bug 722599</a>
<p id="display"></p>
<div id="content">
<input type="time" id="input_time" onfocus="++focusEvent" onblur="++blurEvent"
onfocusin="++focusInEvent" onfocusout="++focusOutEvent">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
/**
* Test for Bug 1301306.
* This test checks that when moving inside the time input element, e.g. jumping
* through the inner text boxes, does not fire extra focus/blur events.
**/
var focusEvent = 0;
var focusInEvent = 0;
var focusOutEvent = 0;
var blurEvent = 0;
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(function() {
test();
SimpleTest.finish();
});
function test() {
var time = document.getElementById("input_time");
time.focus();
is(focusEvent, 1, "time input element should have dispatched focus event.");
is(focusInEvent, 1, "time input element should have dispatched focusin event.");
is(focusOutEvent, 0, "time input element should not have dispatched focusout event.");
is(blurEvent, 0, "time input element should not have dispatched blur event.");
// Move around inside the input element's input box.
synthesizeKey("VK_TAB", {});
is(focusEvent, 1, "time input element should not have dispatched focus event.");
is(focusInEvent, 1, "time input element should have dispatched focusin event.");
is(focusOutEvent, 0, "time input element should not have dispatched focusout event.");
is(blurEvent, 0, "time input element should not have dispatched blur event.");
synthesizeKey("VK_RIGHT", {});
is(focusEvent, 1, "time input element should not have dispatched focus event.");
is(focusInEvent, 1, "time input element should have dispatched focusin event.");
is(focusOutEvent, 0, "time input element should not have dispatched focusout event.");
is(blurEvent, 0, "time input element should not have dispatched blur event.");
synthesizeKey("VK_LEFT", {});
is(focusEvent, 1, "time input element should not have dispatched focus event.");
is(focusInEvent, 1, "time input element should have dispatched focusin event.");
is(focusOutEvent, 0, "time input element should not have dispatched focusout event.");
is(blurEvent, 0, "time input element should not have dispatched blur event.");
synthesizeKey("VK_RIGHT", {});
is(focusEvent, 1, "time input element should not have dispatched focus event.");
is(focusInEvent, 1, "time input element should have dispatched focusin event.");
is(focusOutEvent, 0, "time input element should not have dispatched focusout event.");
is(blurEvent, 0, "time input element should not have dispatched blur event.");
time.blur();
is(focusEvent, 1, "time input element should not have dispatched focus event.");
is(focusInEvent, 1, "time input element should have dispatched focusin event.");
is(focusOutEvent, 1, "time input element should not have dispatched focusout event.");
is(blurEvent, 1, "time input element should have dispatched blur event.");
}
</script>
</pre>
</body>
</html>

View File

@ -7915,16 +7915,18 @@ class RenameObjectStoreOp final
{ {
friend class VersionChangeTransaction; friend class VersionChangeTransaction;
const RefPtr<FullObjectStoreMetadata> mMetadata; const int64_t mId;
const nsString mNewName;
private: private:
// Only created by VersionChangeTransaction. // Only created by VersionChangeTransaction.
RenameObjectStoreOp(VersionChangeTransaction* aTransaction, RenameObjectStoreOp(VersionChangeTransaction* aTransaction,
FullObjectStoreMetadata* const aMetadata) FullObjectStoreMetadata* const aMetadata)
: VersionChangeTransactionOp(aTransaction) : VersionChangeTransactionOp(aTransaction)
, mMetadata(aMetadata) , mId(aMetadata->mCommonMetadata.id())
, mNewName(aMetadata->mCommonMetadata.name())
{ {
MOZ_ASSERT(aMetadata->mCommonMetadata.id()); MOZ_ASSERT(mId);
} }
~RenameObjectStoreOp() ~RenameObjectStoreOp()
@ -8109,8 +8111,9 @@ class RenameIndexOp final
{ {
friend class VersionChangeTransaction; friend class VersionChangeTransaction;
const RefPtr<FullIndexMetadata> mMetadata;
const int64_t mObjectStoreId; const int64_t mObjectStoreId;
const int64_t mIndexId;
const nsString mNewName;
private: private:
// Only created by VersionChangeTransaction. // Only created by VersionChangeTransaction.
@ -8118,10 +8121,11 @@ private:
FullIndexMetadata* const aMetadata, FullIndexMetadata* const aMetadata,
int64_t aObjectStoreId) int64_t aObjectStoreId)
: VersionChangeTransactionOp(aTransaction) : VersionChangeTransactionOp(aTransaction)
, mMetadata(aMetadata)
, mObjectStoreId(aObjectStoreId) , mObjectStoreId(aObjectStoreId)
, mIndexId(aMetadata->mCommonMetadata.id())
, mNewName(aMetadata->mCommonMetadata.name())
{ {
MOZ_ASSERT(aMetadata->mCommonMetadata.id()); MOZ_ASSERT(mIndexId);
} }
~RenameIndexOp() ~RenameIndexOp()
@ -24396,12 +24400,10 @@ RenameObjectStoreOp::DoDatabaseWork(DatabaseConnection* aConnection)
&stmt)); &stmt));
MOZ_ALWAYS_SUCCEEDS( MOZ_ALWAYS_SUCCEEDS(
stmt->BindStringByName(NS_LITERAL_CSTRING("name"), stmt->BindStringByName(NS_LITERAL_CSTRING("name"), mNewName));
mMetadata->mCommonMetadata.name()));
MOZ_ALWAYS_SUCCEEDS( MOZ_ALWAYS_SUCCEEDS(
stmt->BindInt64ByName(NS_LITERAL_CSTRING("id"), stmt->BindInt64ByName(NS_LITERAL_CSTRING("id"), mId));
mMetadata->mCommonMetadata.id()));
bool hasResult; bool hasResult;
MOZ_ALWAYS_SUCCEEDS(stmt->ExecuteStep(&hasResult)); MOZ_ALWAYS_SUCCEEDS(stmt->ExecuteStep(&hasResult));
@ -24425,15 +24427,13 @@ RenameObjectStoreOp::DoDatabaseWork(DatabaseConnection* aConnection)
return rv; return rv;
} }
rv = stmt->BindStringByName(NS_LITERAL_CSTRING("name"), rv = stmt->BindStringByName(NS_LITERAL_CSTRING("name"), mNewName);
mMetadata->mCommonMetadata.name());
if (NS_WARN_IF(NS_FAILED(rv))) { if (NS_WARN_IF(NS_FAILED(rv))) {
return rv; return rv;
} }
rv = stmt->BindInt64ByName(NS_LITERAL_CSTRING("id"), rv = stmt->BindInt64ByName(NS_LITERAL_CSTRING("id"), mId);
mMetadata->mCommonMetadata.id());
if (NS_WARN_IF(NS_FAILED(rv))) { if (NS_WARN_IF(NS_FAILED(rv))) {
return rv; return rv;
@ -25506,12 +25506,10 @@ RenameIndexOp::DoDatabaseWork(DatabaseConnection* aConnection)
mObjectStoreId)); mObjectStoreId));
MOZ_ALWAYS_SUCCEEDS( MOZ_ALWAYS_SUCCEEDS(
stmt->BindStringByName(NS_LITERAL_CSTRING("name"), stmt->BindStringByName(NS_LITERAL_CSTRING("name"), mNewName));
mMetadata->mCommonMetadata.name()));
MOZ_ALWAYS_SUCCEEDS( MOZ_ALWAYS_SUCCEEDS(
stmt->BindInt64ByName(NS_LITERAL_CSTRING("id"), stmt->BindInt64ByName(NS_LITERAL_CSTRING("id"), mIndexId));
mMetadata->mCommonMetadata.id()));
bool hasResult; bool hasResult;
MOZ_ALWAYS_SUCCEEDS(stmt->ExecuteStep(&hasResult)); MOZ_ALWAYS_SUCCEEDS(stmt->ExecuteStep(&hasResult));
@ -25537,15 +25535,13 @@ RenameIndexOp::DoDatabaseWork(DatabaseConnection* aConnection)
return rv; return rv;
} }
rv = stmt->BindStringByName(NS_LITERAL_CSTRING("name"), rv = stmt->BindStringByName(NS_LITERAL_CSTRING("name"), mNewName);
mMetadata->mCommonMetadata.name());
if (NS_WARN_IF(NS_FAILED(rv))) { if (NS_WARN_IF(NS_FAILED(rv))) {
return rv; return rv;
} }
rv = stmt->BindInt64ByName(NS_LITERAL_CSTRING("id"), rv = stmt->BindInt64ByName(NS_LITERAL_CSTRING("id"), mIndexId);
mMetadata->mCommonMetadata.id());
if (NS_WARN_IF(NS_FAILED(rv))) { if (NS_WARN_IF(NS_FAILED(rv))) {
return rv; return rv;

View File

@ -2731,6 +2731,17 @@ PluginModuleParent::NPP_NewInternal(NPMIMEType pluginType, NPP instance,
values.AppendElement(opaqueAttributeValue); values.AppendElement(opaqueAttributeValue);
} }
} }
// Update the flashvar bgcolor if it's not set, fixes a rendering problem with
// async plugin painting and transparent flash.
if (supportsAsyncRender) {
NS_NAMED_LITERAL_CSTRING(bgcolorAttributeName, "bgcolor");
NS_NAMED_LITERAL_CSTRING(bgcolorAttributeDefault, "#FFFFFF");
if (!names.Contains(bgcolorAttributeName)) {
names.AppendElement(bgcolorAttributeName);
values.AppendElement(bgcolorAttributeDefault);
}
}
#endif #endif
} }

View File

@ -0,0 +1,13 @@
<!DOCTYPE HTML>
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<html>
<head>
<meta charset="utf-8">
<title>marquee inline script tests for Bug 1312272</title>
</head>
<body>
<marquee id="m" onstart="parent.postMessage('csp-violation-marquee-onstart', '*')">bug 1312272</marquee>
<script src="file_bug1312272.js"></script>
</body>
</html>

View File

@ -0,0 +1 @@
Content-Security-Policy: default-src *; script-src * 'unsafe-eval'

View File

@ -0,0 +1,8 @@
var m = document.getElementById("m");
m.addEventListener("click", function() {
// this will trigger after onstart, obviously.
parent.postMessage('finish', '*');
});
console.log("finish-handler setup");
m.click();
console.log("clicked");

View File

@ -79,6 +79,9 @@ support-files =
file_bug909029_none.html^headers^ file_bug909029_none.html^headers^
file_bug1229639.html file_bug1229639.html
file_bug1229639.html^headers^ file_bug1229639.html^headers^
file_bug1312272.html
file_bug1312272.js
file_bug1312272.html^headers^
file_policyuri_regression_from_multipolicy.html file_policyuri_regression_from_multipolicy.html
file_policyuri_regression_from_multipolicy.html^headers^ file_policyuri_regression_from_multipolicy.html^headers^
file_policyuri_regression_from_multipolicy_policy file_policyuri_regression_from_multipolicy_policy
@ -268,3 +271,4 @@ tags = mcb
[test_sendbeacon.html] [test_sendbeacon.html]
[test_upgrade_insecure_docwrite_iframe.html] [test_upgrade_insecure_docwrite_iframe.html]
[test_bug1242019.html] [test_bug1242019.html]
[test_bug1312272.html]

View File

@ -0,0 +1,32 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Test for bug 1312272</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<iframe id="cspframe" style="width:100%"></iframe>
<script type="text/javascript">
SimpleTest.waitForExplicitFinish();
function handler(evt) {
console.log(evt);
if (evt.data === "finish") {
ok(true, 'Other events continue to work fine.')
SimpleTest.finish();
//removeEventListener('message', handler);
} else {
ok(false, "Should not get any other message")
}
}
var cspframe = document.getElementById("cspframe");
cspframe.src = "file_bug1312272.html";
addEventListener("message", handler);
console.log("assignign frame");
</script>
</body>
</html>

View File

@ -36,10 +36,8 @@ enum CSSTokenType {
"bad_string", "bad_string",
// A URL. |text| holds the URL. // A URL. |text| holds the URL.
"url", "url",
// A "bad URL". This is a URL that either contains a bad_string or contains // A "bad URL". This is a URL that is unterminated at EOF. |text|
// garbage after the string or unquoted URL test. |text| holds the URL and // holds the URL.
// potentially whatever garbage came after it, up to but not including the
// following ')'.
"bad_url", "bad_url",
// A "symbol" is any one-character symbol. This corresponds to the // A "symbol" is any one-character symbol. This corresponds to the
// DELIM token in the CSS specification. // DELIM token in the CSS specification.

View File

@ -436,9 +436,11 @@ partial interface Document {
}; };
// Extension to give chrome and XBL JS the ability to determine whether // Extension to give chrome and XBL JS the ability to determine whether
// the document is sandboxed without permission to run scripts. // the document is sandboxed without permission to run scripts
// and whether inline scripts are blocked by the document's CSP.
partial interface Document { partial interface Document {
[Func="IsChromeOrXBL"] readonly attribute boolean hasScriptsBlockedBySandbox; [Func="IsChromeOrXBL"] readonly attribute boolean hasScriptsBlockedBySandbox;
[Func="IsChromeOrXBL"] readonly attribute boolean inlineScriptAllowedByCSP;
}; };
Document implements XPathEvaluator; Document implements XPathEvaluator;

View File

@ -11,9 +11,6 @@ interface imgIRequest;
[ChromeOnly, OverrideBuiltins] [ChromeOnly, OverrideBuiltins]
interface ImageDocument : HTMLDocument { interface ImageDocument : HTMLDocument {
/* Whether the pref for image resizing has been set. */
readonly attribute boolean imageResizingEnabled;
/* Whether the image is overflowing visible area. */ /* Whether the image is overflowing visible area. */
readonly attribute boolean imageIsOverflowing; readonly attribute boolean imageIsOverflowing;

View File

@ -1088,7 +1088,21 @@ EditorEventListener::Focus(nsIDOMEvent* aEvent)
nsCOMPtr<nsIDOMElement> element; nsCOMPtr<nsIDOMElement> element;
fm->GetFocusedElement(getter_AddRefs(element)); fm->GetFocusedElement(getter_AddRefs(element));
if (!SameCOMIdentity(element, target)) { if (!element) {
return NS_OK;
}
nsCOMPtr<nsIDOMEventTarget> originalTarget;
aEvent->GetOriginalTarget(getter_AddRefs(originalTarget));
nsCOMPtr<nsIContent> originalTargetAsContent =
do_QueryInterface(originalTarget);
nsCOMPtr<nsIContent> focusedElementAsContent =
do_QueryInterface(element);
if (!SameCOMIdentity(
focusedElementAsContent->FindFirstNonChromeOnlyAccessContent(),
originalTargetAsContent->FindFirstNonChromeOnlyAccessContent())) {
return NS_OK; return NS_OK;
} }
} }

View File

@ -358,6 +358,29 @@ mozHunspell::LoadDictionaryList(bool aNotifyChildProcesses)
} }
} }
// find dictionaries in DICPATH
char* dicEnv = PR_GetEnv("DICPATH");
if (dicEnv) {
// do a two-pass dance so dictionaries are loaded right-to-left as preference
nsTArray<nsCOMPtr<nsIFile>> dirs;
nsAutoCString env(dicEnv); // assume dicEnv is UTF-8
char* currPath = nullptr;
char* nextPaths = env.BeginWriting();
while ((currPath = NS_strtok(":", &nextPaths))) {
nsCOMPtr<nsIFile> dir;
rv = NS_NewNativeLocalFile(nsCString(currPath), true, getter_AddRefs(dir));
if (NS_SUCCEEDED(rv)) {
dirs.AppendElement(dir);
}
}
// load them in reverse order so they override each other properly
for (int32_t i = dirs.Length() - 1; i >= 0; i--) {
LoadDictionariesFromDir(dirs[i]);
}
}
// find dictionaries from extensions requiring restart // find dictionaries from extensions requiring restart
nsCOMPtr<nsISimpleEnumerator> dictDirs; nsCOMPtr<nsISimpleEnumerator> dictDirs;
rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST, rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST,

View File

@ -1,81 +0,0 @@
This patch is taken from the version of ICU in Google's Chromium.
See: https://chromium.googlesource.com/chromium/deps/icu/+/10834e84d250eb31a73496bfdb7923eaa43ead51
diff --git a/intl/icu/source/common/putil.cpp b/intl/icu/source/common/putil.cpp
--- a/intl/icu/source/common/putil.cpp
+++ b/intl/icu/source/common/putil.cpp
@@ -965,16 +965,25 @@ static char* searchForTZFile(const char*
}
}
}
}
closedir(dirp);
return result;
}
#endif
+
+U_CAPI void U_EXPORT2
+uprv_tzname_clear_cache()
+{
+#if defined(CHECK_LOCALTIME_LINK) && !defined(DEBUG_SKIP_LOCALTIME_LINK)
+ gTimeZoneBufferPtr = NULL;
+#endif
+}
+
U_CAPI const char* U_EXPORT2
uprv_tzname(int n)
{
const char *tzid = NULL;
#if U_PLATFORM_USES_ONLY_WIN32_API
tzid = uprv_detectWindowsTimeZone();
if (tzid != NULL) {
diff --git a/intl/icu/source/common/putilimp.h b/intl/icu/source/common/putilimp.h
--- a/intl/icu/source/common/putilimp.h
+++ b/intl/icu/source/common/putilimp.h
@@ -478,16 +478,22 @@ U_INTERNAL int32_t U_EXPORT2 uprv_timez
* tzname(1) Three-letter DST zone name derived from TZ environment
* variable. E.g., "PDT". If DST zone is omitted from TZ,
* tzname(1) is an empty string.
* @internal
*/
U_INTERNAL const char* U_EXPORT2 uprv_tzname(int n);
/**
+ * Reset the global tzname cache.
+ * @internal
+ */
+U_INTERNAL void uprv_tzname_clear_cache();
+
+/**
* Get UTC (GMT) time measured in milliseconds since 0:00 on 1/1/1970.
* This function is affected by 'faketime' and should be the bottleneck for all user-visible ICU time functions.
* @return the UTC time measured in milliseconds
* @internal
*/
U_INTERNAL UDate U_EXPORT2 uprv_getUTCtime(void);
/**
diff --git a/intl/icu/source/i18n/timezone.cpp b/intl/icu/source/i18n/timezone.cpp
--- a/intl/icu/source/i18n/timezone.cpp
+++ b/intl/icu/source/i18n/timezone.cpp
@@ -453,16 +453,18 @@ TimeZone::detectHostTimeZone()
int32_t rawOffset = 0;
const char *hostID;
// First, try to create a system timezone, based
// on the string ID in tzname[0].
uprv_tzset(); // Initialize tz... system data
+ uprv_tzname_clear_cache();
+
// Get the timezone ID from the host. This function should do
// any required host-specific remapping; e.g., on Windows this
// function maps the Date and Time control panel setting to an
// ICU timezone ID.
hostID = uprv_tzname(0);
// Invert sign because UNIX semantics are backwards
rawOffset = uprv_timezone() * -U_MILLIS_PER_SECOND;

View File

@ -5,7 +5,7 @@ https://ssl.icu-project.org/trac/ticket/12023
diff --git a/intl/icu/source/common/unicode/std_string.h b/intl/icu/source/common/unicode/std_string.h diff --git a/intl/icu/source/common/unicode/std_string.h b/intl/icu/source/common/unicode/std_string.h
--- a/intl/icu/source/common/unicode/std_string.h --- a/intl/icu/source/common/unicode/std_string.h
+++ b/intl/icu/source/common/unicode/std_string.h +++ b/intl/icu/source/common/unicode/std_string.h
@@ -22,16 +22,16 @@ @@ -24,16 +24,16 @@
* \brief C++ API: Central ICU header for including the C++ standard &lt;string&gt; * \brief C++ API: Central ICU header for including the C++ standard &lt;string&gt;
* header and for related definitions. * header and for related definitions.
*/ */
@ -26,10 +26,10 @@ diff --git a/intl/icu/source/common/unicode/std_string.h b/intl/icu/source/commo
diff --git a/intl/icu/source/common/utypeinfo.h b/intl/icu/source/common/utypeinfo.h diff --git a/intl/icu/source/common/utypeinfo.h b/intl/icu/source/common/utypeinfo.h
--- a/intl/icu/source/common/utypeinfo.h --- a/intl/icu/source/common/utypeinfo.h
+++ b/intl/icu/source/common/utypeinfo.h +++ b/intl/icu/source/common/utypeinfo.h
@@ -17,14 +17,14 @@ @@ -19,14 +19,14 @@
// Whenever 'typeid' is used, this header has to be included // Whenever 'typeid' is used, this header has to be included
// instead of <typeinfo>. // instead of <typeinfo>.
// Visual Stuido 10 emits warning 4275 with this change. If you compile // Visual Studio 10 emits warning 4275 with this change. If you compile
// with exception disabled, you have to suppress warning 4275. // with exception disabled, you have to suppress warning 4275.
#if defined(_MSC_VER) && _HAS_EXCEPTIONS == 0 #if defined(_MSC_VER) && _HAS_EXCEPTIONS == 0
#include <exception> #include <exception>
@ -45,7 +45,7 @@ diff --git a/intl/icu/source/common/utypeinfo.h b/intl/icu/source/common/utypein
diff --git a/intl/icu/source/io/unicode/ustream.h b/intl/icu/source/io/unicode/ustream.h diff --git a/intl/icu/source/io/unicode/ustream.h b/intl/icu/source/io/unicode/ustream.h
--- a/intl/icu/source/io/unicode/ustream.h --- a/intl/icu/source/io/unicode/ustream.h
+++ b/intl/icu/source/io/unicode/ustream.h +++ b/intl/icu/source/io/unicode/ustream.h
@@ -23,17 +23,17 @@ @@ -25,17 +25,17 @@
* \file * \file
* \brief C++ API: Unicode iostream like API * \brief C++ API: Unicode iostream like API
* *

View File

@ -1,14 +0,0 @@
diff --git a/intl/icu/source/tools/pkgdata/pkgdata.cpp b/intl/icu/source/tools/pkgdata/pkgdata.cpp
--- a/intl/icu/source/tools/toolutil/flagparser.c
+++ b/intl/icu/source/tools/toolutil/flagparser.c
@@ -96,8 +96,8 @@
uprv_free(buffer);
T_FileStream_close(f);
-
- if (U_FAILURE(*status)) {
+
+ if (U_FAILURE(*status) && *status != U_BUFFER_OVERFLOW_ERROR) {
return -1;
}

View File

@ -0,0 +1,62 @@
https://ssl.icu-project.org/trac/ticket/12827
https://ssl.icu-project.org/trac/changeset/39484 (Excluding test-related bits
because we remove the "test" directory before applying the ICU patches.)
Index: /intl/icu/source/common/ulist.c
===================================================================
--- /intl/icu/source/common/ulist.c (revision 39483)
+++ /intl/icu/source/common/ulist.c (revision 39484)
@@ -30,5 +30,4 @@
int32_t size;
- int32_t currentIndex;
};
@@ -52,5 +51,4 @@
newList->tail = NULL;
newList->size = 0;
- newList->currentIndex = -1;
return newList;
@@ -81,6 +79,7 @@
p->next->previous = p->previous;
}
- list->curr = NULL;
- list->currentIndex = 0;
+ if (p == list->curr) {
+ list->curr = p->next;
+ }
--list->size;
if (p->forceDelete) {
@@ -151,5 +150,4 @@
list->head->previous = newItem;
list->head = newItem;
- list->currentIndex++;
}
@@ -194,5 +192,4 @@
curr = list->curr;
list->curr = curr->next;
- list->currentIndex++;
return curr->data;
@@ -210,5 +207,4 @@
if (list != NULL) {
list->curr = list->head;
- list->currentIndex = 0;
}
}
@@ -273,3 +269,2 @@
return (UList *)(en->context);
}
-
Index: /intl/icu/source/i18n/ucol_res.cpp
===================================================================
--- /intl/icu/source/i18n/ucol_res.cpp (revision 39483)
+++ /intl/icu/source/i18n/ucol_res.cpp (revision 39484)
@@ -681,4 +681,5 @@
}
memcpy(en, &defaultKeywordValues, sizeof(UEnumeration));
+ ulist_resetList(sink.values); // Initialize the iterator.
en->context = sink.values;
sink.values = NULL; // Avoid deletion in the sink destructor.

View File

@ -1,9 +1,10 @@
Path: release-56-1 Path: release-58-1
URL: http://source.icu-project.org/repos/icu/icu/tags/release-56-1 URL: https://ssl.icu-project.org/repos/icu/icu/tags/release-58-1
Repository Root: http://source.icu-project.org/repos/icu Relative URL: ^/icu/tags/release-58-1
Repository Root: https://ssl.icu-project.org/repos/icu
Repository UUID: 251d0590-4201-4cf1-90de-194747b24ca1 Repository UUID: 251d0590-4201-4cf1-90de-194747b24ca1
Node Kind: directory Node Kind: directory
Last Changed Author: mow Last Changed Author: srl
Last Changed Rev: 38044 Last Changed Rev: 39472
Last Changed Date: 2015-10-07 22:20:20 +0000 (Wed, 07 Oct 2015) Last Changed Date: 2016-10-19 20:35:30 +0000 (Wed, 19 Oct 2016)

View File

@ -1,4 +1,6 @@
# Doxyfile 1.3.7 # Doxyfile 1.3.7
# Copyright (C) 2016 and later: Unicode, Inc. and others.
# License & terms of use: http://www.unicode.org/copyright.html
# ******************************************************************** # ********************************************************************
# * COPYRIGHT: # * COPYRIGHT:
# * Copyright (c) 2004-2015, International Business Machines Corporation # * Copyright (c) 2004-2015, International Business Machines Corporation

View File

@ -1,6 +1,8 @@
# Copyright (C) 2016 and later: Unicode, Inc. and others.
# License & terms of use: http://www.unicode.org/copyright.html
#****************************************************************************** #******************************************************************************
# #
# Copyright (C) 1998-2015, International Business Machines # Copyright (C) 1998-2016, International Business Machines
# Corporation and others. All Rights Reserved. # Corporation and others. All Rights Reserved.
# #
#****************************************************************************** #******************************************************************************
@ -29,7 +31,6 @@ subdir = .
#AUTOCONF = @AUTOCONF@ #AUTOCONF = @AUTOCONF@
## Optional directory setup ## Optional directory setup
@LAYOUT_TRUE@LAYOUT = layout
@LAYOUTEX_TRUE@LAYOUTEX = layoutex @LAYOUTEX_TRUE@LAYOUTEX = layoutex
@ICUIO_TRUE@ICUIO = io @ICUIO_TRUE@ICUIO = io
@EXTRAS_TRUE@EXTRA = extra @EXTRAS_TRUE@EXTRA = extra
@ -39,7 +40,6 @@ subdir = .
## pkgconfig setup. Always have uc and i18n. Others are optional. ## pkgconfig setup. Always have uc and i18n. Others are optional.
ALL_PKGCONFIG_SUFFIX=uc i18n ALL_PKGCONFIG_SUFFIX=uc i18n
@LAYOUT_TRUE@ALL_PKGCONFIG_SUFFIX+= le
@LAYOUTEX_TRUE@ALL_PKGCONFIG_SUFFIX+= lx @LAYOUTEX_TRUE@ALL_PKGCONFIG_SUFFIX+= lx
@ICUIO_TRUE@ALL_PKGCONFIG_SUFFIX+= io @ICUIO_TRUE@ALL_PKGCONFIG_SUFFIX+= io
@ -58,7 +58,7 @@ INSTALLED_BUILT_FILES = $(top_builddir)/config/Makefile.inc $(top_builddir)/conf
LOCAL_BUILT_FILES = icudefs.mk config/icucross.mk config/icucross.inc LOCAL_BUILT_FILES = icudefs.mk config/icucross.mk config/icucross.inc
DOCDIRS = common i18n DOCDIRS = common i18n
SUBDIRS = stubdata common i18n $(LAYOUT) $(LAYOUTEX) $(ICUIO) $(TOOLS) data $(EXTRA) $(SAMPLE) $(TEST) SUBDIRS = stubdata common i18n $(LAYOUTEX) $(ICUIO) $(TOOLS) data $(EXTRA) $(SAMPLE) $(TEST)
SECTION = 1 SECTION = 1
@ -113,13 +113,13 @@ doc doc-searchengine:
else else
doc: doc/html/index.html doc: doc/html/index.html
doc-searchengine: Doxyfile $(wildcard ./common/unicode/platform.h $(srcdir)/common/unicode/*.h $(srcdir)/i18n/unicode/*.h $(srcdir)/layout/unicode/*.h $(srcdir)/io/unicode/*.h) doc-searchengine: Doxyfile $(wildcard ./common/unicode/platform.h $(srcdir)/common/unicode/*.h $(srcdir)/i18n/unicode/*.h $(srcdir)/io/unicode/*.h)
sed < Doxyfile -e 's%[^#]*SEARCHENGINE.*%SEARCHENGINE=YES%' | $(DOXYGEN) - sed < Doxyfile -e 's%[^#]*SEARCHENGINE.*%SEARCHENGINE=YES%' | $(DOXYGEN) -
@echo adding links from non-namespaced class files @echo adding links from non-namespaced class files
find doc/html -name 'classicu_1_1*' -print | sed -e 's%^\(.*class\)icu_1_1\(.*\)$$%ln & \1\2%' | sh find doc/html -name 'classicu_1_1*' -print | sed -e 's%^\(.*class\)icu_1_1\(.*\)$$%ln & \1\2%' | sh
@echo Docs created - WARNING, probably contains non-GPL .js files @echo Docs created - WARNING, probably contains non-GPL .js files
doc/html/index.html: Doxyfile $(wildcard ./common/unicode/platform.h $(srcdir)/common/unicode/*.h $(srcdir)/i18n/unicode/*.h $(srcdir)/layout/unicode/*.h $(srcdir)/io/unicode/*.h) doc/html/index.html: Doxyfile $(wildcard ./common/unicode/platform.h $(srcdir)/common/unicode/*.h $(srcdir)/i18n/unicode/*.h $(srcdir)/io/unicode/*.h)
$(DOXYGEN) $(DOXYGEN)
@echo adding links from non-namespaced class files @echo adding links from non-namespaced class files
find doc/html -name 'classicu_1_1*' -print | sed -e 's%^\(.*class\)icu_1_1\(.*\)$$%ln & \1\2%' | sh find doc/html -name 'classicu_1_1*' -print | sed -e 's%^\(.*class\)icu_1_1\(.*\)$$%ln & \1\2%' | sh
@ -184,7 +184,7 @@ install-icu: $(INSTALLED_BUILT_FILES)
$(INSTALL_SCRIPT) $(top_srcdir)/install-sh $(DESTDIR)$(pkgdatadir)/install-sh $(INSTALL_SCRIPT) $(top_srcdir)/install-sh $(DESTDIR)$(pkgdatadir)/install-sh
@$(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig @$(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL_DATA) $(ALL_PKGCONFIG_FILES) $(DESTDIR)$(libdir)/pkgconfig/ $(INSTALL_DATA) $(ALL_PKGCONFIG_FILES) $(DESTDIR)$(libdir)/pkgconfig/
$(INSTALL_DATA) $(top_srcdir)/../license.html $(DESTDIR)$(pkgdatadir)/license.html $(INSTALL_DATA) $(top_srcdir)/../LICENSE $(DESTDIR)$(pkgdatadir)/LICENSE
$(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config $(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config
$(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile.inc $(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile.inc
$(INSTALL_DATA) $(top_builddir)/config/pkgdata.inc $(DESTDIR)$(pkglibdir)/pkgdata.inc $(INSTALL_DATA) $(top_builddir)/config/pkgdata.inc $(DESTDIR)$(pkglibdir)/pkgdata.inc
@ -287,14 +287,6 @@ config/icu-io.pc: config/icu.pc Makefile icudefs.mk
@echo "Libs:" "${ICULIBS_IO}" >> $@ @echo "Libs:" "${ICULIBS_IO}" >> $@
@echo $@ updated. @echo $@ updated.
config/icu-le.pc: config/icu.pc Makefile icudefs.mk
@cat config/icu.pc > $@
@echo "Description: $(PACKAGE_ICU_DESCRIPTION): Layout library" >> $@
@echo "Name: $(PACKAGE)-le" >> $@
@echo "Requires: icu-uc" >> $@
@echo "Libs:" "${ICULIBS_LE}" >> $@
@echo $@ updated.
ICULEHB_LIBS=@ICULEHB_LIBS@ ICULEHB_LIBS=@ICULEHB_LIBS@
USING_HB= USING_HB=
ifneq ($(ICULEHB_LIBS),) ifneq ($(ICULEHB_LIBS),)

View File

@ -1,4 +1,6 @@
# Copyright (c) 1999-2015, International Business Machines Corporation and # Copyright (C) 2016 and later: Unicode, Inc. and others.
# License & terms of use: http://www.unicode.org/copyright.html
# Copyright (c) 1999-2016, International Business Machines Corporation and
# others. All Rights Reserved. # others. All Rights Reserved.
# acinclude.m4 for ICU # acinclude.m4 for ICU
# Don't edit aclocal.m4, do edit acinclude.m4 # Don't edit aclocal.m4, do edit acinclude.m4
@ -461,6 +463,9 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE],
if test "$GCC" = yes if test "$GCC" = yes
then then
case "${host}" in case "${host}" in
*-*-solaris*)
# Don't use -std=c99 on Solaris because of timezone check fails
;;
*) *)
# Do not use -ansi. It limits us to C90, and it breaks some platforms. # 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 # We use -std=c99 to disable the gnu99 defaults and its associated warnings

View File

@ -12,32 +12,63 @@
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24) dnl serial 11 (pkg-config-0.29.1)
# dnl
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
# dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
# This program is free software; you can redistribute it and/or modify dnl
# it under the terms of the GNU General Public License as published by dnl This program is free software; you can redistribute it and/or modify
# the Free Software Foundation; either version 2 of the License, or dnl it under the terms of the GNU General Public License as published by
# (at your option) any later version. dnl the Free Software Foundation; either version 2 of the License, or
# dnl (at your option) any later version.
# This program is distributed in the hope that it will be useful, but dnl
# WITHOUT ANY WARRANTY; without even the implied warranty of dnl This program is distributed in the hope that it will be useful, but
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl WITHOUT ANY WARRANTY; without even the implied warranty of
# General Public License for more details. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# dnl General Public License for more details.
# You should have received a copy of the GNU General Public License dnl
# along with this program; if not, write to the Free Software dnl You should have received a copy of the GNU General Public License
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. dnl along with this program; if not, write to the Free Software
# dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# As a special exception to the GNU General Public License, if you dnl 02111-1307, USA.
# distribute this file as part of a program that contains a dnl
# configuration script generated by Autoconf, you may include it under dnl As a special exception to the GNU General Public License, if you
# the same distribution terms that you use for the rest of that program. dnl distribute this file as part of a program that contains a
dnl configuration script generated by Autoconf, you may include it under
dnl the same distribution terms that you use for the rest of that
dnl program.
# PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl PKG_PREREQ(MIN-VERSION)
# ---------------------------------- dnl -----------------------
dnl Since: 0.29
dnl
dnl Verify that the version of the pkg-config macros are at least
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
dnl installed version of pkg-config, this checks the developer's version
dnl of pkg.m4 when generating configure.
dnl
dnl To ensure that this macro is defined, also add:
dnl m4_ifndef([PKG_PREREQ],
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.1])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
dnl ----------------------------------
dnl Since: 0.16
dnl
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
dnl first found in the path. Checks that the version of pkg-config found
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
dnl used since that's the first version where most current features of
dnl pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG], AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
@ -59,18 +90,19 @@ if test -n "$PKG_CONFIG"; then
PKG_CONFIG="" PKG_CONFIG=""
fi fi
fi[]dnl fi[]dnl
])# PKG_PROG_PKG_CONFIG ])dnl PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# dnl -------------------------------------------------------------------
# Check to see whether a particular set of modules exists. Similar dnl Since: 0.18
# to PKG_CHECK_MODULES(), but does not set variables or print errors. dnl
# dnl Check to see whether a particular set of modules exists. Similar to
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
# only at the first occurence in configure.ac, so if the first place dnl
# it's called might be skipped (such as if it is within an "if", you dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
# have to call PKG_CHECK_EXISTS manually dnl only at the first occurence in configure.ac, so if the first place
# -------------------------------------------------------------- dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS], AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \ if test -n "$PKG_CONFIG" && \
@ -80,8 +112,10 @@ m4_ifvaln([$3], [else
$3])dnl $3])dnl
fi]) fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# --------------------------------------------- dnl ---------------------------------------------
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
dnl pkg_failed based on the result.
m4_define([_PKG_CONFIG], m4_define([_PKG_CONFIG],
[if test -n "$$1"; then [if test -n "$$1"; then
pkg_cv_[]$1="$$1" pkg_cv_[]$1="$$1"
@ -93,10 +127,11 @@ m4_define([_PKG_CONFIG],
else else
pkg_failed=untried pkg_failed=untried
fi[]dnl fi[]dnl
])# _PKG_CONFIG ])dnl _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED dnl _PKG_SHORT_ERRORS_SUPPORTED
# ----------------------------- dnl ---------------------------
dnl Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@ -104,19 +139,17 @@ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
else else
_pkg_short_errors_supported=no _pkg_short_errors_supported=no
fi[]dnl fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED ])dnl _PKG_SHORT_ERRORS_SUPPORTED
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND]) dnl [ACTION-IF-NOT-FOUND])
# dnl --------------------------------------------------------------
# dnl Since: 0.4.0
# Note that if there is a possibility the first call to dnl
# PKG_CHECK_MODULES might not happen, you should be sure to include an dnl Note that if there is a possibility the first call to
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
# dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES], AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
@ -170,16 +203,40 @@ else
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
$3 $3
fi[]dnl fi[]dnl
])# PKG_CHECK_MODULES ])dnl PKG_CHECK_MODULES
# PKG_INSTALLDIR(DIRECTORY) dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# ------------------------- dnl [ACTION-IF-NOT-FOUND])
# Substitutes the variable pkgconfigdir as the location where a module dnl ---------------------------------------------------------------------
# should install pkg-config .pc files. By default the directory is dnl Since: 0.29
# $libdir/pkgconfig, but the default can be changed by passing dnl
# DIRECTORY. The user can override through the --with-pkgconfigdir dnl Checks for existence of MODULES and gathers its build flags with
# parameter. dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
dnl and VARIABLE-PREFIX_LIBS from --libs.
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
dnl configure.ac.
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
_save_PKG_CONFIG=$PKG_CONFIG
PKG_CONFIG="$PKG_CONFIG --static"
PKG_CHECK_MODULES($@)
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
])dnl PKG_CHECK_MODULES_STATIC
dnl PKG_INSTALLDIR([DIRECTORY])
dnl -------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable pkgconfigdir as the location where a module
dnl should install pkg-config .pc files. By default the directory is
dnl $libdir/pkgconfig, but the default can be changed by passing
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
dnl parameter.
AC_DEFUN([PKG_INSTALLDIR], AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description], m4_pushdef([pkg_description],
@ -193,13 +250,15 @@ m4_popdef([pkg_description])
])dnl PKG_INSTALLDIR ])dnl PKG_INSTALLDIR
# PKG_NOARCH_INSTALLDIR(DIRECTORY) dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
# ------------------------- dnl --------------------------------
# Substitutes the variable noarch_pkgconfigdir as the location where a dnl Since: 0.27
# module should install arch-independent pkg-config .pc files. By dnl
# default the directory is $datadir/pkgconfig, but the default can be dnl Substitutes the variable noarch_pkgconfigdir as the location where a
# changed by passing DIRECTORY. The user can override through the dnl module should install arch-independent pkg-config .pc files. By
# --with-noarch-pkgconfigdir parameter. dnl default the directory is $datadir/pkgconfig, but the default can be
dnl changed by passing DIRECTORY. The user can override through the
dnl --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR], AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description], m4_pushdef([pkg_description],
@ -213,10 +272,12 @@ m4_popdef([pkg_description])
])dnl PKG_NOARCH_INSTALLDIR ])dnl PKG_NOARCH_INSTALLDIR
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# ------------------------------------------- dnl -------------------------------------------
# Retrieves the value of the pkg-config variable for the given module. dnl Since: 0.28
dnl
dnl Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR], AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
@ -225,7 +286,7 @@ _PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl AS_VAR_IF([$1], [""], [$5], [$4])dnl
])# PKG_CHECK_VAR ])dnl PKG_CHECK_VAR
m4_include([config/m4/icu-conditional.m4]) m4_include([config/m4/icu-conditional.m4])
m4_include([acinclude.m4]) m4_include([acinclude.m4])

View File

@ -31,10 +31,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "i18n", "..\i18n\i18n.vcxpro
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intltest", "..\test\intltest\intltest.vcxproj", "{73632960-B3A6-464D-83A3-4B43365F19B8}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intltest", "..\test\intltest\intltest.vcxproj", "{73632960-B3A6-464D-83A3-4B43365F19B8}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "layout", "..\layout\layout.vcxproj", "{C920062A-0647-4553-A3B2-37C58065664B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "layoutex", "..\layoutex\layoutex.vcxproj", "{37FC2C7F-1904-4811-8955-2F478830EAD1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "makeconv", "..\tools\makeconv\makeconv.vcxproj", "{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "makeconv", "..\tools\makeconv\makeconv.vcxproj", "{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "makedata", "..\data\makedata.vcxproj", "{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "makedata", "..\data\makedata.vcxproj", "{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}"
@ -57,8 +53,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icupkg", "..\tools\icupkg\i
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gendict", "..\tools\gendict\gendict.vcxproj", "{9D4211F7-2C77-439C-82F0-30A4E43BA569}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gendict", "..\tools\gendict\gendict.vcxproj", "{9D4211F7-2C77-439C-82F0-30A4E43BA569}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "letest", "..\test\letest\letest.vcxproj", "{67351485-4D18-4245-BE39-A7EF0675ACD2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gencfu", "..\tools\gencfu\gencfu.vcxproj", "{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gencfu", "..\tools\gencfu\gencfu.vcxproj", "{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gennorm2", "..\tools\gennorm2\gennorm2.vcxproj", "{C7891A65-80AB-4245-912E-5F1E17B0E6C4}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gennorm2", "..\tools\gennorm2\gennorm2.vcxproj", "{C7891A65-80AB-4245-912E-5F1E17B0E6C4}"
@ -295,14 +289,6 @@ Global
{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Release|Win32.Build.0 = Release|Win32 {9D4211F7-2C77-439C-82F0-30A4E43BA569}.Release|Win32.Build.0 = Release|Win32
{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Release|x64.ActiveCfg = Release|x64 {9D4211F7-2C77-439C-82F0-30A4E43BA569}.Release|x64.ActiveCfg = Release|x64
{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Release|x64.Build.0 = Release|x64 {9D4211F7-2C77-439C-82F0-30A4E43BA569}.Release|x64.Build.0 = Release|x64
{67351485-4D18-4245-BE39-A7EF0675ACD2}.Debug|Win32.ActiveCfg = Debug|Win32
{67351485-4D18-4245-BE39-A7EF0675ACD2}.Debug|Win32.Build.0 = Debug|Win32
{67351485-4D18-4245-BE39-A7EF0675ACD2}.Debug|x64.ActiveCfg = Debug|x64
{67351485-4D18-4245-BE39-A7EF0675ACD2}.Debug|x64.Build.0 = Debug|x64
{67351485-4D18-4245-BE39-A7EF0675ACD2}.Release|Win32.ActiveCfg = Release|Win32
{67351485-4D18-4245-BE39-A7EF0675ACD2}.Release|Win32.Build.0 = Release|Win32
{67351485-4D18-4245-BE39-A7EF0675ACD2}.Release|x64.ActiveCfg = Release|x64
{67351485-4D18-4245-BE39-A7EF0675ACD2}.Release|x64.Build.0 = Release|x64
{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Debug|Win32.ActiveCfg = Debug|Win32 {691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Debug|Win32.ActiveCfg = Debug|Win32
{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Debug|Win32.Build.0 = Debug|Win32 {691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Debug|Win32.Build.0 = Debug|Win32
{691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Debug|x64.ActiveCfg = Debug|x64 {691EE0C0-DC57-4A48-8AEE-8ED75EB3A057}.Debug|x64.ActiveCfg = Debug|x64

View File

@ -1,4 +1,6 @@
@echo off @echo off
REM Copyright (C) 2016 and later: Unicode, Inc. and others.
REM License & terms of use: http://www.unicode.org/copyright.html
REM ******************************************************************** REM ********************************************************************
REM * COPYRIGHT: REM * COPYRIGHT:
REM * Copyright (c) 2010-2014, International Business Machines Corporation REM * Copyright (c) 2010-2014, International Business Machines Corporation
@ -89,7 +91,7 @@ set ICUFAILCNT=0
:OK_cintltst :OK_cintltst
@set ICURUN=%ICURUN% %THT% @set ICURUN=%ICURUN% %THT%
@REM (Layout is deprecated) @REM (Layout is deprecated - this would require HarfBuzz)
@REM @set THT=letest @REM @set THT=letest
@REM @echo ==== %THT% ========================================================================= @REM @echo ==== %THT% =========================================================================
@REM @cd %ICU_ICUDIR%\source\test\letest @REM @cd %ICU_ICUDIR%\source\test\letest

View File

@ -1,6 +1,8 @@
# Copyright (C) 2016 and later: Unicode, Inc. and others.
# License & terms of use: http://www.unicode.org/copyright.html
#****************************************************************************** #******************************************************************************
# #
# Copyright (C) 1999-2015, International Business Machines # Copyright (C) 1999-2016, International Business Machines
# Corporation and others. All Rights Reserved. # Corporation and others. All Rights Reserved.
# #
#****************************************************************************** #******************************************************************************
@ -78,14 +80,15 @@ endif
LIBS = $(LIBICUDT) $(DEFAULT_LIBS) LIBS = $(LIBICUDT) $(DEFAULT_LIBS)
OBJECTS = errorcode.o putil.o umath.o utypes.o uinvchar.o umutex.o ucln_cmn.o \ OBJECTS = errorcode.o putil.o umath.o utypes.o uinvchar.o umutex.o ucln_cmn.o \
uinit.o uobject.o cmemory.o charstr.o \ uinit.o uobject.o cmemory.o charstr.o cstr.o \
udata.o ucmndata.o udatamem.o umapfile.o udataswp.o ucol_swp.o utrace.o \ udata.o ucmndata.o udatamem.o umapfile.o udataswp.o ucol_swp.o utrace.o \
uhash.o uhash_us.o uenum.o ustrenum.o uvector.o ustack.o uvectr32.o uvectr64.o \ uhash.o uhash_us.o uenum.o ustrenum.o uvector.o ustack.o uvectr32.o uvectr64.o \
ucnv.o ucnv_bld.o ucnv_cnv.o ucnv_io.o ucnv_cb.o ucnv_err.o ucnvlat1.o \ ucnv.o ucnv_bld.o ucnv_cnv.o ucnv_io.o ucnv_cb.o ucnv_err.o ucnvlat1.o \
ucnv_u7.o ucnv_u8.o ucnv_u16.o ucnv_u32.o ucnvscsu.o ucnvbocu.o \ ucnv_u7.o ucnv_u8.o ucnv_u16.o ucnv_u32.o ucnvscsu.o ucnvbocu.o \
ucnv_ext.o ucnvmbcs.o ucnv2022.o ucnvhz.o ucnv_lmb.o ucnvisci.o ucnvdisp.o ucnv_set.o ucnv_ct.o \ ucnv_ext.o ucnvmbcs.o ucnv2022.o ucnvhz.o ucnv_lmb.o ucnvisci.o ucnvdisp.o ucnv_set.o ucnv_ct.o \
uresbund.o ures_cnv.o uresdata.o resbund.o resbund_cnv.o \ resource.o uresbund.o ures_cnv.o uresdata.o resbund.o resbund_cnv.o \
messagepattern.o ucat.o locmap.o uloc.o locid.o locutil.o locavailable.o locdispnames.o loclikely.o locresdata.o \ ucurr.o \
messagepattern.o ucat.o locmap.o uloc.o locid.o locutil.o locavailable.o locdispnames.o locdspnm.o loclikely.o locresdata.o \
bytestream.o stringpiece.o \ bytestream.o stringpiece.o \
stringtriebuilder.o bytestriebuilder.o \ stringtriebuilder.o bytestriebuilder.o \
bytestrie.o bytestrieiterator.o \ bytestrie.o bytestrieiterator.o \
@ -105,7 +108,8 @@ serv.o servnotf.o servls.o servlk.o servlkf.o servrbf.o servslkf.o \
uidna.o usprep.o uts46.o punycode.o \ uidna.o usprep.o uts46.o punycode.o \
util.o util_props.o parsepos.o locbased.o cwchar.o wintz.o dtintrv.o ucnvsel.o propsvec.o \ util.o util_props.o parsepos.o locbased.o cwchar.o wintz.o dtintrv.o ucnvsel.o propsvec.o \
ulist.o uloc_tag.o icudataver.o icuplug.o listformatter.o ulistformatter.o \ ulist.o uloc_tag.o icudataver.o icuplug.o listformatter.o ulistformatter.o \
sharedobject.o simplepatternformatter.o unifiedcache.o uloc_keytype.o \ sharedobject.o simpleformatter.o unifiedcache.o uloc_keytype.o \
ubiditransform.o \
pluralmap.o pluralmap.o
## Header files to install ## Header files to install

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
* Copyright (C) 2011-2012, International Business Machines * Copyright (C) 2011-2012, International Business Machines

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
* *

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
* *

View File

@ -1,6 +1,8 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
************************************************************************************ ************************************************************************************
* Copyright (C) 2006-2015, International Business Machines Corporation * Copyright (C) 2006-2016, International Business Machines Corporation
* and others. All Rights Reserved. * and others. All Rights Reserved.
************************************************************************************ ************************************************************************************
*/ */
@ -10,6 +12,7 @@
#if !UCONFIG_NO_BREAK_ITERATION #if !UCONFIG_NO_BREAK_ITERATION
#include "brkeng.h" #include "brkeng.h"
#include "cmemory.h"
#include "dictbe.h" #include "dictbe.h"
#include "unicode/uchar.h" #include "unicode/uchar.h"
#include "unicode/uniset.h" #include "unicode/uniset.h"
@ -56,13 +59,13 @@ LanguageBreakFactory::~LanguageBreakFactory() {
*/ */
UnhandledEngine::UnhandledEngine(UErrorCode &/*status*/) { UnhandledEngine::UnhandledEngine(UErrorCode &/*status*/) {
for (int32_t i = 0; i < (int32_t)(sizeof(fHandled)/sizeof(fHandled[0])); ++i) { for (int32_t i = 0; i < UPRV_LENGTHOF(fHandled); ++i) {
fHandled[i] = 0; fHandled[i] = 0;
} }
} }
UnhandledEngine::~UnhandledEngine() { UnhandledEngine::~UnhandledEngine() {
for (int32_t i = 0; i < (int32_t)(sizeof(fHandled)/sizeof(fHandled[0])); ++i) { for (int32_t i = 0; i < UPRV_LENGTHOF(fHandled); ++i) {
if (fHandled[i] != 0) { if (fHandled[i] != 0) {
delete fHandled[i]; delete fHandled[i];
} }
@ -71,7 +74,7 @@ UnhandledEngine::~UnhandledEngine() {
UBool UBool
UnhandledEngine::handles(UChar32 c, int32_t breakType) const { UnhandledEngine::handles(UChar32 c, int32_t breakType) const {
return (breakType >= 0 && breakType < (int32_t)(sizeof(fHandled)/sizeof(fHandled[0])) return (breakType >= 0 && breakType < UPRV_LENGTHOF(fHandled)
&& fHandled[breakType] != 0 && fHandled[breakType]->contains(c)); && fHandled[breakType] != 0 && fHandled[breakType]->contains(c));
} }
@ -82,7 +85,7 @@ UnhandledEngine::findBreaks( UText *text,
UBool reverse, UBool reverse,
int32_t breakType, int32_t breakType,
UStack &/*foundBreaks*/ ) const { UStack &/*foundBreaks*/ ) const {
if (breakType >= 0 && breakType < (int32_t)(sizeof(fHandled)/sizeof(fHandled[0]))) { if (breakType >= 0 && breakType < UPRV_LENGTHOF(fHandled)) {
UChar32 c = utext_current32(text); UChar32 c = utext_current32(text);
if (reverse) { if (reverse) {
while((int32_t)utext_getNativeIndex(text) > startPos && fHandled[breakType]->contains(c)) { while((int32_t)utext_getNativeIndex(text) > startPos && fHandled[breakType]->contains(c)) {
@ -101,7 +104,7 @@ UnhandledEngine::findBreaks( UText *text,
void void
UnhandledEngine::handleCharacter(UChar32 c, int32_t breakType) { UnhandledEngine::handleCharacter(UChar32 c, int32_t breakType) {
if (breakType >= 0 && breakType < (int32_t)(sizeof(fHandled)/sizeof(fHandled[0]))) { if (breakType >= 0 && breakType < UPRV_LENGTHOF(fHandled)) {
if (fHandled[breakType] == 0) { if (fHandled[breakType] == 0) {
fHandled[breakType] = new UnicodeSet(); fHandled[breakType] = new UnicodeSet();
if (fHandled[breakType] == 0) { if (fHandled[breakType] == 0) {

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/** /**
************************************************************************************ ************************************************************************************
* Copyright (C) 2006-2012, International Business Machines Corporation and others. * * Copyright (C) 2006-2012, International Business Machines Corporation and others. *

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
* Copyright (C) 1997-2015, International Business Machines Corporation and * Copyright (C) 1997-2015, International Business Machines Corporation and
@ -418,6 +420,7 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
break; break;
case UBRK_SENTENCE: case UBRK_SENTENCE:
result = BreakIterator::buildInstance(loc, "sentence", kind, status); result = BreakIterator::buildInstance(loc, "sentence", kind, status);
#if !UCONFIG_NO_FILTERED_BREAK_ITERATION
{ {
char ssKeyValue[kKeyValueLenMax] = {0}; char ssKeyValue[kKeyValueLenMax] = {0};
UErrorCode kvStatus = U_ZERO_ERROR; UErrorCode kvStatus = U_ZERO_ERROR;
@ -430,6 +433,7 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
} }
} }
} }
#endif
break; break;
case UBRK_TITLE: case UBRK_TITLE:
result = BreakIterator::buildInstance(loc, "title", kind, status); result = BreakIterator::buildInstance(loc, "title", kind, status);

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
// Copyright (C) 2009-2011, International Business Machines // Copyright (C) 2009-2011, International Business Machines
// Corporation and others. All Rights Reserved. // Corporation and others. All Rights Reserved.
// //

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
* Copyright (C) 2010-2011, International Business Machines * Copyright (C) 2010-2011, International Business Machines

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
* Copyright (C) 2010-2012, International Business Machines * Copyright (C) 2010-2012, International Business Machines
@ -35,7 +37,7 @@ class BytesTrieElement : public UMemory {
public: public:
// Use compiler's default constructor, initializes nothing. // Use compiler's default constructor, initializes nothing.
void setTo(const StringPiece &s, int32_t val, CharString &strings, UErrorCode &errorCode); void setTo(StringPiece s, int32_t val, CharString &strings, UErrorCode &errorCode);
StringPiece getString(const CharString &strings) const { StringPiece getString(const CharString &strings) const {
int32_t offset=stringOffset; int32_t offset=stringOffset;
@ -86,7 +88,7 @@ private:
}; };
void void
BytesTrieElement::setTo(const StringPiece &s, int32_t val, BytesTrieElement::setTo(StringPiece s, int32_t val,
CharString &strings, UErrorCode &errorCode) { CharString &strings, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { if(U_FAILURE(errorCode)) {
return; return;
@ -143,7 +145,7 @@ BytesTrieBuilder::~BytesTrieBuilder() {
} }
BytesTrieBuilder & BytesTrieBuilder &
BytesTrieBuilder::add(const StringPiece &s, int32_t value, UErrorCode &errorCode) { BytesTrieBuilder::add(StringPiece s, int32_t value, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { if(U_FAILURE(errorCode)) {
return *this; return *this;
} }
@ -165,7 +167,7 @@ BytesTrieBuilder::add(const StringPiece &s, int32_t value, UErrorCode &errorCode
return *this; // error instead of dereferencing null return *this; // error instead of dereferencing null
} }
if(elementsLength>0) { if(elementsLength>0) {
uprv_memcpy(newElements, elements, elementsLength*sizeof(BytesTrieElement)); uprv_memcpy(newElements, elements, (size_t)elementsLength*sizeof(BytesTrieElement));
} }
delete[] elements; delete[] elements;
elements=newElements; elements=newElements;

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
* Copyright (C) 2010-2012, International Business Machines * Copyright (C) 2010-2012, International Business Machines
@ -139,7 +141,6 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
} else { } else {
pos_=skipValue(pos, node); pos_=skipValue(pos, node);
} }
sp_.set(str_->data(), str_->length());
return TRUE; return TRUE;
} }
if(maxLength_>0 && str_->length()==maxLength_) { if(maxLength_>0 && str_->length()==maxLength_) {
@ -167,10 +168,14 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
} }
} }
StringPiece
BytesTrie::Iterator::getString() const {
return str_ == NULL ? StringPiece() : str_->toStringPiece();
}
UBool UBool
BytesTrie::Iterator::truncateAndStop() { BytesTrie::Iterator::truncateAndStop() {
pos_=NULL; pos_=NULL;
sp_.set(str_->data(), str_->length());
value_=-1; // no real value for str value_=-1; // no real value for str
return TRUE; return TRUE;
} }
@ -199,7 +204,6 @@ BytesTrie::Iterator::branchNext(const uint8_t *pos, int32_t length, UErrorCode &
str_->append((char)trieByte, errorCode); str_->append((char)trieByte, errorCode);
if(isFinal) { if(isFinal) {
pos_=NULL; pos_=NULL;
sp_.set(str_->data(), str_->length());
value_=value; value_=value;
return NULL; return NULL;
} else { } else {

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
***************************************************************************** *****************************************************************************
* Copyright (C) 1996-2015, International Business Machines Corporation and * Copyright (C) 1996-2015, International Business Machines Corporation and

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************
* Copyright (C) 1999-2011, International Business Machines * Copyright (C) 1999-2011, International Business Machines

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
* Copyright (C) 2010-2015, International Business Machines * Copyright (C) 2010-2015, International Business Machines
@ -144,7 +146,7 @@ UBool CharString::ensureCapacity(int32_t capacity,
return TRUE; return TRUE;
} }
CharString &CharString::appendPathPart(const StringPiece &s, UErrorCode &errorCode) { CharString &CharString::appendPathPart(StringPiece s, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) { if(U_FAILURE(errorCode)) {
return *this; return *this;
} }

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
********************************************************************** **********************************************************************
* Copyright (c) 2001-2015, International Business Machines * Copyright (c) 2001-2015, International Business Machines
@ -39,7 +41,7 @@ template class U_COMMON_API MaybeStackArray<char, 40>;
class U_COMMON_API CharString : public UMemory { class U_COMMON_API CharString : public UMemory {
public: public:
CharString() : len(0) { buffer[0]=0; } CharString() : len(0) { buffer[0]=0; }
CharString(const StringPiece &s, UErrorCode &errorCode) : len(0) { CharString(StringPiece s, UErrorCode &errorCode) : len(0) {
buffer[0]=0; buffer[0]=0;
append(s, errorCode); append(s, errorCode);
} }
@ -76,7 +78,7 @@ public:
CharString &truncate(int32_t newLength); CharString &truncate(int32_t newLength);
CharString &append(char c, UErrorCode &errorCode); CharString &append(char c, UErrorCode &errorCode);
CharString &append(const StringPiece &s, UErrorCode &errorCode) { CharString &append(StringPiece s, UErrorCode &errorCode) {
return append(s.data(), s.length(), errorCode); return append(s.data(), s.length(), errorCode);
} }
CharString &append(const CharString &s, UErrorCode &errorCode) { CharString &append(const CharString &s, UErrorCode &errorCode) {
@ -115,7 +117,7 @@ public:
* First appends a U_FILE_SEP_CHAR if necessary. * First appends a U_FILE_SEP_CHAR if necessary.
* Does nothing if s is empty. * Does nothing if s is empty.
*/ */
CharString &appendPathPart(const StringPiece &s, UErrorCode &errorCode); CharString &appendPathPart(StringPiece s, UErrorCode &errorCode);
/** /**
* Appends a U_FILE_SEP_CHAR if this string is not empty * Appends a U_FILE_SEP_CHAR if this string is not empty

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
* *

View File

@ -1,7 +1,9 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
* *
* Copyright (C) 1997-2015, International Business Machines * Copyright (C) 1997-2016, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
****************************************************************************** ******************************************************************************
@ -153,6 +155,8 @@ U_NAMESPACE_BEGIN
template<typename T> template<typename T>
class LocalMemory : public LocalPointerBase<T> { class LocalMemory : public LocalPointerBase<T> {
public: public:
using LocalPointerBase<T>::operator*;
using LocalPointerBase<T>::operator->;
/** /**
* Constructor takes ownership. * Constructor takes ownership.
* @param p simple pointer to an array of T items that is adopted * @param p simple pointer to an array of T items that is adopted
@ -279,7 +283,7 @@ inline T *LocalMemory<T>::allocateInsteadAndCopy(int32_t newCapacity, int32_t le
if(length>newCapacity) { if(length>newCapacity) {
length=newCapacity; length=newCapacity;
} }
uprv_memcpy(p, LocalPointerBase<T>::ptr, length*sizeof(T)); uprv_memcpy(p, LocalPointerBase<T>::ptr, (size_t)length*sizeof(T));
} }
uprv_free(LocalPointerBase<T>::ptr); uprv_free(LocalPointerBase<T>::ptr);
LocalPointerBase<T>::ptr=p; LocalPointerBase<T>::ptr=p;
@ -426,7 +430,7 @@ inline T *MaybeStackArray<T, stackCapacity>::resize(int32_t newCapacity, int32_t
if(length>newCapacity) { if(length>newCapacity) {
length=newCapacity; length=newCapacity;
} }
uprv_memcpy(p, ptr, length*sizeof(T)); uprv_memcpy(p, ptr, (size_t)length*sizeof(T));
} }
releaseArray(); releaseArray();
ptr=p; ptr=p;
@ -457,7 +461,7 @@ inline T *MaybeStackArray<T, stackCapacity>::orphanOrClone(int32_t length, int32
if(p==NULL) { if(p==NULL) {
return NULL; return NULL;
} }
uprv_memcpy(p, ptr, length*sizeof(T)); uprv_memcpy(p, ptr, (size_t)length*sizeof(T));
} }
resultCapacity=length; resultCapacity=length;
ptr=stackArray; ptr=stackArray;
@ -605,7 +609,7 @@ inline H *MaybeStackHeaderAndArray<H, T, stackCapacity>::resize(int32_t newCapac
length=newCapacity; length=newCapacity;
} }
} }
uprv_memcpy(p, ptr, sizeof(H)+length*sizeof(T)); uprv_memcpy(p, ptr, sizeof(H)+(size_t)length*sizeof(T));
releaseMemory(); releaseMemory();
ptr=p; ptr=p;
capacity=newCapacity; capacity=newCapacity;
@ -636,7 +640,7 @@ inline H *MaybeStackHeaderAndArray<H, T, stackCapacity>::orphanOrClone(int32_t l
if(p==NULL) { if(p==NULL) {
return NULL; return NULL;
} }
uprv_memcpy(p, ptr, sizeof(H)+length*sizeof(T)); uprv_memcpy(p, ptr, sizeof(H)+(size_t)length*sizeof(T));
} }
resultCapacity=length; resultCapacity=length;
ptr=&stackHeader; ptr=&stackHeader;

View File

@ -1,6 +1,8 @@
// Do not edit with Microsoft Developer Studio Resource Editor. // Do not edit with Microsoft Developer Studio Resource Editor.
// It will permanently substitute version numbers that are intended to be // It will permanently substitute version numbers that are intended to be
// picked up by the pre-processor during each build. // picked up by the pre-processor during each build.
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
// Copyright (c) 2001-2010 International Business Machines // Copyright (c) 2001-2010 International Business Machines
// Corporation and others. All Rights Reserved. // Corporation and others. All Rights Reserved.
// //

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@ -26,21 +26,25 @@
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc> <UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@ -104,7 +108,7 @@
<Culture>0x0409</Culture> <Culture>0x0409</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<OutputFile>..\..\bin\icuuc56.dll</OutputFile> <OutputFile>..\..\bin\icuuc58.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<ProgramDatabaseFile>.\..\..\lib\icuuc.pdb</ProgramDatabaseFile> <ProgramDatabaseFile>.\..\..\lib\icuuc.pdb</ProgramDatabaseFile>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
@ -145,7 +149,7 @@
<Culture>0x0409</Culture> <Culture>0x0409</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<OutputFile>..\..\bin\icuuc56d.dll</OutputFile> <OutputFile>..\..\bin\icuuc58d.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>.\..\..\lib\icuucd.pdb</ProgramDatabaseFile> <ProgramDatabaseFile>.\..\..\lib\icuucd.pdb</ProgramDatabaseFile>
@ -183,7 +187,7 @@
<Culture>0x0409</Culture> <Culture>0x0409</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<OutputFile>..\..\bin64\icuuc56.dll</OutputFile> <OutputFile>..\..\bin64\icuuc58.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<ProgramDatabaseFile>.\..\..\lib64\icuuc.pdb</ProgramDatabaseFile> <ProgramDatabaseFile>.\..\..\lib64\icuuc.pdb</ProgramDatabaseFile>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
@ -222,7 +226,7 @@
<Culture>0x0409</Culture> <Culture>0x0409</Culture>
</ResourceCompile> </ResourceCompile>
<Link> <Link>
<OutputFile>..\..\bin64\icuuc56d.dll</OutputFile> <OutputFile>..\..\bin64\icuuc58d.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>.\..\..\lib64\icuucd.pdb</ProgramDatabaseFile> <ProgramDatabaseFile>.\..\..\lib64\icuucd.pdb</ProgramDatabaseFile>
@ -234,6 +238,7 @@
<ItemGroup> <ItemGroup>
<ClCompile Include="filteredbrk.cpp" /> <ClCompile Include="filteredbrk.cpp" />
<ClCompile Include="ubidi.c" /> <ClCompile Include="ubidi.c" />
<ClCompile Include="ubiditransform.c" />
<ClCompile Include="ubidi_props.c" /> <ClCompile Include="ubidi_props.c" />
<ClCompile Include="ubidiln.c" /> <ClCompile Include="ubidiln.c" />
<ClCompile Include="ubidiwrt.c" /> <ClCompile Include="ubidiwrt.c" />
@ -365,6 +370,7 @@
</ClCompile> </ClCompile>
<ClCompile Include="locbased.cpp" /> <ClCompile Include="locbased.cpp" />
<ClCompile Include="locdispnames.cpp" /> <ClCompile Include="locdispnames.cpp" />
<ClCompile Include="locdspnm.cpp" />
<ClCompile Include="locid.cpp"> <ClCompile Include="locid.cpp">
</ClCompile> </ClCompile>
<ClCompile Include="loclikely.cpp" /> <ClCompile Include="loclikely.cpp" />
@ -379,7 +385,9 @@
<ClCompile Include="uloc_tag.c" /> <ClCompile Include="uloc_tag.c" />
<ClCompile Include="ures_cnv.c" /> <ClCompile Include="ures_cnv.c" />
<ClCompile Include="uresbund.cpp" /> <ClCompile Include="uresbund.cpp" />
<ClCompile Include="uresdata.c" /> <ClCompile Include="uresdata.cpp" />
<ClCompile Include="resource.cpp" />
<ClCompile Include="ucurr.cpp" />
<ClCompile Include="caniter.cpp"> <ClCompile Include="caniter.cpp">
</ClCompile> </ClCompile>
<ClCompile Include="filterednormalizer2.cpp" /> <ClCompile Include="filterednormalizer2.cpp" />
@ -439,12 +447,13 @@
<ClCompile Include="chariter.cpp" /> <ClCompile Include="chariter.cpp" />
<ClCompile Include="charstr.cpp" /> <ClCompile Include="charstr.cpp" />
<ClCompile Include="cstring.c" /> <ClCompile Include="cstring.c" />
<ClCompile Include="cstr.cpp" />
<ClCompile Include="cwchar.c" /> <ClCompile Include="cwchar.c" />
<ClCompile Include="messagepattern.cpp" /> <ClCompile Include="messagepattern.cpp" />
<ClCompile Include="schriter.cpp" /> <ClCompile Include="schriter.cpp" />
<ClCompile Include="stringpiece.cpp" /> <ClCompile Include="stringpiece.cpp" />
<ClCompile Include="stringtriebuilder.cpp" /> <ClCompile Include="stringtriebuilder.cpp" />
<ClCompile Include="simplepatternformatter.cpp" /> <ClCompile Include="simpleformatter.cpp" />
<ClCompile Include="ucasemap.cpp" /> <ClCompile Include="ucasemap.cpp" />
<ClCompile Include="ucasemap_titlecase_brkiter.cpp" /> <ClCompile Include="ucasemap_titlecase_brkiter.cpp" />
<ClCompile Include="ucharstrie.cpp" /> <ClCompile Include="ucharstrie.cpp" />
@ -578,6 +587,7 @@
<ClInclude Include="uchar_props_data.h" /> <ClInclude Include="uchar_props_data.h" />
<ClInclude Include="ucol_data.h" /> <ClInclude Include="ucol_data.h" />
<ClInclude Include="ucol_swp.h" /> <ClInclude Include="ucol_swp.h" />
<ClInclude Include="unicode\ubiditransform.h" />
<ClInclude Include="unistrappender.h" /> <ClInclude Include="unistrappender.h" />
<ClInclude Include="hash.h" /> <ClInclude Include="hash.h" />
<ClInclude Include="propsvec.h" /> <ClInclude Include="propsvec.h" />
@ -1087,7 +1097,34 @@
</CustomBuild> </CustomBuild>
<ClInclude Include="sharedobject.h" /> <ClInclude Include="sharedobject.h" />
<ClCompile Include="sharedobject.cpp" /> <ClCompile Include="sharedobject.cpp" />
<ClInclude Include="simplepatternformatter.h" /> <CustomBuild Include="unicode\locdspnm.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="unicode\simpleformatter.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="unicode\ucat.h"> <CustomBuild Include="unicode\ucat.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
</Command> </Command>
@ -1099,6 +1136,34 @@
</Command> </Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(FullPath)" ..\..\include\unicode <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="unicode\udisplaycontext.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="unicode\uldnames.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(FullPath)" ..\..\include\unicode
</Command> </Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
</CustomBuild> </CustomBuild>
@ -1135,6 +1200,22 @@
<ClInclude Include="uresdata.h" /> <ClInclude Include="uresdata.h" />
<ClInclude Include="uresimp.h" /> <ClInclude Include="uresimp.h" />
<ClInclude Include="ureslocs.h" /> <ClInclude Include="ureslocs.h" />
<ClInclude Include="resource.h" />
<CustomBuild Include="unicode\ucurr.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(FullPath)" ..\..\include\unicode
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\include\unicode\%(Filename)%(Extension);%(Outputs)</Outputs>
</CustomBuild>
<ClInclude Include="ucurrimp.h" />
<CustomBuild Include="unicode\caniter.h"> <CustomBuild Include="unicode\caniter.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode
</Command> </Command>
@ -1449,6 +1530,7 @@
</CustomBuild> </CustomBuild>
<ClInclude Include="charstr.h" /> <ClInclude Include="charstr.h" />
<ClInclude Include="cstring.h" /> <ClInclude Include="cstring.h" />
<ClInclude Include="cstr.h" />
<ClInclude Include="cwchar.h" /> <ClInclude Include="cwchar.h" />
<CustomBuild Include="unicode\messagepattern.h"> <CustomBuild Include="unicode\messagepattern.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" ..\..\include\unicode

View File

@ -277,10 +277,16 @@
<ClCompile Include="dtintrv.cpp"> <ClCompile Include="dtintrv.cpp">
<Filter>formatting</Filter> <Filter>formatting</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="locdspnm.cpp">
<Filter>formatting</Filter>
</ClCompile>
<ClCompile Include="parsepos.cpp"> <ClCompile Include="parsepos.cpp">
<Filter>formatting</Filter> <Filter>formatting</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="simplepatternformatter.cpp"> <ClCompile Include="simpleformatter.cpp">
<Filter>formatting</Filter>
</ClCompile>
<ClCompile Include="ucurr.cpp">
<Filter>formatting</Filter> <Filter>formatting</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="ustrfmt.c"> <ClCompile Include="ustrfmt.c">
@ -343,7 +349,10 @@
<ClCompile Include="uresbund.cpp"> <ClCompile Include="uresbund.cpp">
<Filter>locales &amp; resources</Filter> <Filter>locales &amp; resources</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="uresdata.c"> <ClCompile Include="uresdata.cpp">
<Filter>locales &amp; resources</Filter>
</ClCompile>
<ClCompile Include="resource.cpp">
<Filter>locales &amp; resources</Filter> <Filter>locales &amp; resources</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="caniter.cpp"> <ClCompile Include="caniter.cpp">
@ -463,6 +472,9 @@
<ClCompile Include="cstring.c"> <ClCompile Include="cstring.c">
<Filter>strings</Filter> <Filter>strings</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="cstr.cpp">
<Filter>strings</Filter>
</ClCompile>
<ClCompile Include="cwchar.c"> <ClCompile Include="cwchar.c">
<Filter>strings</Filter> <Filter>strings</Filter>
</ClCompile> </ClCompile>
@ -574,13 +586,18 @@
<ClCompile Include="stringtriebuilder.cpp"> <ClCompile Include="stringtriebuilder.cpp">
<Filter>collections</Filter> <Filter>collections</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="icuplug.cpp" />
<ClCompile Include="uloc_keytype.cpp"> <ClCompile Include="uloc_keytype.cpp">
<Filter>locales &amp; resources</Filter> <Filter>locales &amp; resources</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="filteredbrk.cpp"> <ClCompile Include="filteredbrk.cpp">
<Filter>break iteration</Filter> <Filter>break iteration</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="icuplug.cpp">
<Filter>registration</Filter>
</ClCompile>
<ClCompile Include="ubiditransform.c">
<Filter>bidi</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="ubidi_props.h"> <ClInclude Include="ubidi_props.h">
@ -745,15 +762,30 @@
<ClInclude Include="umapfile.h"> <ClInclude Include="umapfile.h">
<Filter>data &amp; memory</Filter> <Filter>data &amp; memory</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="simplepatternformatter.h"> <CustomBuild Include="unicode\locdspnm.h">
<Filter>formatting</Filter> <Filter>formatting</Filter>
</ClInclude> </CustomBuild>
<CustomBuild Include="unicode\simpleformatter.h">
<Filter>formatting</Filter>
</CustomBuild>
<ClInclude Include="ustrfmt.h"> <ClInclude Include="ustrfmt.h">
<Filter>formatting</Filter> <Filter>formatting</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="util.h"> <ClInclude Include="util.h">
<Filter>formatting</Filter> <Filter>formatting</Filter>
</ClInclude> </ClInclude>
<CustomBuild Include="unicode\ucurr.h">
<Filter>formatting</Filter>
</CustomBuild>
<ClInclude Include="ucurrimp.h">
<Filter>formatting</Filter>
</ClInclude>
<CustomBuild Include="unicode\udisplaycontext.h">
<Filter>formatting</Filter>
</CustomBuild>
<CustomBuild Include="unicode\uldnames.h">
<Filter>formatting</Filter>
</CustomBuild>
<ClInclude Include="punycode.h"> <ClInclude Include="punycode.h">
<Filter>idna</Filter> <Filter>idna</Filter>
</ClInclude> </ClInclude>
@ -769,6 +801,9 @@
<ClInclude Include="uresdata.h"> <ClInclude Include="uresdata.h">
<Filter>locales &amp; resources</Filter> <Filter>locales &amp; resources</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="resource.h">
<Filter>locales &amp; resources</Filter>
</ClInclude>
<ClInclude Include="uresimp.h"> <ClInclude Include="uresimp.h">
<Filter>locales &amp; resources</Filter> <Filter>locales &amp; resources</Filter>
</ClInclude> </ClInclude>
@ -829,6 +864,9 @@
<ClInclude Include="cstring.h"> <ClInclude Include="cstring.h">
<Filter>strings</Filter> <Filter>strings</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="cstr.h">
<Filter>strings</Filter>
</ClInclude>
<ClInclude Include="cwchar.h"> <ClInclude Include="cwchar.h">
<Filter>strings</Filter> <Filter>strings</Filter>
</ClInclude> </ClInclude>
@ -877,6 +915,9 @@
<ClInclude Include="unicode\filteredbrk.h"> <ClInclude Include="unicode\filteredbrk.h">
<Filter>break iteration</Filter> <Filter>break iteration</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="unicode\ubiditransform.h">
<Filter>bidi</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="common.rc"> <ResourceCompile Include="common.rc">

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
* *
@ -24,45 +26,45 @@
static static
inline void uprv_arrayCopy(const double* src, double* dst, int32_t count) inline void uprv_arrayCopy(const double* src, double* dst, int32_t count)
{ uprv_memcpy(dst, src, (size_t)(count * sizeof(*src))); } { uprv_memcpy(dst, src, (size_t)count * sizeof(*src)); }
static static
inline void uprv_arrayCopy(const double* src, int32_t srcStart, inline void uprv_arrayCopy(const double* src, int32_t srcStart,
double* dst, int32_t dstStart, int32_t count) double* dst, int32_t dstStart, int32_t count)
{ uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); } { uprv_memcpy(dst+dstStart, src+srcStart, (size_t)count * sizeof(*src)); }
static static
inline void uprv_arrayCopy(const int8_t* src, int8_t* dst, int32_t count) inline void uprv_arrayCopy(const int8_t* src, int8_t* dst, int32_t count)
{ uprv_memcpy(dst, src, (size_t)(count * sizeof(*src))); } { uprv_memcpy(dst, src, (size_t)count * sizeof(*src)); }
static static
inline void uprv_arrayCopy(const int8_t* src, int32_t srcStart, inline void uprv_arrayCopy(const int8_t* src, int32_t srcStart,
int8_t* dst, int32_t dstStart, int32_t count) int8_t* dst, int32_t dstStart, int32_t count)
{ uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); } { uprv_memcpy(dst+dstStart, src+srcStart, (size_t)count * sizeof(*src)); }
static static
inline void uprv_arrayCopy(const int16_t* src, int16_t* dst, int32_t count) inline void uprv_arrayCopy(const int16_t* src, int16_t* dst, int32_t count)
{ uprv_memcpy(dst, src, (size_t)(count * sizeof(*src))); } { uprv_memcpy(dst, src, (size_t)count * sizeof(*src)); }
static static
inline void uprv_arrayCopy(const int16_t* src, int32_t srcStart, inline void uprv_arrayCopy(const int16_t* src, int32_t srcStart,
int16_t* dst, int32_t dstStart, int32_t count) int16_t* dst, int32_t dstStart, int32_t count)
{ uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); } { uprv_memcpy(dst+dstStart, src+srcStart, (size_t)count * sizeof(*src)); }
static static
inline void uprv_arrayCopy(const int32_t* src, int32_t* dst, int32_t count) inline void uprv_arrayCopy(const int32_t* src, int32_t* dst, int32_t count)
{ uprv_memcpy(dst, src, (size_t)(count * sizeof(*src))); } { uprv_memcpy(dst, src, (size_t)count * sizeof(*src)); }
static static
inline void uprv_arrayCopy(const int32_t* src, int32_t srcStart, inline void uprv_arrayCopy(const int32_t* src, int32_t srcStart,
int32_t* dst, int32_t dstStart, int32_t count) int32_t* dst, int32_t dstStart, int32_t count)
{ uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); } { uprv_memcpy(dst+dstStart, src+srcStart, (size_t)count * sizeof(*src)); }
static static
inline void inline void
uprv_arrayCopy(const UChar *src, int32_t srcStart, uprv_arrayCopy(const UChar *src, int32_t srcStart,
UChar *dst, int32_t dstStart, int32_t count) UChar *dst, int32_t dstStart, int32_t count)
{ uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); } { uprv_memcpy(dst+dstStart, src+srcStart, (size_t)count * sizeof(*src)); }
/** /**
* Copy an array of UnicodeString OBJECTS (not pointers). * Copy an array of UnicodeString OBJECTS (not pointers).

View File

@ -0,0 +1,54 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2015-2016, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* file name: charstr.cpp
*/
#include "unicode/utypes.h"
#include "unicode/putil.h"
#include "unicode/unistr.h"
#include "cstr.h"
#include "charstr.h"
#include "uinvchar.h"
U_NAMESPACE_BEGIN
CStr::CStr(const UnicodeString &in) {
UErrorCode status = U_ZERO_ERROR;
#if !UCONFIG_NO_CONVERSION || U_CHARSET_IS_UTF8
int32_t length = in.extract(0, in.length(), static_cast<char *>(NULL), static_cast<uint32_t>(0));
int32_t resultCapacity = 0;
char *buf = s.getAppendBuffer(length, length, resultCapacity, status);
if (U_SUCCESS(status)) {
in.extract(0, in.length(), buf, resultCapacity);
s.append(buf, length, status);
}
#else
// No conversion available. Convert any invariant characters; substitute '?' for the rest.
// Note: can't just call u_UCharsToChars() or CharString.appendInvariantChars() on the
// whole string because they require that the entire input be invariant.
char buf[2];
for (int i=0; i<in.length(); i = in.moveIndex32(i, 1)) {
if (uprv_isInvariantUString(in.getBuffer()+i, 1)) {
u_UCharsToChars(in.getBuffer()+i, buf, 1);
} else {
buf[0] = '?';
}
s.append(buf, 1, status);
}
#endif
}
CStr::~CStr() {
}
const char * CStr::operator ()() const {
return s.data();
}
U_NAMESPACE_END

View File

@ -0,0 +1,60 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
******************************************************************************
*
* Copyright (C) 2016, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
*
* File: cstr.h
*/
#ifndef CSTR_H
#define CSTR_H
#include "unicode/unistr.h"
#include "unicode/uobject.h"
#include "unicode/utypes.h"
#include "charstr.h"
/**
* ICU-internal class CStr, a small helper class to facilitate passing UnicodeStrings
* to functions needing (const char *) strings, such as printf().
*
* It is intended primarily for use in debugging or in tests. Uses platform
* default code page conversion, which will do the best job possible,
* but may be lossy, depending on the platform.
*
* If no other conversion is available, use invariant conversion and substitue
* '?' for non-invariant characters.
*
* Example Usage:
* UnicodeString s = whatever;
* printf("%s", CStr(s)());
*
* The explicit call to the CStr() constructor creates a temporary object.
* Operator () on the temporary object returns a (const char *) pointer.
* The lifetime of the (const char *) data is that of the temporary object,
* which works well when passing it as a parameter to another function, such as printf.
*/
U_NAMESPACE_BEGIN
class U_COMMON_API CStr : public UMemory {
public:
CStr(const UnicodeString &in);
~CStr();
const char * operator ()() const;
private:
CharString s;
CStr(const CStr &other); // Forbid copying of this class.
CStr &operator =(const CStr &other); // Forbid assignment.
};
U_NAMESPACE_END
#endif

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
* *

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
* *

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
* *

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
* *

View File

@ -1,6 +1,8 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/** /**
******************************************************************************* *******************************************************************************
* Copyright (C) 2006-2015, International Business Machines Corporation * Copyright (C) 2006-2016, International Business Machines Corporation
* and others. All Rights Reserved. * and others. All Rights Reserved.
******************************************************************************* *******************************************************************************
*/ */
@ -70,13 +72,13 @@ DictionaryBreakEngine::findBreaks( UText *text,
rangeStart = current; rangeStart = current;
if (!isDict) { if (!isDict) {
utext_next32(text); utext_next32(text);
rangeStart = utext_getNativeIndex(text); rangeStart = (int32_t)utext_getNativeIndex(text);
} }
} }
// rangeEnd = start + 1; // rangeEnd = start + 1;
utext_setNativeIndex(text, start); utext_setNativeIndex(text, start);
utext_next32(text); utext_next32(text);
rangeEnd = utext_getNativeIndex(text); rangeEnd = (int32_t)utext_getNativeIndex(text);
} }
else { else {
while((current = (int32_t)utext_getNativeIndex(text)) < endPos && fSet.contains(c)) { while((current = (int32_t)utext_getNativeIndex(text)) < endPos && fSet.contains(c)) {
@ -335,9 +337,9 @@ foundBest:
UChar32 pc; UChar32 pc;
int32_t chars = 0; int32_t chars = 0;
for (;;) { for (;;) {
int32_t pcIndex = utext_getNativeIndex(text); int32_t pcIndex = (int32_t)utext_getNativeIndex(text);
pc = utext_next32(text); pc = utext_next32(text);
int32_t pcSize = utext_getNativeIndex(text) - pcIndex; int32_t pcSize = (int32_t)utext_getNativeIndex(text) - pcIndex;
chars += pcSize; chars += pcSize;
remaining -= pcSize; remaining -= pcSize;
if (remaining <= 0) { if (remaining <= 0) {
@ -390,9 +392,9 @@ foundBest:
if (!fSuffixSet.contains(utext_previous32(text))) { if (!fSuffixSet.contains(utext_previous32(text))) {
// Skip over previous end and PAIYANNOI // Skip over previous end and PAIYANNOI
utext_next32(text); utext_next32(text);
int32_t paiyannoiIndex = utext_getNativeIndex(text); int32_t paiyannoiIndex = (int32_t)utext_getNativeIndex(text);
utext_next32(text); utext_next32(text);
cuWordLength += utext_getNativeIndex(text) - paiyannoiIndex; // Add PAIYANNOI to word cuWordLength += (int32_t)utext_getNativeIndex(text) - paiyannoiIndex; // Add PAIYANNOI to word
uc = utext_current32(text); // Fetch next character uc = utext_current32(text); // Fetch next character
} }
else { else {
@ -404,9 +406,9 @@ foundBest:
if (utext_previous32(text) != THAI_MAIYAMOK) { if (utext_previous32(text) != THAI_MAIYAMOK) {
// Skip over previous end and MAIYAMOK // Skip over previous end and MAIYAMOK
utext_next32(text); utext_next32(text);
int32_t maiyamokIndex = utext_getNativeIndex(text); int32_t maiyamokIndex = (int32_t)utext_getNativeIndex(text);
utext_next32(text); utext_next32(text);
cuWordLength += utext_getNativeIndex(text) - maiyamokIndex; // Add MAIYAMOK to word cuWordLength += (int32_t)utext_getNativeIndex(text) - maiyamokIndex; // Add MAIYAMOK to word
} }
else { else {
// Restore prior position // Restore prior position
@ -568,9 +570,9 @@ foundBest:
UChar32 uc; UChar32 uc;
int32_t chars = 0; int32_t chars = 0;
for (;;) { for (;;) {
int32_t pcIndex = utext_getNativeIndex(text); int32_t pcIndex = (int32_t)utext_getNativeIndex(text);
pc = utext_next32(text); pc = utext_next32(text);
int32_t pcSize = utext_getNativeIndex(text) - pcIndex; int32_t pcSize = (int32_t)utext_getNativeIndex(text) - pcIndex;
chars += pcSize; chars += pcSize;
remaining -= pcSize; remaining -= pcSize;
if (remaining <= 0) { if (remaining <= 0) {
@ -761,9 +763,9 @@ foundBest:
UChar32 uc; UChar32 uc;
int32_t chars = 0; int32_t chars = 0;
for (;;) { for (;;) {
int32_t pcIndex = utext_getNativeIndex(text); int32_t pcIndex = (int32_t)utext_getNativeIndex(text);
pc = utext_next32(text); pc = utext_next32(text);
int32_t pcSize = utext_getNativeIndex(text) - pcIndex; int32_t pcSize = (int32_t)utext_getNativeIndex(text) - pcIndex;
chars += pcSize; chars += pcSize;
remaining -= pcSize; remaining -= pcSize;
if (remaining <= 0) { if (remaining <= 0) {
@ -967,9 +969,9 @@ foundBest:
UChar32 uc; UChar32 uc;
int32_t chars = 0; int32_t chars = 0;
for (;;) { for (;;) {
int32_t pcIndex = utext_getNativeIndex(text); int32_t pcIndex = (int32_t)utext_getNativeIndex(text);
pc = utext_next32(text); pc = utext_next32(text);
int32_t pcSize = utext_getNativeIndex(text) - pcIndex; int32_t pcSize = (int32_t)utext_getNativeIndex(text) - pcIndex;
chars += pcSize; chars += pcSize;
remaining -= pcSize; remaining -= pcSize;
if (remaining <= 0) { if (remaining <= 0) {
@ -1166,14 +1168,14 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
int32_t limit = rangeEnd; int32_t limit = rangeEnd;
U_ASSERT(limit <= utext_nativeLength(inText)); U_ASSERT(limit <= utext_nativeLength(inText));
if (limit > utext_nativeLength(inText)) { if (limit > utext_nativeLength(inText)) {
limit = utext_nativeLength(inText); limit = (int32_t)utext_nativeLength(inText);
} }
inputMap.adoptInsteadAndCheckErrorCode(new UVector32(status), status); inputMap.adoptInsteadAndCheckErrorCode(new UVector32(status), status);
if (U_FAILURE(status)) { if (U_FAILURE(status)) {
return 0; return 0;
} }
while (utext_getNativeIndex(inText) < limit) { while (utext_getNativeIndex(inText) < limit) {
int32_t nativePosition = utext_getNativeIndex(inText); int32_t nativePosition = (int32_t)utext_getNativeIndex(inText);
UChar32 c = utext_next32(inText); UChar32 c = utext_next32(inText);
U_ASSERT(c != U_SENTINEL); U_ASSERT(c != U_SENTINEL);
inString.append(c); inString.append(c);
@ -1293,6 +1295,7 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
// ix is the corresponding string (code unit) index. // ix is the corresponding string (code unit) index.
// They differ when the string contains supplementary characters. // They differ when the string contains supplementary characters.
int32_t ix = 0; int32_t ix = 0;
bool is_prev_katakana = false;
for (int32_t i = 0; i < numCodePts; ++i, ix = inString.moveIndex32(ix, 1)) { for (int32_t i = 0; i < numCodePts; ++i, ix = inString.moveIndex32(ix, 1)) {
if ((uint32_t)bestSnlp.elementAti(i) == kuint32max) { if ((uint32_t)bestSnlp.elementAti(i) == kuint32max) {
continue; continue;
@ -1306,7 +1309,7 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
// The NULL parameter is the ignored code unit lengths. // The NULL parameter is the ignored code unit lengths.
// if there are no single character matches found in the dictionary // if there are no single character matches found in the dictionary
// starting with this charcter, treat character as a 1-character word // starting with this character, treat character as a 1-character word
// with the highest value possible, i.e. the least likely to occur. // with the highest value possible, i.e. the least likely to occur.
// Exclude Korean characters from this treatment, as they should be left // Exclude Korean characters from this treatment, as they should be left
// together by default. // together by default.
@ -1331,7 +1334,6 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText,
// characters is considered a candidate word with a default cost // characters is considered a candidate word with a default cost
// specified in the katakanaCost table according to its length. // specified in the katakanaCost table according to its length.
bool is_prev_katakana = false;
bool is_katakana = isKatakana(inString.char32At(ix)); bool is_katakana = isKatakana(inString.char32At(ix));
int32_t katakanaRunLength = 1; int32_t katakanaRunLength = 1;
if (!is_prev_katakana && is_katakana) { if (!is_prev_katakana && is_katakana) {

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/** /**
******************************************************************************* *******************************************************************************
* Copyright (C) 2006-2014, International Business Machines Corporation * * Copyright (C) 2006-2014, International Business Machines Corporation *

View File

@ -1,6 +1,8 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
* Copyright (C) 2014, International Business Machines * Copyright (C) 2014-2016, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
******************************************************************************* *******************************************************************************
* dictionarydata.h * dictionarydata.h
@ -45,13 +47,13 @@ int32_t UCharsDictionaryMatcher::matches(UText *text, int32_t maxLength, int32_t
int32_t *prefix) const { int32_t *prefix) const {
UCharsTrie uct(characters); UCharsTrie uct(characters);
int32_t startingTextIndex = utext_getNativeIndex(text); int32_t startingTextIndex = (int32_t)utext_getNativeIndex(text);
int32_t wordCount = 0; int32_t wordCount = 0;
int32_t codePointsMatched = 0; int32_t codePointsMatched = 0;
for (UChar32 c = utext_next32(text); c >= 0; c=utext_next32(text)) { for (UChar32 c = utext_next32(text); c >= 0; c=utext_next32(text)) {
UStringTrieResult result = (codePointsMatched == 0) ? uct.first(c) : uct.next(c); UStringTrieResult result = (codePointsMatched == 0) ? uct.first(c) : uct.next(c);
int32_t lengthMatched = utext_getNativeIndex(text) - startingTextIndex; int32_t lengthMatched = (int32_t)utext_getNativeIndex(text) - startingTextIndex;
codePointsMatched += 1; codePointsMatched += 1;
if (USTRINGTRIE_HAS_VALUE(result)) { if (USTRINGTRIE_HAS_VALUE(result)) {
if (wordCount < limit) { if (wordCount < limit) {
@ -112,13 +114,13 @@ int32_t BytesDictionaryMatcher::matches(UText *text, int32_t maxLength, int32_t
int32_t *lengths, int32_t *cpLengths, int32_t *values, int32_t *lengths, int32_t *cpLengths, int32_t *values,
int32_t *prefix) const { int32_t *prefix) const {
BytesTrie bt(characters); BytesTrie bt(characters);
int32_t startingTextIndex = utext_getNativeIndex(text); int32_t startingTextIndex = (int32_t)utext_getNativeIndex(text);
int32_t wordCount = 0; int32_t wordCount = 0;
int32_t codePointsMatched = 0; int32_t codePointsMatched = 0;
for (UChar32 c = utext_next32(text); c >= 0; c=utext_next32(text)) { for (UChar32 c = utext_next32(text); c >= 0; c=utext_next32(text)) {
UStringTrieResult result = (codePointsMatched == 0) ? bt.first(transform(c)) : bt.next(transform(c)); UStringTrieResult result = (codePointsMatched == 0) ? bt.first(transform(c)) : bt.next(transform(c));
int32_t lengthMatched = utext_getNativeIndex(text) - startingTextIndex; int32_t lengthMatched = (int32_t)utext_getNativeIndex(text) - startingTextIndex;
codePointsMatched += 1; codePointsMatched += 1;
if (USTRINGTRIE_HAS_VALUE(result)) { if (USTRINGTRIE_HAS_VALUE(result)) {
if (wordCount < limit) { if (wordCount < limit) {

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
* Copyright (C) 2014, International Business Machines * Copyright (C) 2014, International Business Machines

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/******************************************************************************* /*******************************************************************************
* Copyright (C) 2008, International Business Machines Corporation and * Copyright (C) 2008, International Business Machines Corporation and
* others. All Rights Reserved. * others. All Rights Reserved.

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
* *

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
* Copyright (C) 2014-2015, International Business Machines Corporation and * Copyright (C) 2014-2015, International Business Machines Corporation and
@ -401,7 +403,8 @@ SimpleFilteredSentenceBreakIterator::next() {
int32_t int32_t
SimpleFilteredSentenceBreakIterator::first(void) { SimpleFilteredSentenceBreakIterator::first(void) {
return internalNext(fDelegate->first()); // Don't suppress a break opportunity at the beginning of text.
return fDelegate->first();
} }
int32_t int32_t
@ -417,6 +420,8 @@ SimpleFilteredSentenceBreakIterator::previous(void) {
UBool SimpleFilteredSentenceBreakIterator::isBoundary(int32_t offset) { UBool SimpleFilteredSentenceBreakIterator::isBoundary(int32_t offset) {
if (!fDelegate->isBoundary(offset)) return false; // no break to suppress if (!fDelegate->isBoundary(offset)) return false; // no break to suppress
if (fData->fBackwardsTrie.isNull()) return true; // no data = no suppressions
UErrorCode status = U_ZERO_ERROR; UErrorCode status = U_ZERO_ERROR;
resetState(status); resetState(status);
@ -476,13 +481,42 @@ SimpleFilteredBreakIteratorBuilder::SimpleFilteredBreakIteratorBuilder(const Loc
: fSet(status) : fSet(status)
{ {
if(U_SUCCESS(status)) { if(U_SUCCESS(status)) {
LocalUResourceBundlePointer b(ures_open(U_ICUDATA_BRKITR, fromLocale.getBaseName(), &status)); UErrorCode subStatus = U_ZERO_ERROR;
LocalUResourceBundlePointer exceptions(ures_getByKeyWithFallback(b.getAlias(), "exceptions", NULL, &status)); LocalUResourceBundlePointer b(ures_open(U_ICUDATA_BRKITR, fromLocale.getBaseName(), &subStatus));
LocalUResourceBundlePointer breaks(ures_getByKeyWithFallback(exceptions.getAlias(), "SentenceBreak", NULL, &status)); if (U_FAILURE(subStatus) || (subStatus == U_USING_DEFAULT_WARNING) ) {
if(U_FAILURE(status)) return; // leaves the builder empty, if you try to use it. status = subStatus; // copy the failing status
#if FB_DEBUG
fprintf(stderr, "open BUNDLE %s : %s, %s\n", fromLocale.getBaseName(), "[exit]", u_errorName(status));
#endif
return; // leaves the builder empty, if you try to use it.
}
LocalUResourceBundlePointer exceptions(ures_getByKeyWithFallback(b.getAlias(), "exceptions", NULL, &subStatus));
if (U_FAILURE(subStatus) || (subStatus == U_USING_DEFAULT_WARNING) ) {
status = subStatus; // copy the failing status
#if FB_DEBUG
fprintf(stderr, "open EXCEPTIONS %s : %s, %s\n", fromLocale.getBaseName(), "[exit]", u_errorName(status));
#endif
return; // leaves the builder empty, if you try to use it.
}
LocalUResourceBundlePointer breaks(ures_getByKeyWithFallback(exceptions.getAlias(), "SentenceBreak", NULL, &subStatus));
#if FB_DEBUG
{
UErrorCode subsub = subStatus;
fprintf(stderr, "open SentenceBreak %s => %s, %s\n", fromLocale.getBaseName(), ures_getLocale(breaks.getAlias(), &subsub), u_errorName(subStatus));
}
#endif
if (U_FAILURE(subStatus) || (subStatus == U_USING_DEFAULT_WARNING) ) {
status = subStatus; // copy the failing status
#if FB_DEBUG
fprintf(stderr, "open %s : %s, %s\n", fromLocale.getBaseName(), "[exit]", u_errorName(status));
#endif
return; // leaves the builder empty, if you try to use it.
}
LocalUResourceBundlePointer strs; LocalUResourceBundlePointer strs;
UErrorCode subStatus = status; subStatus = status; // Pick up inherited warning status now
do { do {
strs.adoptInstead(ures_getNextResource(breaks.getAlias(), strs.orphan(), &subStatus)); strs.adoptInstead(ures_getNextResource(breaks.getAlias(), strs.orphan(), &subStatus));
if(strs.isValid() && U_SUCCESS(subStatus)) { if(strs.isValid() && U_SUCCESS(subStatus)) {

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
* *

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
* Copyright (C) 1997-2014, International Business Machines * Copyright (C) 1997-2014, International Business Machines

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
* *

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
* *

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
****************************************************************************** ******************************************************************************
* *

View File

@ -1,7 +1,9 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
* *
* Copyright (C) 2013-2014, International Business Machines * Copyright (C) 2013-2016, International Business Machines
* Corporation and others. All Rights Reserved. * Corporation and others. All Rights Reserved.
* *
******************************************************************************* *******************************************************************************
@ -15,7 +17,7 @@
*/ */
#include "unicode/listformatter.h" #include "unicode/listformatter.h"
#include "simplepatternformatter.h" #include "unicode/simpleformatter.h"
#include "mutex.h" #include "mutex.h"
#include "hash.h" #include "hash.h"
#include "cstring.h" #include "cstring.h"
@ -27,26 +29,27 @@
U_NAMESPACE_BEGIN U_NAMESPACE_BEGIN
struct ListFormatInternal : public UMemory { struct ListFormatInternal : public UMemory {
SimplePatternFormatter twoPattern; SimpleFormatter twoPattern;
SimplePatternFormatter startPattern; SimpleFormatter startPattern;
SimplePatternFormatter middlePattern; SimpleFormatter middlePattern;
SimplePatternFormatter endPattern; SimpleFormatter endPattern;
ListFormatInternal( ListFormatInternal(
const UnicodeString& two, const UnicodeString& two,
const UnicodeString& start, const UnicodeString& start,
const UnicodeString& middle, const UnicodeString& middle,
const UnicodeString& end) : const UnicodeString& end,
twoPattern(two), UErrorCode &errorCode) :
startPattern(start), twoPattern(two, 2, 2, errorCode),
middlePattern(middle), startPattern(start, 2, 2, errorCode),
endPattern(end) {} middlePattern(middle, 2, 2, errorCode),
endPattern(end, 2, 2, errorCode) {}
ListFormatInternal(const ListFormatData &data) : ListFormatInternal(const ListFormatData &data, UErrorCode &errorCode) :
twoPattern(data.twoPattern), twoPattern(data.twoPattern, errorCode),
startPattern(data.startPattern), startPattern(data.startPattern, errorCode),
middlePattern(data.middlePattern), middlePattern(data.middlePattern, errorCode),
endPattern(data.endPattern) { } endPattern(data.endPattern, errorCode) { }
ListFormatInternal(const ListFormatInternal &other) : ListFormatInternal(const ListFormatInternal &other) :
twoPattern(other.twoPattern), twoPattern(other.twoPattern),
@ -191,11 +194,15 @@ static ListFormatInternal* loadListFormatInternal(
if (U_FAILURE(errorCode)) { if (U_FAILURE(errorCode)) {
return NULL; return NULL;
} }
ListFormatInternal* result = new ListFormatInternal(two, start, middle, end); ListFormatInternal* result = new ListFormatInternal(two, start, middle, end, errorCode);
if (result == NULL) { if (result == NULL) {
errorCode = U_MEMORY_ALLOCATION_ERROR; errorCode = U_MEMORY_ALLOCATION_ERROR;
return NULL; return NULL;
} }
if (U_FAILURE(errorCode)) {
delete result;
return NULL;
}
return result; return result;
} }
@ -231,8 +238,8 @@ ListFormatter* ListFormatter::createInstance(const Locale& locale, const char *s
return p; return p;
} }
ListFormatter::ListFormatter(const ListFormatData& listFormatData) { ListFormatter::ListFormatter(const ListFormatData& listFormatData, UErrorCode &errorCode) {
owned = new ListFormatInternal(listFormatData); owned = new ListFormatInternal(listFormatData, errorCode);
data = owned; data = owned;
} }
@ -252,7 +259,7 @@ ListFormatter::~ListFormatter() {
* according to pat. Any previous value of result gets replaced. * according to pat. Any previous value of result gets replaced.
*/ */
static void joinStringsAndReplace( static void joinStringsAndReplace(
const SimplePatternFormatter& pat, const SimpleFormatter& pat,
const UnicodeString& first, const UnicodeString& first,
const UnicodeString& second, const UnicodeString& second,
UnicodeString &result, UnicodeString &result,

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
* Copyright (C) 2014, International Business Machines * Copyright (C) 2014, International Business Machines

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
*************************************************************************** ***************************************************************************
* Copyright (C) 2006 International Business Machines Corporation * * Copyright (C) 2006 International Business Machines Corporation *

View File

@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/* /*
******************************************************************************* *******************************************************************************
* *

Some files were not shown because too many files have changed in this diff Show More