training/training.h

Go to the documentation of this file.
00001 
00021 #ifndef TRAINING_H
00022 #define TRAINING_H
00023 
00024 #include "host.h"
00025 #include "callcpp.h"
00026 
00031 typedef enum
00032 {
00033    baseline,
00034    character
00035 }
00036 NORM_METHOD;
00037 
00042 typedef struct
00043 {
00044    FLOAT32     x,y;
00045 } FPOINT;
00046 
00051 typedef FPOINT FVECTOR;
00052 
00053 #define INTEL           0x4949
00054 #define MOTO            0x4d4d
00055 
00056 #define PICO_FEATURE_LENGTH   (0.05)
00057 #define GetPicoFeatureLength()   (PICO_FEATURE_LENGTH)
00058 
00059 /* Globals */
00060 extern int LearningDebugLevel;
00061 extern int NormMethod;
00062 
00063 /* --------------- Function prototypes ----------------------------*/
00064 
00065 void                 cprintf(             //Trace printf
00066 const char              *format,...             //special message
00067 );
00068 
00069 char                 *c_alloc_string(        //allocate string
00070 INT32                count                //no of chars required
00071 );
00072 
00073 void                 c_free_string(          //free a string
00074 char                 *string                 //string to free
00075 );
00076 
00077 void                 *c_alloc_mem_p(            //allocate permanent space
00078 INT32                count                //block size to allocate
00079 );
00080 
00081 void                 *c_alloc_mem(           //get some memory
00082 INT32                count                //no of bytes to get
00083 );
00084 
00085 void                 c_free_mem(             //free mem from alloc_mem
00086 void                 *oldchunk               //chunk to free
00087 );
00088 
00089 void                 c_check_mem(            //check consistency
00090 char                 *string,             //context message
00091 INT8                 level                //level of check
00092 );
00093 
00094 void*                c_alloc_struct(            //allocate memory
00095 INT32                count,                  //no of chars required
00096 const char*             name                 //class name
00097 );
00098 
00099 void                 c_free_struct(          //free a structure
00100 void*                deadstruct,             //structure to free
00101 INT32                count,                  //no of bytes
00102 const char*             name                 //class name
00103 );
00104 
00105 void                 c_make_current(            /*move pen*/
00106 void*                win
00107 );
00108 
00109 void                 reverse32(
00110 void*                ptr
00111 );
00112 
00113 void                 reverse16(
00114 void*                ptr
00115 );
00116 
00117 void*                c_create_window(        /*create a window*/
00118 const char              *name,                  /*name/title of window*/
00119 INT16                xpos,                /*coords of window*/
00120 INT16                ypos,                /*coords of window*/
00121 INT16                xsize,                  /*size of window*/
00122 INT16                ysize,                  /*size of window*/
00123 double                  xmin,                /*scrolling limits*/
00124 double                  xmax,                /*to stop users*/
00125 double                  ymin,                /*getting lost in*/
00126 double                  ymax                 /*empty space*/
00127 );
00128 
00129 void                 c_line_color_index(        /*set color*/
00130 void*                win,
00131 C_COL                index
00132 );
00133 
00134 void                 c_move(                 /*move pen*/
00135 void*                win,
00136 double                  x,
00137 double                  y
00138 );
00139 
00140 void                 c_draw(                 /*move pen*/
00141 void*                win,
00142 double                  x,
00143 double                  y
00144 );
00145 
00146 void                 c_clear_window(            /*move pen*/
00147 void*                win
00148 );
00149 
00150 char                 window_wait(            /*move pen*/
00151 void*                win
00152 );
00153 
00154 #endif

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