BRL-CAD
vls_internals.h
Go to the documentation of this file.
1 /* V L S _ I N T E R N A L S . H
2  * BRL-CAD
3  *
4  * Copyright (c) 1998-2014 United States Government as represented by
5  * the U.S. Army Research Laboratory.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * version 2.1 as published by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this file; see the file named COPYING for more
18  * information.
19  */
20 
21 #ifndef LIBBU_VLS_INTERNALS_H
22 #define LIBBU_VLS_INTERNALS_H seen
23 
24 /* private constants */
25 
26 /* minimum vls allocation increment size */
27 static const size_t _VLS_ALLOC_STEP = 128;
28 
29 /* constant bit flags for var 'vp_part' */
30 #define VP_UNKNOWN 0x0001
31 #define VP_FLAG 0x0002
32 #define VP_LENGTH_MOD 0x0004
33 #define VP_CONVERSION_SPEC 0x0008
34 #define VP_MISC 0x0010
35 #define VP_VALID 0x0100
36 #define VP_OBSOLETE 0x1000
37 #define VP_PARTS (VP_FLAG | VP_LENGTH_MOD | VP_CONVERSION_SPEC | VP_MISC)
38 
39 /* other flags */
40 static const int VP_NOPRINT = 0;
41 static const int VP_PRINT = 1;
42 
43 /* private structs */
44 typedef struct
46 {
47  int fieldlen;
48  int flags;
50  int have_dot;
52  int precision;
53 } vflags_t;
54 
55 /* private shared function decls */
56 BU_EXPORT extern int format_part_status(const char c);
57 BU_EXPORT extern int handle_format_part(const int vp_part, vflags_t *f, const char c, const int print);
58 BU_EXPORT extern int handle_obsolete_format_char(const char c, const int print);
59 
60 #endif /* LIBBU_VLS_INTERNALS_H */
61 
62 /*
63  * Local Variables:
64  * mode: C
65  * tab-width: 8
66  * indent-tabs-mode: t
67  * c-file-style: "stroustrup"
68  * End:
69  * ex: shiftwidth=4 tabstop=8
70  */
int handle_obsolete_format_char(const char c, const int print)
Definition: vls_vprintf.c:269
int handle_format_part(const int vp_part, vflags_t *f, const char c, const int print)
Definition: vls_vprintf.c:172
struct vprintf_flags vflags_t
int format_part_status(const char c)
Definition: vls_vprintf.c:86