From de0c58375a2ad36a8a62cdbd279c1dabe56eda45 Mon Sep 17 00:00:00 2001 From: Joshua Richardson Date: Tue, 7 Jun 2011 09:54:18 -0700 Subject: [PATCH 2/2] Remove debugging output that I introduced. --- utils/HtmlOutputDev.cc | 36 +++++++++++++++++++----------------- 1 files changed, 19 insertions(+), 17 deletions(-) diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc index 01662a1..67765a1 100644 --- a/utils/HtmlOutputDev.cc +++ b/utils/HtmlOutputDev.cc @@ -46,7 +46,6 @@ #include #include #include -#include #include "goo/GooString.h" #include "goo/GooList.h" #include "UnicodeMap.h" @@ -63,7 +62,7 @@ #include "HtmlOutputDev.h" #include "HtmlFonts.h" -#define DEBUG(stuff) (std::cerr << __FILE__ << ": " << __LINE__ << ": DEBUG: " << stuff << std::endl ) +#define DEBUG(stuff) if (debug) { std::cerr << __FILE__ << ": " << __LINE__ << ": DEBUG: " << stuff << std::endl; } // returns true iff x is closer to y than x is to z #define IS_CLOSER(x,y,z) (fabs((x)-(y)) getCString(); @@ -423,21 +424,22 @@ void HtmlPage::coalesce() { int n, i; double curX, curY; -#if 1 //~ for debugging - for (str1 = yxStrings; str1; str1 = str1->yxNext) { - printf("x=%f..%f y=%f..%f size=%2d '", - str1->xMin, str1->xMax, str1->yMin, str1->yMax, - (int)(str1->yMax - str1->yMin)); - for (i = 0; i < str1->len; ++i) { - fputc(str1->text[i] & 0xff, stdout); - } - printf("'"); - for (i = 0; i < str1->len; ++i) - printf("%u.", str1->text[i]); - printf("\n"); + if (debug) { + for (str1 = yxStrings; str1; str1 = str1->yxNext) { + printf("x=%f..%f y=%f..%f size=%2d '", + str1->xMin, str1->xMax, str1->yMin, str1->yMax, + (int)(str1->yMax - str1->yMin)); + for (i = 0; i < str1->len; ++i) { + fputc(str1->text[i] & 0xff, stdout); + } + printf("'"); + for (i = 0; i < str1->len; ++i) + printf("%u.", str1->text[i]); + printf("\n"); + } + printf("\n------------------------------------------------------------\n\n"); } - printf("\n------------------------------------------------------------\n\n"); -#endif + str1 = yxStrings; if( !str1 ) return; @@ -564,7 +566,7 @@ void HtmlPage::coalesce() { } if (addLineBreak) { str1->text[str1->len] = '\n'; - str1->htext->append("
"); + str1->htext->append("
"); str1->xRight[str1->len] = str2->xMin; ++str1->len; str1->yMin = str2->yMin; -- 1.7.4.1