ccstruct/callcpp.cpp File Reference

#include "mfcpch.h"
#include "errcode.h"
#include <time.h>
#include "memry.h"
#include "grphics.h"
#include "evnts.h"
#include "varable.h"
#include "callcpp.h"
#include "tprintf.h"
#include "host.h"

Go to the source code of this file.

Functions

Variables


Function Documentation

void assert ( int  testing  ) 

A version of assert for C on NT.

Definition at line 77 of file callcpp.cpp.

References ASSERT_HOST.

Referenced by AdaptToWord(), AddAdaptedClass(), AddIntClass(), AddIntConfig(), AddNewChunk(), AddProtoToProtoPruner(), ConvertProto(), CreateIntTemplates(), DoError(), FindClassifierErrors(), FreeTempConfig(), GetMatchColorFor(), hash_add(), hash_lookup(), join_two_seams(), make_single_split(), MakeNewAdaptedClass(), match_word_pass2(), NewIntClass(), NewViableChoice(), recog_word(), recog_word_recursive(), RenderIntFeature(), RenderIntProto(), SaveBadWord(), split_outline(), TableLookup(), unsplit_outlines(), WritePermConfig(), and WriteTempConfig().

00079              {
00080   ASSERT_HOST(testing); 
00081 }

void* c_alloc_mem ( INT32  count  ) 

Definition at line 149 of file callcpp.cpp.

Referenced by memalloc(), and memrealloc().

00151                    {
00152   return alloc_mem (count);
00153 }

void* c_alloc_mem_p ( INT32  count  ) 

Definition at line 142 of file callcpp.cpp.

Referenced by memalloc_p().

00144                      {
00145   return alloc_mem_p (count);
00146 }

char* c_alloc_string ( INT32  count  ) 

Definition at line 111 of file callcpp.cpp.

Referenced by SaveBadWord().

00113                       {
00114   return alloc_string (count);
00115 }

void* c_alloc_struct ( INT32  count,
const char *  name 
)

Definition at line 125 of file callcpp.cpp.

Referenced by NewEdgePoint(), NewFeature(), NewTempConfig(), NewTempProto(), ReadAdaptedClass(), and ReadTempConfig().

00128                       {
00129   return alloc_struct (count, name);
00130 }

void c_check_mem ( const char *  string,
INT8  level 
)

Definition at line 163 of file callcpp.cpp.

Referenced by mem_tidy().

00166                   {
00167   check_mem(string, level); 
00168 }

void c_clear_window ( void *  win  ) 

Definition at line 227 of file callcpp.cpp.

Referenced by display_blob(), display_edgepts(), display_segmentation(), and ShowMatchDisplay().

00228                                {
00229   WINDOW window = (WINDOW) win;
00230 
00231   window->Clear_view_surface ();
00232 }

void* c_create_window ( const char *  name,
INT16  xpos,
INT16  ypos,
INT16  xsize,
INT16  ysize,
double  xmin,
double  xmax,
double  ymin,
double  ymax 
)

Definition at line 171 of file callcpp.cpp.

Referenced by display_blob(), display_edgepts(), display_segmentation(), IMDisplayProtoDebugInfo(), and ShowMatchDisplay().

00181                        {
00182   return create_window (name, SCROLLINGWIN, xpos, ypos, xsize, ysize,
00183     xmin, xmax, ymin, ymax, TRUE, FALSE, FALSE, TRUE);
00184 }

void c_draw ( void *  win,
double  x,
double  y 
)

Definition at line 209 of file callcpp.cpp.

Referenced by mark_outline(), mark_split(), render_edgepts(), RenderIntFeature(), RenderIntProto(), and ShowMatchDisplay().

00212                       {
00213   WINDOW window = (WINDOW) win;
00214 
00215   window->Draw2d (x, y);
00216 }

void c_free_mem ( void *  oldchunk  ) 

Definition at line 156 of file callcpp.cpp.

Referenced by memfree(), and memrealloc().

00158                  {
00159   free_mem(oldchunk); 
00160 }

void c_free_string ( char *  string  ) 

Definition at line 118 of file callcpp.cpp.

Referenced by PrintBadWords().

00120                     {
00121   free_string(string); 
00122 }

void c_free_struct ( void *  deadstruct,
INT32  count,
const char *  name 
)

