From: Steven R. Loomis Date: Wed, 25 Jun 2014 21:59:55 +0000 (+0000) Subject: ICU-10977 remove stray #if DEBUG from a few more files X-Git-Tag: milestone-59-0-1~1839 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3433c4d459099ef304450827e04753d993bbb79;p=icu ICU-10977 remove stray #if DEBUG from a few more files X-SVN-Rev: 35948 --- diff --git a/icu4c/source/i18n/rbnf.cpp b/icu4c/source/i18n/rbnf.cpp index 894e6b6d2a3..4bd7c2ccd5b 100644 --- a/icu4c/source/i18n/rbnf.cpp +++ b/icu4c/source/i18n/rbnf.cpp @@ -32,9 +32,9 @@ #include "uresimp.h" // debugging -// #define DEBUG +// #define RBNF_DEBUG -#ifdef DEBUG +#ifdef RBNF_DEBUG #include "stdio.h" #endif @@ -327,7 +327,7 @@ private: UChar* nextString(void); }; -#ifdef DEBUG +#ifdef RBNF_DEBUG #define ERROR(msg) parseError(msg); return NULL; #define EXPLANATION_ARG explanationArg #else @@ -556,7 +556,7 @@ void LocDataParser::parseError(const char* EXPLANATION_ARG) pe.postContext[limit-p] = 0; pe.offset = (int32_t)(p - data); -#ifdef DEBUG +#ifdef RBNF_DEBUG fprintf(stderr, "%s at or near character %ld: ", EXPLANATION_ARG, p-data); UnicodeString msg; diff --git a/icu4c/source/layout/KernTable.cpp b/icu4c/source/layout/KernTable.cpp index 866e2cea7b6..700053248d0 100644 --- a/icu4c/source/layout/KernTable.cpp +++ b/icu4c/source/layout/KernTable.cpp @@ -1,7 +1,7 @@ /* * @(#)KernTable.cpp 1.1 04/10/13 * - * (C) Copyright IBM Corp. 2004-2013 - All Rights Reserved + * (C) Copyright IBM Corp. 2004-2014 - All Rights Reserved * */ @@ -14,7 +14,7 @@ #include -#define DEBUG 0 +#define KERNTABLE_DEBUG 0 U_NAMESPACE_BEGIN @@ -78,14 +78,14 @@ KernTable::KernTable(const LETableReference& base, LEErrorCode &success) : pairs(), fTable(base) { if(LE_FAILURE(success) || fTable.isEmpty()) { -#if DEBUG +#if KERNTABLE_DEBUG fprintf(stderr, "no kern data\n"); #endif return; } LEReferenceTo header(fTable, success); -#if DEBUG +#if KERNTABLE_DEBUG // dump first 32 bytes of header for (int i = 0; i < 64; ++i) { fprintf(stderr, "%0.2x ", ((const char*)header.getAlias())[i]&0xff); @@ -138,7 +138,7 @@ KernTable::KernTable(const LETableReference& base, LEErrorCode &success) fprintf(stderr, " searchRange: %d entrySelector: %d rangeShift: %d\n", searchRange, entrySelector, rangeShift); fprintf(stderr, "[[ ignored font table entries: range %d selector %d shift %d ]]\n", SWAPW(table->searchRange), SWAPW(table->entrySelector), SWAPW(table->rangeShift)); #endif -#if DEBUG +#if KERNTABLE_DEBUG fprintf(stderr, "coverage: %0.4x nPairs: %d pairs 0x%x\n", coverage, nPairs, pairs); fprintf(stderr, " searchRange: %d entrySelector: %d rangeShift: %d\n", searchRange, entrySelector, rangeShift); @@ -215,7 +215,7 @@ void KernTable::process(LEGlyphStorage& storage, LEErrorCode &success) p = tp; } -#if DEBUG +#if KERNTABLE_DEBUG fprintf(stderr, "binary search for %0.8x\n", key); #endif @@ -227,13 +227,13 @@ void KernTable::process(LEGlyphStorage& storage, LEErrorCode &success) tp = tpRef.getAlias(); le_uint32 tkey = SWAP_KEY(tp); if(LE_FAILURE(success)) break; -#if DEBUG +#if KERNTABLE_DEBUG fprintf(stdout, " %.3d (%0.8x)\n", ((char*)tp - (char*)pairs)/KERN_PAIRINFO_SIZE, tkey); #endif if (tkey <= key && LE_SUCCESS(success)) { if (tkey == key) { le_int16 value = SWAPW(tp->value); -#if DEBUG +#if KERNTABLE_DEBUG fprintf(stdout, "binary found kerning pair %x:%x at %d, value: 0x%x (%g)\n", storage[i-1], storage[i], i, value & 0xffff, font->xUnitsToPoints(value)); fflush(stdout); diff --git a/icu4c/source/test/intltest/nptrans.cpp b/icu4c/source/test/intltest/nptrans.cpp index a4a591ba2a2..27345adf62e 100644 --- a/icu4c/source/test/intltest/nptrans.cpp +++ b/icu4c/source/test/intltest/nptrans.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 2003-2010, International Business Machines + * Copyright (C) 2003-2014, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -27,7 +27,7 @@ #include "ustr_imp.h" #include "intltest.h" -#ifdef DEBUG +#ifdef NPTRANS_DEBUG #include #endif @@ -84,14 +84,14 @@ NamePrepTransform::NamePrepTransform(UParseError& parseError, UErrorCode& status pattern = ures_getStringByKey(bundle,"ProhibitedSet",&patternLen, &status); UnicodeString test(pattern,patternLen); prohibited.applyPattern(test,status); -#ifdef DEBUG +#ifdef NPTRANS_DEBUG if(U_FAILURE(status)){ printf("Construction of Unicode set failed\n"); } if(U_SUCCESS(status)){ if(prohibited.contains((UChar) 0x644)){ - printf("The string contains 0x644 ... damn !!\n"); + printf("The string contains 0x644 ... !!\n"); } UnicodeString temp; prohibited.toPattern(temp,TRUE);