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; |