Definition at line 133 of file callcpp.cpp.

Referenced by FreeFeature(), FreeMFOutline(), FreeTempConfig(), and FreeTempProto().

00137                     {
00138   free_struct(deadstruct, count, name); 
00139 }

void c_line_color_index ( void *  win,
C_COL  index 
)

Definition at line 187 of file callcpp.cpp.

Referenced by mark_outline(), mark_split(), render_edgepts(), RenderIntFeature(), RenderIntProto(), and ShowMatchDisplay().

00189                                      {
00190   WINDOW window = (WINDOW) win;
00191 
00192   //      ASSERT_HOST(index>=0 && index<=48);
00193   if (index < 0 || index > 48)
00194     index = (C_COL) 1;
00195   window->Line_color_index ((COLOUR) index);
00196 }

void c_make_current ( void *  win  ) 

Definition at line 219 of file callcpp.cpp.

Referenced by display_blob(), display_segmentation(), mark_outline(), mark_split(), and UpdateMatchDisplay().

00220                                {
00221   WINDOW window = (WINDOW) win;
00222 
00223   window->Make_picture_current ();
00224 }

void c_move ( void *  win,
double  x,
double  y 
)

Definition at line 199 of file callcpp.cpp.

Referenced by mark_outline(), mark_split(), render_edgepts(), RenderIntFeature(), RenderIntProto(), and ShowMatchDisplay().

00202                       {
00203   WINDOW window = (WINDOW) win;
00204 
00205   window->Move2d (x, y);
00206 }

void cprintf ( const char *  format,
  ... 
)

Definition at line 97 of file callcpp.cpp.

Referenced by AcceptableChoice(), AcceptableResult(), AdaptiveClassifier(), AdaptToChar(), AdaptToPunc(), AdaptToWord(), add_edge_linkage(), add_new_edge(), add_word_to_dawg(), AddNewChunk(), AddProtoToProtoPruner(), AddSignalMenuItem(), adjust_non_word(), adjust_number(), adjust_word(), AmbigClassifier(), AmbigsFound(), append_next_choice(), append_number_choices(), array_new(), array_push(), assign_blobs_to_rows(), attempt_blob_chop(), BaselineClassifier(), bin_to_pieces(), capture_children(), case_ok(), cc_recog(), CharNormClassifier(), check_path_legal(), check_pitch_sync2(), ClassPruner(), combine_seams(), complete_edge(), compute_page_skew(), ComputeNormMatch(), ConvertProto(), OL_BUCKETS::count_children(), dawg_permute(), dawg_permute_and_select(), DebugAdaptiveClassifier(), DebugWordChoices(), delete_non_dropout_rows(), DoError(), empty_buckets(), EndAdaptiveClassifier(), eval_word_spacing(), expand_rows(), ExtractOutlineFeatures(), feature_pruner(), FillPPCircularBits(), FillPPLinearBits(), FindBadFeatures(), FindGoodProtos(), fit_parallel_lms(), FreeBitVector(), h_edge(), hash_add(), hash_lookup(), IMDebugBestMatch(), IMDebugConfiguration(), IMDebugConfigurationSum(), IMDebugFeatureProtoError(), IMFindBestMatch(), init_permute(), InitAdaptiveClassifier(), InitSpeckleVars(), insert_seam(), IntegerMatcher(), join_edges(), LearnBlob(), line_edges(), MainSignalHandler(), make_rows(), make_words(), MakeNewAdaptedClass(), MakeNewTemporaryConfig(), MakePermanent(), memfree(), move_node(), new_dawg_node(), new_search(), number_permute(), output_pass(), permute_characters(), permute_compound_words(), permute_subword(), permute_top_choice(), pop_queue(), print_choices(), print_dawg_node(), print_matrix(), print_seam(), print_seams(), print_split(), print_state(), print_tally(), PrintAdaptiveMatchResults(), PrintProtos(), prioritize_points(), program_editdown(), prune_configs(), PruningMatcher(), put_match(), re_estimate_x_ht(), read_variables(), read_word_list(), ReadClassFile(), ReadIntTemplates(), relocate_edge(), remove_edge_linkage(), save_best_state(), save_summary(), select_blob_to_split(), separate_underlines(), set_float_value(), set_hyphen_word(), set_int_value(), ShowBestMatchFor(), TestEllipticalProto(), TruncateParam(), UniformCertainties(), v_edge(), word_blob_quality(), and word_char_quality().

