Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 "freelist.h"
33 #include "danerror.h"
34
35 /*----------------------------------------------------------------------
36 M a c r o s
37 ----------------------------------------------------------------------*/
38 /**********************************************************************
39 * makestructure
40 *
41 * Allocate a chunk of memory for a particular data type. This macro
42 * defines an allocation, deallocation, and status printing function
43 * for each new data type.
44 **********************************************************************/
45
46 #define makestructure(newfunc, old, type) \
47 type *newfunc() \
48 { \
49 return new type; \
50 } \
51 \
52 \
53 \
54 void old(type* deadelement) \
55 { \
56 delete deadelement; \
57 } \
58
59 /*----------------------------------------------------------------------
60 F u n c t i o n s
61 ----------------------------------------------------------------------*/
62 extern LIST new_cell();
63 extern void free_cell(LIST);
64 #endif