Leptonica 1.85.0
Image processing and image analysis suite
Loading...
Searching...
No Matches
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 */
46LEPT_DLL extern const l_uint32 MaxInitPtraSize;
47
48/*------------------------------------------------------------------------*
49 * Generic Ptr Array Structs *
50 *------------------------------------------------------------------------*/
51
53struct L_Ptra
54{
55 l_int32 nalloc;
56 l_int32 imax;
57 l_int32 nactual;
58 void **array;
59};
60typedef struct L_Ptra L_PTRA;
61
62
64struct L_Ptraa
65{
66 l_int32 nalloc;
67 struct L_Ptra **ptra;
68};
69typedef struct L_Ptraa L_PTRAA;
70
71
72
73/*------------------------------------------------------------------------*
74 * Accessor and modifier flags for L_Ptra and L_Ptraa *
75 *------------------------------------------------------------------------*/
76
78enum {
80 L_COMPACTION = 2
81};
82
84enum {
88};
89
91enum {
93 L_REMOVE = 1
94};
95
96
97#endif /* LEPTONICA_PTRA_H */
@ L_REMOVE
Definition ptra.h:93
@ L_HANDLE_ONLY
Definition ptra.h:92
@ L_COMPACTION
Definition ptra.h:80
@ L_NO_COMPACTION
Definition ptra.h:79
@ L_AUTO_DOWNSHIFT
Definition ptra.h:85
@ L_FULL_DOWNSHIFT
Definition ptra.h:87
@ L_MIN_DOWNSHIFT
Definition ptra.h:86
Definition ptra.h:54
l_int32 nalloc
Definition ptra.h:55
l_int32 imax
Definition ptra.h:56
void ** array
Definition ptra.h:58
l_int32 nactual
Definition ptra.h:57
Definition ptra.h:65
l_int32 nalloc
Definition ptra.h:66
struct L_Ptra ** ptra
Definition ptra.h:67