00099   {
00100   va_list args;                  //variable args
00101   char msg[1000];
00102 
00103   va_start(args, format);  //variable list
00104   vsprintf(msg, format, args);  //Format into msg
00105   va_end(args); 
00106 
00107   tprintf ("%s", msg);
00108 }

void reverse16 ( void *  ptr  ) 

Definition at line 261 of file callcpp.cpp.

Referenced by open_tif_image(), read_vec_file(), ReadIntTemplates(), reverse32(), and write_tif_image().

00261                           { 
00262   char tmp;
00263   char *cptr = (char *) ptr;
00264 
00265   tmp = *cptr;
00266   *cptr = *(cptr + 1);
00267   *(cptr + 1) = tmp;
00268 }

void reverse32 ( void *  ptr  ) 

Definition at line 248 of file callcpp.cpp.

Referenced by open_tif_image(), read_squished_dawg(), read_vec_file(), ReadIntTemplates(), and write_tif_image().

00248                           { 
00249   char tmp;
00250   char *cptr = (char *) ptr;
00251 
00252   tmp = *cptr;
00253   *cptr = *(cptr + 3);
00254   *(cptr + 3) = tmp;
00255   tmp = *(cptr + 1);
00256   *(cptr + 1) = *(cptr + 2);
00257   *(cptr + 2) = tmp;
00258 }

void setup_cp_maps (  ) 

Definition at line 84 of file callcpp.cpp.

References cp_maps.

Referenced by program_editup().

00084                      { 
00085   cp_maps[0] = tess_cp_mapping0;
00086   cp_maps[1] = tess_cp_mapping1;
00087   cp_maps[2] = tess_cp_mapping2;
00088   cp_maps[3] = tess_cp_mapping3;
00089 }

void trace_stack (  ) 

Definition at line 92 of file callcpp.cpp.

00092                    {  //Trace current stack
00093 }

char window_wait ( void *  win  ) 

Definition at line 235 of file callcpp.cpp.

Referenced by classify_piece(), evaluate_state(), GetClassToDebug(), and save_best_state().

00236                             {
00237   WINDOW window = (WINDOW) win;
00238   GRAPHICS_EVENT event;
00239 
00240   await_event(window, TRUE, ANY_EVENT, &event); 
00241   if (event.type == KEYPRESS_EVENT)
00242     return event.key;
00243   else
00244     return '\0';
00245 }


Variable Documentation

INT32 bits_in_states

Definition at line 71 of file callcpp.cpp.

Referenced by chop_word_main(), and compare_states().

char blob_answer

Definition at line 68 of file callcpp.cpp.

Referenced by ClassPruner(), and print_ratings_info().

INT32 blob_type

Definition at line 67 of file callcpp.cpp.

Referenced by ClassPruner().

INT32 cp_bestconf

Definition at line 61 of file callcpp.cpp.

Referenced by ClassPruner().

INT32 cp_bestindex

Definition at line 59 of file callcpp.cpp.

Referenced by ClassPruner().

INT32 cp_bestrating

Definition at line 60 of file callcpp.cpp.

Referenced by ClassPruner().

char cp_chars[2]

Definition at line 62 of file callcpp.cpp.

Referenced by ClassPruner().

INT32 cp_classes

Definition at line 58 of file callcpp.cpp.

Referenced by ClassPruner().

INT32 cp_confs[2]

Definition at line 64 of file callcpp.cpp.

Referenced by ClassPruner().

INT32 cp_maps[4]

Definition at line 65 of file callcpp.cpp.

Referenced by ClassPruner(), and setup_cp_maps().

INT32 cp_ratings[2]

Definition at line 63 of file callcpp.cpp.

Referenced by ClassPruner().

INT32 matcher_pass

Definition at line 70 of file callcpp.cpp.

Referenced by chop_word_main(), classify_word_pass1(), and match_word_pass2().

char* word_answer

Definition at line 69 of file callcpp.cpp.

Referenced by classify_word_pass1(), and match_word_pass2().


Generated on Wed Feb 28 19:49:16 2007 for Tesseract by  doxygen 1.5.1