xref: /freebsd/lib/libdpv/dialogrc.h (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
1041394f3SDevin Teske /*-
2*9d9cc246SDevin Teske  * Copyright (c) 2013-2015 Devin Teske <dteske@FreeBSD.org>
3041394f3SDevin Teske  * All rights reserved.
4041394f3SDevin Teske  *
5041394f3SDevin Teske  * Redistribution and use in source and binary forms, with or without
6041394f3SDevin Teske  * modification, are permitted provided that the following conditions
7041394f3SDevin Teske  * are met:
8041394f3SDevin Teske  * 1. Redistributions of source code must retain the above copyright
9041394f3SDevin Teske  *    notice, this list of conditions and the following disclaimer.
10041394f3SDevin Teske  * 2. Redistributions in binary form must reproduce the above copyright
11041394f3SDevin Teske  *    notice, this list of conditions and the following disclaimer in the
12041394f3SDevin Teske  *    documentation and/or other materials provided with the distribution.
13041394f3SDevin Teske  *
14041394f3SDevin Teske  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15041394f3SDevin Teske  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16041394f3SDevin Teske  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17041394f3SDevin Teske  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18041394f3SDevin Teske  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19041394f3SDevin Teske  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20041394f3SDevin Teske  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21041394f3SDevin Teske  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22041394f3SDevin Teske  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23041394f3SDevin Teske  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24041394f3SDevin Teske  * SUCH DAMAGE.
25041394f3SDevin Teske  */
26041394f3SDevin Teske 
27041394f3SDevin Teske #ifndef _DIALOGRC_H_
28041394f3SDevin Teske #define _DIALOGRC_H_
29041394f3SDevin Teske 
30041394f3SDevin Teske #include <sys/types.h>
31041394f3SDevin Teske 
32041394f3SDevin Teske #include <figpar.h>
33041394f3SDevin Teske 
34041394f3SDevin Teske /* dialog(3) dlg_color_table[] attributes */
35041394f3SDevin Teske #define GAUGE_ATTR	33	/* entry used for gauge_color */
36041394f3SDevin Teske 
37041394f3SDevin Teske /* dialog(1) characteristics */
38041394f3SDevin Teske #define DIALOGRC	".dialogrc"
39041394f3SDevin Teske #define ENV_DIALOGRC	"DIALOGRC"
40041394f3SDevin Teske #define ENV_HOME	"HOME"
41041394f3SDevin Teske 
42041394f3SDevin Teske /* dialog(1) `.dialogrc' characteristics */
43041394f3SDevin Teske extern uint8_t use_colors;
44041394f3SDevin Teske extern uint8_t use_shadow;
45041394f3SDevin Teske extern char gauge_color[];
46041394f3SDevin Teske extern char separator[];
47041394f3SDevin Teske 
48041394f3SDevin Teske __BEGIN_DECLS
49041394f3SDevin Teske void			 dialogrc_free(void);
50041394f3SDevin Teske int			 parse_dialogrc(void);
51*9d9cc246SDevin Teske struct figpar_config	*dialogrc_config_option(const char *_directive);
52041394f3SDevin Teske __END_DECLS
53041394f3SDevin Teske 
54041394f3SDevin Teske #endif /* !_DIALOGRC_H_ */
55