cutil/callcpp.h

Go to the documentation of this file.
00001 
00020 #ifndef CALLCPP_H
00021 #define CALLCPP_H
00022 
00023 #include "host.h"
00024 #include "varable.h"
00025 
00026 #ifdef __cplusplus
00027 //extern "C" {
00028 #endif
00029 
00034 typedef enum {
00035   Black,
00036   White,
00037   Red,
00038   Yellow,
00039   Green,
00040   Cyan,
00041   Blue,
00042   Magenta,
00043   Aquamarine,
00044   Dark_SLATE_BLUE,
00045   Light_BLUE,
00046   Medium_BLUE,
00047   Midnight_BLUE,
00048   Navy_BLUE,
00049   Sky_BLUE,
00050   Slate_BLUE,
00051   Steel_BLUE,
00052   Coral,
00053   Brown,
00054   Sandy_BROWN,
00055   Gold,
00056   GoldENROD,
00057   Dark_GREEN,
00058   Dark_OLIVE_GREEN,
00059   Forest_GREEN,
00060   Lime_GREEN,
00061   Pale_GREEN,
00062   Yellow_GREEN,
00063   Light_GREY,
00064   Dark_SLATE_GREY,
00065   Dim_GREY,
00066   Grey,
00067   Khaki,
00068   Maroon,
00069   Orange,
00070   Orchid,
00071   Pink,
00072   Plum,
00073   Indian_RED,
00074   Orange_RED,
00075   Violet_RED,
00076   Salmon,
00077   Tan,
00078   Turqoise,
00079   Dark_TURQUOISE,
00080   Violet,
00081   Wheat,
00082   Green_YELLOW
00083 } C_COL;
00084 
00086 #define INTEL       0x4949
00087 #define MOTO        0x4d4d
00088 
00091 extern INT_VAR_H (tess_cp_mapping0, 0, "Mappings for class pruner distance");
00092 extern INT_VAR_H (tess_cp_mapping1, 1, "Mappings for class pruner distance");
00093 extern INT_VAR_H (tess_cp_mapping2, 2, "Mappings for class pruner distance");
00094 extern INT_VAR_H (tess_cp_mapping3, 3, "Mappings for class pruner distance");
00095 extern INT_VAR_H (stopper_numbers_on, 0,
00096 "Allow numbers to be acceptable choices");
00097 extern INT_VAR_H (config_pruner_enabled, 0, "Turn on config pruner");
00098 extern INT_VAR_H (feature_prune_percentile, 0, "Percent of features to use");
00099 extern INT_VAR_H (newcp_ratings_on, 0, "Use new class pruner normalisation");
00100 extern INT_VAR_H (record_matcher_output, 0, "Record detailed matcher info");
00101 extern INT_VAR_H (il1_adaption_test, 0,
00102 "Dont adapt to i/I at beginning of word");
00103 extern double_VAR_H (permuter_pending_threshold, 0.0,
00104 "Worst conf for using pending dictionary");
00105 extern double_VAR_H (newcp_duff_rating, 0.30,
00106 "Worst rating for calling real matcher");
00107 extern double_VAR_H (newcp_prune_threshold, 1.2, "Ratio of best to prune");
00108 extern double_VAR_H (tessedit_cp_ratio, 0.0, "Ratio from best to prune");
00111 //Global matcher info from the class pruner.
00112 extern INT32 cp_classes;
00113 extern INT32 cp_bestindex;
00114 extern INT32 cp_bestrating;
00115 extern INT32 cp_bestconf;
00116 extern char cp_chars[2];
00117 extern INT32 cp_ratings[2];
00118 extern INT32 cp_confs[2];
00119 extern INT32 cp_maps[4];
00120 //Global info to control writes of matcher info
00121 extern INT32 blob_type;          //write control
00122 extern char blob_answer;         //correct char
00123 extern char *word_answer;        //correct word
00124 extern INT32 matcher_pass;       //pass in chopper.c
00125 extern INT32 bits_in_states;     //no of bits in states
00126 
00127 #ifndef __UNIX__
00128 void assert(             //recog one owrd
00129             int testing  //assert fail if false
00130            );
00131 #endif
00132 void setup_cp_maps(); 
00133 void trace_stack();  //Trace current stack
00134 void cprintf (                   //Trace printf
00135 const char *format, ...          //special message
00136 );
00137 char *c_alloc_string(             //allocate string
00138                      INT32 count  //no of chars required
00139                     );
00140 void c_free_string(              //free a string
00141                    char *string  //string to free
00142                   );
00143 void *c_alloc_struct(                  //allocate memory
00144                      INT32 count,      //no of chars required
00145                      const char *name  //class name
00146                     );
00147 void c_free_struct(                   //free a structure
00148                    void *deadstruct,  //structure to free
00149                    INT32 count,       //no of bytes
00150                    const char *name   //class name
00151                   );
00152 void *c_alloc_mem_p(             //allocate permanent space
00153                     INT32 count  //block size to allocate
00154                    );
00155 void *c_alloc_mem(             //get some memory
00156                   INT32 count  //no of bytes to get
00157                  );
00158 void c_free_mem(                //free mem from alloc_mem
00159                 void *oldchunk  //chunk to free
00160                );
00161 void c_check_mem(                     //check consistency
00162                  const char *string,  //context message
00163                  INT8 level           //level of check
00164                 );
00165 void *c_create_window(                   /*create a window */
00166                       const char *name,  /*name/title of window */
00167                       INT16 xpos,        /*coords of window */
00168                       INT16 ypos,        /*coords of window */
00169                       INT16 xsize,       /*size of window */
00170                       INT16 ysize,       /*size of window */
00171                       double xmin,       /*scrolling limits */
00172                       double xmax,       /*to stop users */
00173                       double ymin,       /*getting lost in */
00174                       double ymax        /*empty space */
00175                      );
00176 void c_line_color_index(  /*set color */
00177                         void *win,
00178                         C_COL index);
00179 void c_move(  /*move pen */
00180             void *win,
00181             double x,
00182             double y);
00183 void c_draw(  /*move pen */
00184             void *win,
00185             double x,
00186             double y);
00187 void c_make_current(  /*move pen */
00188                     void *win);
00189 void c_clear_window(  /*move pen */
00190                     void *win);
00191 char window_wait(  /*move pen */
00192                  void *win);
00193 void reverse32(void *ptr); 
00194 void reverse16(void *ptr); 
00195 
00196 #ifdef __cplusplus
00197 //};
00198 #endif
00199 #endif

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