#include "tessclas.h"
#include "oldlist.h"
#include "freelist.h"
#include "danerror.h"
Go to the source code of this file.
#define makestructure | ( | new, | |||
old, | |||||
print, | |||||
type, | |||||
nextfree, | |||||
blocksize, | |||||
typestring, | |||||
usecount | ) |
Allocate a chunk of memory for a particular data type.
This macro defines an allocation, deallocation, and status printing function for each new data type.
Definition at line 48 of file structures.h.
#define newstructure | ( | name, | |||
type, | |||||
nextfree, | |||||
blocksize, | |||||
errorstring, | |||||
usecount | ) |
#define NUM_DATA_TYPES 20 |
FIX:
Definition at line 32 of file structures.h.
#define oldstructure | ( | name, | |||
type, | |||||
nextfree, | |||||
stringtype, | |||||
usecount | ) |
Value:
\ type *name(type* deadelement)\ {\ type *returnelement; /*return next ptr*/\ \ if (deadelement==NULL)\ {\ cprintf("No of %ss in use=%d\n",stringtype,usecount);\ \ return (type *) 0x80000000;\ }\ returnelement=deadelement->next; /*return link*/\ ((type**)deadelement)[0]=nextfree; /*next free blob*/\ nextfree=deadelement;\ usecount--;\ return returnelement;\ }
Definition at line 168 of file structures.h.
TBLOB* newblob | ( | ) |
Referenced by assign_blobs_to_blocks2(), attempt_blob_chop(), and make_tess_blob().
EDGEPT* newedgept | ( | ) |
Referenced by make_edgept(), and make_tess_edgepts().
TESSLINE* newoutline | ( | ) |
Referenced by check_outline_mem(), make_single_split(), make_tess_outlines(), and undo_single_split().
TWERD* newword | ( | ) |
Referenced by make_tess_word().
Referenced by attempt_blob_chop(), delete_word(), free_blob(), rebuild_current_state(), and undo_seam().
Referenced by delete_edgepts(), free_loop(), make_tess_edgepts(), restore_outline(), and unsplit_outlines().
void oldoutline | ( | TESSLINE * | ) |
void oldword | ( | TWERD * | ) |
Referenced by delete_word().
int max_data_types |
Internal counter of data types, set by makestructure macro
Definition at line 46 of file structures.cpp.
void_void memory_print_functions[NUM_DATA_TYPES] |
Internal array of functions, set by makestructure macro
Definition at line 45 of file structures.cpp.