tesseract  4.00.00dev
structures.h
Go to the documentation of this file.
1 /* -*-C-*-
2  ********************************************************************************
3  *
4  * File: structures.h (Formerly structures.h)
5  * Description: Allocate all the different types of structures.
6  * Author: Mark Seaman, OCR Technology
7  * Created: Wed May 30 10:12:12 1990
8  * Modified: Tue May 21 11:07:47 1991 (Mark Seaman) marks@hpgrlt
9  * Language: C
10  * Package: N/A
11  * Status: Experimental (Do Not Distribute)
12  *
13  * (c) Copyright 1990, Hewlett-Packard Company.
14  ** Licensed under the Apache License, Version 2.0 (the "License");
15  ** you may not use this file except in compliance with the License.
16  ** You may obtain a copy of the License at
17  ** http://www.apache.org/licenses/LICENSE-2.0
18  ** Unless required by applicable law or agreed to in writing, software
19  ** distributed under the License is distributed on an "AS IS" BASIS,
20  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  ** See the License for the specific language governing permissions and
22  ** limitations under the License.
23  *
24  *********************************************************************************/
25 #ifndef STRUCTURES_H
26 #define STRUCTURES_H
27 
28 /*----------------------------------------------------------------------
29  I n c l u d e s
30 ----------------------------------------------------------------------*/
31 #include "oldlist.h"
32 #include "danerror.h"
33 
34 /*----------------------------------------------------------------------
35  M a c r o s
36 ----------------------------------------------------------------------*/
37 /**********************************************************************
38  * makestructure
39  *
40  * Allocate a chunk of memory for a particular data type. This macro
41  * defines an allocation, deallocation, and status printing function
42  * for each new data type.
43  **********************************************************************/
44 
45 #define makestructure(newfunc, old, type) \
46 type *newfunc() \
47 { \
48  return new type; \
49 } \
50  \
51  \
52  \
53 void old(type* deadelement) \
54 { \
55  delete deadelement; \
56 } \
57 
58 /*----------------------------------------------------------------------
59  F u n c t i o n s
60 ----------------------------------------------------------------------*/
61 extern LIST new_cell();
62 extern void free_cell(LIST);
63 #endif
void free_cell(LIST)
LIST new_cell()