-
Notifications
You must be signed in to change notification settings - Fork 1
/
vars.h
62 lines (55 loc) · 1.59 KB
/
vars.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* vars.h - Zedit variable defines
* Copyright (C) 1988-2016 Sean MacLennan
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License
* along with this project; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef _VARS_H_
#define _VARS_H_
/** @addtogroup zedit
* @{
*/
enum v_type { V_STRING, V_DECIMAL, V_FLAG };
/* The variable structure. */
struct avar {
const char *vname;
enum v_type vtype;
union {
char *str;
int val;
} u;
const char *doc;
};
extern struct avar Vars[];
/* Handy macros */
#define VAR(n) Vars[n].u.val
#define VARSTR(n) Vars[n].u.str
/* var defines */
#define VBACKUP 0
#define VCEXTS (VBACKUP + 1)
#define VCTABS (VCEXTS + 1)
#define VCOMMENTS (VCTABS + 1)
#define VEXACT (VCOMMENTS + 1)
#define VFILLWIDTH (VEXACT + 1)
#define VMAKE (VFILLWIDTH + 1)
#define VNORMAL (VMAKE + 1)
#define VSEXTS (VNORMAL + 1)
#define VSHTABS (VSEXTS + 1)
#define VSPACETAB (VSHTABS + 1)
#define VTEXTS (VSPACETAB + 1)
#define VTABS (VTEXTS + 1)
#define NUMVARS (VTABS + 1)
/* @} */
#endif