cutil/callcpp.h File Reference

#include "host.h"
#include "varable.h"

Go to the source code of this file.

Defines

Enumerations

Functions

Variables


Define Documentation

#define INTEL   0x4949

For testing Big-endian vs Small-endian

Definition at line 86 of file callcpp.h.

Referenced by open_tif_image(), write_intel_tif(), write_inverse_tif(), and write_tif_image().

#define MOTO   0x4d4d

Definition at line 87 of file callcpp.h.

Referenced by open_tif_image(), write_moto_tif(), and write_tif_image().


Enumeration Type Documentation

enum C_COL

Starbase colors.

Enumerator:
Black 
White 
Red 
Yellow 
Green 
Cyan 
Blue 
Magenta 
Aquamarine 
Dark_SLATE_BLUE 
Light_BLUE 
Medium_BLUE 
Midnight_BLUE 
Navy_BLUE 
Sky_BLUE 
Slate_BLUE 
Steel_BLUE 
Coral 
Brown 
Sandy_BROWN 
Gold 
GoldENROD 
Dark_GREEN 
Dark_OLIVE_GREEN 
Forest_GREEN 
Lime_GREEN 
Pale_GREEN 
Yellow_GREEN 
Light_GREY 
Dark_SLATE_GREY 
Dim_GREY 
Grey 
Khaki 
Maroon 
Orange 
Orchid 
Pink 
Plum 
Indian_RED 
Orange_RED 
Violet_RED 
Salmon 
Tan 
Turqoise 
Dark_TURQUOISE 
Violet 
Wheat 
Green_YELLOW 

Definition at line 34 of file callcpp.h.

00034              {
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;


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  ) 

Allocate count units of memory.

Parameters:
count Number of bytes to get
Returns:
Pointer to new memory or NULL

Definition at line 149 of file callcpp.cpp.

00151                    {
00152   return alloc_mem (count);
00153 }

void* c_alloc_mem_p ( INT32  count  ) 

Allocate permanent space.

Parameters:
count Block size to allocate

Definition at line 142 of file callcpp.cpp.

00144                      {
00145   return alloc_mem_p (count);
00146 }

char* c_alloc_string ( INT32  count  ) 

Allocate string.

Parameters:
count Number of chars required
Returns:
Pointer to memory or NULL

Definition at line 111 of file callcpp.cpp.

00113                       {
00114   return alloc_string (count);
00115 }

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

Allocate count units of memory for name Class.

Parameters:
count Number of chars required
name Class name

Definition at line 125 of file callcpp.cpp.

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

void c_check_mem ( const char *  string,
INT8  level 
)

Check consistency of string.

Parameters:
string Context message
level Level of check

Definition at line 163 of file callcpp.cpp.

References check_mem().

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

void c_clear_window ( void *  win  ) 

Clear window.

Parameters:
win Window

Definition at line 227 of file callcpp.cpp.

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 
)

Create new window for training interface.

Parameters:
name Name/title of window
xpos X coord of window
ypos Y coord of window
xsize Width, size of window
ysize Height, size of window
xmin Minimum x user can scroll
xmax Maximum x user can scroll
ymin Minimum y user can scroll
ymax Maximum y user can scroll

Definition at line 171 of file callcpp.cpp.

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 
)

Draw line to new point (x,y) and move pen.

Parameters:
win Window
x To x
y To y

Definition at line 209 of file callcpp.cpp.

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

void c_free_mem ( void *  oldchunk  ) 

Free mem from alloc_mem.

Parameters:
oldchunk Chunk to free

Definition at line 156 of file callcpp.cpp.

00158                  {
00159   free_mem(oldchunk); 
00160 }

void c_free_string ( char *  string  ) 

Free a string.

Parameters:
string String to free

Definition at line 118 of file callcpp.cpp.

00120                     {
00121   free_string(string); 
00122 }

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

Free a structure of count bytes.

Parameters:
deadstruct Structure to free
count Number of bytes
name Class name

Definition at line 133 of file callcpp.cpp.

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

void c_line_color_index ( void *  win,
C_COL  index 
)

Sets color of line.

Parameters:
win Window
index Color (0 to 48) to set line to

Definition at line 187 of file callcpp.cpp.

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  ) 

Make picture current, FIX:.

Parameters:
win Window

Definition at line 219 of file callcpp.cpp.

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

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

Move "current location" to new point (x,y).

Parameters:
win Window
x To x
y To y

Definition at line 199 of file callcpp.cpp.

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

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

Does nothing at all, might output a trace printf.

Parameters:
format Special message
... Additional parameters

Definition at line 97 of file callcpp.cpp.

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  ) 

Inverts/flips 16-bit data (2 characters) pointed to by ptr.

Parameters:
ptr Pointer to data

Definition at line 261 of file callcpp.cpp.

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  ) 

Inverts/flips 32-bit data (4 characters) pointed to by ptr.

Parameters:
ptr Pointer to data

Definition at line 248 of file callcpp.cpp.

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  ) 

Move pen.

Parameters:
win Window

Definition at line 235 of file callcpp.cpp.

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:21 2007 for Tesseract by  doxygen 1.5.1