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

Unified Diff: source/samples/ucnv/convsamp.cpp

Issue 2436413002: Update to ICU 58rc step 1
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/samples/ucnv/Makefile ('k') | source/samples/ucnv/data06.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/samples/ucnv/convsamp.cpp
diff --git a/source/samples/ucnv/convsamp.cpp b/source/samples/ucnv/convsamp.cpp
index fb17f500038ae5c04b579a127c29d8bcf873a822..139e948efe356d3d293f21362b8ce8be47d3bd15 100644
--- a/source/samples/ucnv/convsamp.cpp
+++ b/source/samples/ucnv/convsamp.cpp
@@ -1,6 +1,12 @@
-/**************************************************************************
+/*************************************************************************
*
-* Copyright (C) 2000-2013, International Business Machines
+* Copyright (C) 2016 and later: Unicode, Inc. and others.
+* License & terms of use: http://www.unicode.org/copyright.html#License
+*
+**************************************************************************
+**************************************************************************
+*
+* Copyright (C) 2000-2016, International Business Machines
* Corporation and others. All Rights Reserved.
*
***************************************************************************
@@ -33,6 +39,7 @@
#include <string.h>
#include <stdlib.h> /* malloc */
+#include "cmemory.h"
#include "unicode/utypes.h" /* Basic ICU data types */
#include "unicode/ucnv.h" /* C Converter API */
#include "unicode/ustring.h" /* some more string fcns*/
@@ -1086,7 +1093,7 @@ void convsample_50() {
conv = ucnv_open(encoding, &err);
// do the conversion
ucnv_toUnicode(conv,
- &target, output + sizeof(output)/U_SIZEOF_UCHAR,
+ &target, output + UPRV_LENGTHOF(output),
&source, input + sizeof(input),
NULL, TRUE, &err);
out = output;
« no previous file with comments | « source/samples/ucnv/Makefile ('k') | source/samples/ucnv/data06.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698