diff --git a/ccmain/osdetect.cpp b/ccmain/osdetect.cpp index c31c9b1b6..fba544928 100644 --- a/ccmain/osdetect.cpp +++ b/ccmain/osdetect.cpp @@ -130,7 +130,7 @@ int OSResults::get_best_script(int orientation_id) const { // Print the script scores for all possible orientations. void OSResults::print_scores(void) const { for (int i = 0; i < 4; ++i) { - printf("Orientation id #%d", i); + tprintf("Orientation id #%d", i); print_scores(i); } } @@ -139,7 +139,7 @@ void OSResults::print_scores(void) const { void OSResults::print_scores(int orientation_id) const { for (int j = 0; j < kMaxNumberOfScripts; ++j) { if (scripts_na[orientation_id][j]) { - printf("%12s\t: %f\n", unicharset->get_script_from_script_id(j), + tprintf("%12s\t: %f\n", unicharset->get_script_from_script_id(j), scripts_na[orientation_id][j]); } } @@ -284,13 +284,13 @@ int os_detect_blobs(BLOBNBOX_CLIST* blob_list, OSResults* osr, BLOBNBOX_C_IT filtered_it(blob_list); int real_max = MIN(filtered_it.length(), kMaxCharactersToTry); - // printf("Total blobs found = %d\n", blobs_total); - // printf("Number of blobs post-filtering = %d\n", filtered_it.length()); - // printf("Number of blobs to try = %d\n", real_max); + // tprintf("Total blobs found = %d\n", blobs_total); + // tprintf("Number of blobs post-filtering = %d\n", filtered_it.length()); + // tprintf("Number of blobs to try = %d\n", real_max); // If there are too few characters, skip this page entirely. if (real_max < kMinCharactersToTry / 2) { - printf("Too few characters. Skipping this page\n"); + tprintf("Too few characters. Skipping this page\n"); return 0; } diff --git a/ccstruct/blobbox.h b/ccstruct/blobbox.h index 6229365c5..da44bfbff 100644 --- a/ccstruct/blobbox.h +++ b/ccstruct/blobbox.h @@ -710,7 +710,7 @@ class TO_BLOCK:public ELIST_LINK for (row_it.mark_cycle_pt (); !row_it.cycled_list (); row_it.forward ()) { row = row_it.data (); - printf ("Row range (%g,%g), para_c=%g, blobcount=" INT32FORMAT + tprintf ("Row range (%g,%g), para_c=%g, blobcount=" INT32FORMAT "\n", row->min_y (), row->max_y (), row->parallel_c (), row->blob_list ()->length ()); } diff --git a/ccstruct/coutln.cpp b/ccstruct/coutln.cpp index b4383707b..650299331 100644 --- a/ccstruct/coutln.cpp +++ b/ccstruct/coutln.cpp @@ -172,12 +172,12 @@ C_OUTLINE::C_OUTLINE( //constructor pos += srcline->step (stepindex); destpos = pos; destpos.rotate (rotation); - // printf("%i %i %i %i ", destpos.x(), destpos.y(), pos.x(), pos.y()); + // tprintf("%i %i %i %i ", destpos.x(), destpos.y(), pos.x(), pos.y()); while (destpos.x () != prevpos.x () || destpos.y () != prevpos.y ()) { dir = DIR128 (FCOORD (destpos - prevpos)); dir += 64; //turn to step style new_step = dir.get_dir (); - // printf(" %i\n", new_step); + // tprintf(" %i\n", new_step); if (new_step & 31) { set_step(destindex++, dir + round1); prevpos += step(destindex - 1); diff --git a/ccutil/tessdatamanager.cpp b/ccutil/tessdatamanager.cpp index f23c81adc..721a7e3c1 100644 --- a/ccutil/tessdatamanager.cpp +++ b/ccutil/tessdatamanager.cpp @@ -217,7 +217,7 @@ bool TessdataManager::TessdataTypeFromFileSuffix( return true; } } - printf("TessdataManager can't determine which tessdata" + tprintf("TessdataManager can't determine which tessdata" " component is represented by %s\n", suffix); return false; } @@ -239,7 +239,7 @@ bool TessdataManager::ExtractToFile(const char *filename) { FILE *output_file = fopen(filename, "wb"); if (output_file == NULL) { - printf("Error openning %s\n", filename); + tprintf("Error openning %s\n", filename); exit(1); } inT64 begin_offset = ftell(GetDataFilePtr()); diff --git a/cube/search_column.cpp b/cube/search_column.cpp index 7d5b1b206..9a042d016 100644 --- a/cube/search_column.cpp +++ b/cube/search_column.cpp @@ -179,7 +179,7 @@ SearchNode *SearchColumn::AddNode(LangModEdge *edge, int reco_cost, // because the langmod state is not unique if (edge->IsOOD() == false) { if (!node_hash_table_->Insert(edge, new_node)) { - printf("Hash table full!!!"); + tprintf("Hash table full!!!"); delete new_node; return NULL; } diff --git a/textord/tordmain.cpp b/textord/tordmain.cpp index 2194f44c1..aa259662f 100644 --- a/textord/tordmain.cpp +++ b/textord/tordmain.cpp @@ -346,12 +346,12 @@ float Textord::filter_noise_blobs( size_stats.add (height, 1); } max_height = size_stats.ile (textord_initialasc_ile); - // printf("max_y=%g, min_y=%g, initial_x=%g, max_height=%g,", + // tprintf("max_y=%g, min_y=%g, initial_x=%g, max_height=%g,", // max_y,min_y,initial_x,max_height); max_height *= tesseract::CCStruct::kXHeightCapRatio; if (max_height > initial_x) initial_x = max_height; - // printf(" ret=%g\n",initial_x); + // tprintf(" ret=%g\n",initial_x); return initial_x; }