Leptonica
1.82.0
Image processing and image analysis suite
ptra.h
Go to the documentation of this file.
1
/*====================================================================*
2
- Copyright (C) 2001 Leptonica. All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without
5
- modification, are permitted provided that the following conditions
6
- are met:
7
- 1. Redistributions of source code must retain the above copyright
8
- notice, this list of conditions and the following disclaimer.
9
- 2. Redistributions in binary form must reproduce the above
10
- copyright notice, this list of conditions and the following
11
- disclaimer in the documentation and/or other materials
12
- provided with the distribution.
13
-
14
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15
- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY
18
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22
- OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
*====================================================================*/
26
27
#ifndef LEPTONICA_PTRA_H
28
#define LEPTONICA_PTRA_H
29
45
/* Bound on max initial ptra size */
46
LEPT_DLL
extern
const
l_uint32 MaxInitPtraSize;
47
48
/*------------------------------------------------------------------------*
49
* Generic Ptr Array Structs *
50
*------------------------------------------------------------------------*/
51
53
struct
L_Ptra
54
{
55
l_int32
nalloc
;
56
l_int32
imax
;
57
l_int32
nactual
;
58
void
**
array
;
59
};
60
typedef
struct
L_Ptra
L_PTRA
;
61
62
64
struct
L_Ptraa
65
{
66
l_int32
nalloc
;
67
struct
L_Ptra
**
ptra
;
68
};
69
typedef
struct
L_Ptraa
L_PTRAA
;
70
71
72
73
/*------------------------------------------------------------------------*
74
* Accessor and modifier flags for L_Ptra and L_Ptraa *
75
*------------------------------------------------------------------------*/
76
78
enum
{
79
L_NO_COMPACTION
= 1,
80
L_COMPACTION
= 2
81
};
82
84
enum
{
85
L_AUTO_DOWNSHIFT
= 0,
86
L_MIN_DOWNSHIFT
= 1,
87
L_FULL_DOWNSHIFT
= 2
88
};
89
91
enum
{
92
L_HANDLE_ONLY
= 0,
93
L_REMOVE
= 1
94
};
95
96
97
#endif
/* LEPTONICA_PTRA_H */
L_REMOVE
@ L_REMOVE
Definition:
ptra.h:93
L_HANDLE_ONLY
@ L_HANDLE_ONLY
Definition:
ptra.h:92
L_COMPACTION
@ L_COMPACTION
Definition:
ptra.h:80
L_NO_COMPACTION
@ L_NO_COMPACTION
Definition:
ptra.h:79
L_AUTO_DOWNSHIFT
@ L_AUTO_DOWNSHIFT
Definition:
ptra.h:85
L_FULL_DOWNSHIFT
@ L_FULL_DOWNSHIFT
Definition:
ptra.h:87
L_MIN_DOWNSHIFT
@ L_MIN_DOWNSHIFT
Definition:
ptra.h:86
L_Ptra
Definition:
ptra.h:54
L_Ptra::nalloc
l_int32 nalloc
Definition:
ptra.h:55
L_Ptra::imax
l_int32 imax
Definition:
ptra.h:56
L_Ptra::array
void ** array
Definition:
ptra.h:58
L_Ptra::nactual
l_int32 nactual
Definition:
ptra.h:57
L_Ptraa
Definition:
ptra.h:65
L_Ptraa::nalloc
l_int32 nalloc
Definition:
ptra.h:66
L_Ptraa::ptra
struct L_Ptra ** ptra
Definition:
ptra.h:67
src
ptra.h
Generated by
1.9.1