2 * rc.h -- declarations for configuration file processing
4 * AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #define DIALOGRC ".dialogrc"
24 #define COMMENT_LEN 70
32 /* Type of line in configuration file */
34 #define LINE_COMMENT 1
38 /* number of configuration variables */
39 #define VAR_COUNT (sizeof(vars) / sizeof(vars_st))
41 /* check if character is white space */
42 #define whitespace(c) (c == ' ' || c == '\t')
44 /* check if character is string quoting characters */
45 #define isquote(c) (c == '"' || c == '\'')
47 /* get last character of string */
48 #define lastch(str) str[strlen(str)-1]
51 * Configuration variables
54 unsigned char name
[VAR_LEN
]; /* name of configuration variable as in DIALOGRC */
55 void *var
; /* address of actually variable to change */
56 int type
; /* type of value */
57 unsigned char comment
[COMMENT_LEN
]; /* comment to put in "rc" file */
64 "Shadow dialog boxes? This also turns on color." },
69 "Turn color support ON or OFF" },
89 "Dialog box title color" },
94 "Dialog box border color" },
96 { "button_active_color",
99 "Active button color" },
101 { "button_inactive_color",
104 "Inactive button color" },
106 { "button_key_active_color",
109 "Active button key color" },
111 { "button_key_inactive_color",
114 "Inactive button key color" },
116 { "button_label_active_color",
119 "Active button label color" },
121 { "button_label_inactive_color",
124 "Inactive button label color" },
131 { "inputbox_border_color",
134 "Input box border color" },
139 "Search box color" },
141 { "searchbox_title_color",
144 "Search box title color" },
146 { "searchbox_border_color",
149 "Search box border color" },
151 { "position_indicator_color",
154 "File position indicator color" },
161 { "menubox_border_color",
164 "Menu box border color" },
171 { "item_selected_color",
174 "Selected item color" },
181 { "tag_selected_color",
184 "Selected tag color" },
191 { "tag_key_selected_color",
194 "Selected tag key color" },
201 { "check_selected_color",
204 "Selected check box color" },
220 * Routines to process configuration file