提交 f1ce0ecd 编写于 作者: M mezhirov

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
上级 fcfaafd6
......@@ -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;
}
......@@ -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);
......
......@@ -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));
}
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册