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

Unified Diff: source/tools/toolutil/ucbuf.c

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/tools/toolutil/toolutil.vcxproj ('k') | source/tools/toolutil/ucln_tu.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/tools/toolutil/ucbuf.c
diff --git a/source/tools/toolutil/ucbuf.c b/source/tools/toolutil/ucbuf.c
index 23f2c9f195c807f122158dbcd378bae5467c8c16..93dbba133dc703e5d43693e121899daa10157b9b 100644
--- a/source/tools/toolutil/ucbuf.c
+++ b/source/tools/toolutil/ucbuf.c
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
-* Copyright (C) 1998-2011, International Business Machines
+* Copyright (C) 1998-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -176,7 +176,7 @@ ucbuf_fillucbuf( UCHARBUF* buf,UErrorCode* error){
memmove(buf->buffer,buf->currentPos,offset* sizeof(UChar));
}
-#if DEBUG
+#if UCBUF_DEBUG
memset(pTarget+offset,0xff,sizeof(UChar)*(MAX_IN_BUF-offset));
#endif
if(buf->isBuffered){
@@ -293,8 +293,7 @@ ucbuf_fillucbuf( UCHARBUF* buf,UErrorCode* error){
}
outputWritten = (int32_t)(target - pTarget);
-
-#if DEBUG
+#if UCBUF_DEBUG
{
int i;
target = pTarget;
@@ -739,7 +738,7 @@ ucbuf_readline(UCHARBUF* buf,int32_t* len,UErrorCode* err){
* CR, CR+LF, LF, NEL, PS, LS or FF as line seperators
*/
/* Windows CR LF */
- if(c ==0x0d && temp+1<=buf->bufLimit && *(temp+1) == 0x0a ){
+ if(c ==0x0d && temp <= buf->bufLimit && *temp == 0x0a ){
*len = (int32_t)(temp++ - buf->currentPos);
savePos = buf->currentPos;
buf->currentPos = temp;
@@ -765,7 +764,7 @@ ucbuf_readline(UCHARBUF* buf,int32_t* len,UErrorCode* err){
return NULL; /* end of file is reached return NULL */
}
/* Windows CR LF */
- if(c ==0x0d && temp+1<=buf->bufLimit && *(temp+1) == 0x0a ){
+ if(c ==0x0d && temp <= buf->bufLimit && *temp == 0x0a ){
*len = (int32_t)(temp++ - buf->currentPos);
savePos = buf->currentPos;
buf->currentPos = temp;
« no previous file with comments | « source/tools/toolutil/toolutil.vcxproj ('k') | source/tools/toolutil/ucln_tu.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698