Changed several printfs to tprintfs to prevent stdout pollution.

git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@23 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
mezhirov 2007-04-05 10:05:50 +00:00
parent fcfaafd602
commit f1ce0ecd7f
4 changed files with 6 additions and 5 deletions

View File

@ -83,7 +83,7 @@ DLLSYM PAGE_BLOCK_LIST *read_poly_blocks( //read file
page_block_it.set_to_list (pb_list);
number_of_pblocks = pb_list->length ();
printf ("%d page blocks read\n", number_of_pblocks);
tprintf ("%d page blocks read\n", number_of_pblocks);
return pb_list;
}

View File

@ -170,7 +170,7 @@ double streamtofloat(FILE* s)
k *= 10;
}
} else if (c == 'e' || c == 'E')
printf("WARNING: Scientific Notation not supported!");
tprintf("WARNING: Scientific Notation not supported!");
ungetc(c, s);
double f = static_cast<double>(v)
@ -204,7 +204,7 @@ double strtofloat(const char* s)
k *= 10;
}
} else if (*s == 'e' || *s == 'E')
printf("WARNING: Scientific Notation not supported!");
tprintf("WARNING: Scientific Notation not supported!");
double f = static_cast<double>(v)
+ static_cast<double>(w) / static_cast<double>(k);

View File

@ -627,7 +627,7 @@ LIST AdaptiveClassifier(TBLOB *Blob, TBLOB *DotBlob, TEXTROW *Row) {
NumClassesOutput += count (Choices);
if (Choices == NIL) {
if (!bln_numericmode)
printf ("Nil classification!\n"); // Should never normally happen.
tprintf ("Nil classification!\n"); // Should never normally happen.
return (append_choice (NIL, "", 50.0f, -20.0f, -1));
}

View File

@ -40,6 +40,7 @@ Import original HP distribution
**/
#include "cutil.h"
#include "tprintf.h"
#include "callcpp.h"
#include <stdlib.h>
@ -85,7 +86,7 @@ long long_rand(long limit) {
FILE *open_file(const char *filename, const char *mode) {
FILE *thisfile = NULL;
if ((thisfile = fopen (filename, mode)) == NULL) {
printf ("Could not open file, %s\n", filename);
tprintf ("Could not open file, %s\n", filename);
exit (1);
}
return (thisfile);