21 #pragma warning(disable:4244)  // Conversion warnings    40 #define EPAPER_EXT      ".ep"    41 #define PAGE_YSIZE      3508    42 #define CTRL_INSET      '\024'   //dc4=text inset    43 #define CTRL_FONT       '\016'   //so=font change    44 #define CTRL_DEFAULT      '\017' //si=default font    45 #define CTRL_SHIFT      '\022'   //dc2=x shift    46 #define CTRL_TAB        '\011'   //tab    47 #define CTRL_NEWLINE      '\012' //newline    48 #define CTRL_HARDLINE   '\015'   //cr    63   pts = pixels * 72.0 / pix_res;
    64   return (
inT32) (pts + 0.5);    
    70                             const TBOX *target_word_box) {
    77   block_of_last_word = NULL;
    78   while (page_res_it.
word () != NULL) {
    81     if (target_word_box) {
    84           (current_word_box.
right() + current_word_box.
left()) / 2,
    85           (current_word_box.
bottom() + current_word_box.
top()) / 2);
    86       if (!target_word_box->
contains(center_pt)) {
    92     block_of_last_word != page_res_it.
block ()) {
    93       block_of_last_word = page_res_it.
block ();
   112                                          nextword, nextblock), force_eol);
   214     tprintf (
"Dict word: \"%s\": %d\n",
   223           word->
reject_map[i].setrej_minimal_rej_accept();
   231           word->
reject_map[i].setrej_minimal_rej_accept();
   259   if (next_word == NULL || next_block == NULL || block != next_block)
   261   if (next_word->
space () > 0)
   267   end_gap = block_box.
right () - word_box.
right ();
   269   width = next_box.
right () - next_box.
left ();
   288   if (i < word->reject_map.length()) {
   313     for (i = 0; i < len; i++) {
   315         word_res->
reject_map[i].setrej_minimal_rej_accept();
   328     for (i = 0; i < len; ++i) {
   331         word_res->
reject_map[i].setrej_minimal_rej_accept();
   342     for (i = 0; i < len; ++i) {
   345         word_res->
reject_map[i].setrej_minimal_rej_accept();
   349   for (i = 0; i < len; i++) {
   352         word_res->
reject_map[i].setrej_minimal_rej_accept();
   354         word_res->
reject_map[i].setrej_minimal_rej_accept();
   356         word_res->
reject_map[i].setrej_minimal_rej_accept();
   365     for (i = 0; i < len; i++) {
   369           word_res->
reject_map[i].setrej_minimal_rej_accept();
   373           word_res->
reject_map[i].setrej_minimal_rej_accept();
   385       for (i = 0; i < len; i++) {
   391           word_res->
reject_map[i].setrej_minimal_rej_accept();
   400   for (
int i = 0; i < word.
length(); ++i) {
   410   for (
int i = 0; i < word.
length(); ++i) {
   420                                           const char *lengths) {
   423   if (*lengths == 1 && *s == 
'(')
   427       ((*s == 
'$') || (*s == 
'.') || (*s == 
'+') || (*s == 
'-')))
   430   for (; *s != 
'\0'; s += *(lengths++)) {
   433     else if (prev_digit &&
   434              (*lengths == 1 && ((*s == 
'.') || (*s == 
',') || (*s == 
'-'))))
   436     else if (prev_digit && *lengths == 1 &&
   437              (*(s + *lengths) == 
'\0') && ((*s == 
'%') || (*s == 
')')))
   439     else if (prev_digit &&
   440              *lengths == 1 && (*s == 
'%') &&
   441              (*(lengths + 1) == 1 && *(s + *lengths) == 
')') &&
   442              (*(s + *lengths + *(lengths + 1)) == 
'\0'))
 
inT16 count_alphas(const WERD_CHOICE &word)
void output_pass(PAGE_RES_IT &page_res_it, const TBOX *target_word_box)
UNICHAR_ID get_rep_char(WERD_RES *word)
WERD_RES * next_word() const
UNICHAR_ID unichar_id(int index) const
bool tessedit_zero_rejection
WERD_CHOICE * best_choice
void bounding_box(ICOORD &bottom_left, ICOORD &top_right) const
get box 
const STRING & unichar_lengths() const
bool tessedit_write_rep_codes
bool tilde_crunch_written
bool tessedit_minimal_rejection
inT32 pixels_to_pts(inT32 pixels, inT32 pix_res)
const STRING debug_string() const
BOOL8 check_debug_pt(WERD_RES *word, int location)
const char * string() const
void set_unlv_suspects(WERD_RES *word)
bool last_char_was_newline
void MergeAdjacentBlobs(int index)
TBOX bounding_box() const
BOOL8 flag(WERD_FLAGS mask) const
WERD_RES * restart_page()
inT16 safe_dict_word(const WERD_RES *werd_res)
bool get_isalpha(UNICHAR_ID unichar_id) const
bool tessedit_rejection_debug
bool get_isdigit(UNICHAR_ID unichar_id) const
bool tessedit_word_for_word
bool unlv_tilde_crunching
bool tessedit_zero_kelvin_rejection
inT16 count_alphanums(const WERD_CHOICE &word)
bool tessedit_write_block_separators
void write_results(PAGE_RES_IT &page_res_it, char newline_type, BOOL8 force_eol)
bool contains(const FCOORD pt) const
CRUNCH_MODE unlv_crunch_mode
BLOCK_RES * next_block() const
const UNICHARSET * unicharset() const
BOOL8 acceptable_number_string(const char *s, const char *lengths)
const STRING & unichar_string() const
double suspect_accept_rating
ACCEPTABLE_WERD_TYPE acceptable_word_string(const UNICHARSET &char_set, const char *s, const char *lengths)
bool eq(UNICHAR_ID unichar_id, const char *const unichar_repr) const
int dict_word(const WERD_CHOICE &word)
bool suspect_constrain_1Il
double suspect_rating_per_ch
const UNICHARSET * uch_set
UNICHAR_ID unichar_to_id(const char *const unichar_repr) const
char determine_newline_type(WERD *word, BLOCK *block, WERD *next_word, BLOCK *next_block)
inT16 space() const
return spacing 
bool write_results_empty_block
BLOCK_RES * block() const