File: options.h

package info (click to toggle)
xli 1.17.0+20061110-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,540 kB
  • sloc: ansic: 25,840; makefile: 11
file content (113 lines) | stat: -rw-r--r-- 1,769 bytes parent folder | download
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/* options.h:
 *
 * optionNumber() definitions
 *
 * jim frost 10.03.89
 *
 * Copyright 1989 Jim Frost.  See included file "copyright.h" for complete
 * copyright information.
 */

/* enum with the options in it.  If you add one to this you also have to
 * add its information to Options[] in options.c before it becomes available.
 */

typedef enum option_id {

	/* flags */

	OPT_NOTOPT = 0,
	OPT_BADOPT,
	OPT_SHORTOPT,
	NAME,

	/* general options */

	GENERAL_OPTIONS_START,	/* marker */

	DBUG,
	DUMPCORE,
	DEFAULT,
	DELAY,
	DISPLAY,
	DISPLAYGAMMA,
	FILLSCREEN,
	FIT,
	FORK,
	FORALL,
	FULLSCREEN,
	GOTO,
	GEOMETRY,
	HELP,
	IDENTIFY,
	INSTALL,
	LIST,
	ONROOT,
	PATH,
	PIXMAP,
	PRIVATE,
	QUIET,
	SUPPORTED,
	VERBOSE,
	VER_NUM,
	VIEW,
	VISUAL,
	WINDOWID,
	CACHE,
	DELETE,
	FOCUS,

	GENERAL_OPTIONS_END,	/* marker */

	/* local options */

	LOCAL_OPTIONS_START,	/* marker */

	AT,
	BACKGROUND,
	BORDER,
	BRIGHT,
	CENTER,
	CLIP,
	COLORDITHER,
	COLORS,
	DITHER,
	EXPAND,
	FOREGROUND,
	GAMMA,
	GRAY,
	HALFTONE,
	IDELAY,
	INVERT,
	MERGE,
	NEWOPTIONS,
	NORMALIZE,
	ROTATE,
	SMOOTH,
	TITLE,
	XPM,
	XZOOM,
	YZOOM,
	ZOOM,
	ISCALE,

	LOCAL_OPTIONS_END	/* marker */

} OptionId;

typedef struct option_array {
	char *name;		/* name minus preceeding '-' */
	OptionId option_id;
	char *args;		/* arguments this option uses or NULL if none */
	char *description;	/* description of this option */
} OptionArray;

OptionId optionNumber(char *arg);	/* options.c */

#define isGeneralOption(opno) ((((int)(opno) > (int)GENERAL_OPTIONS_START) && \
			      ((int)(opno) < (int)GENERAL_OPTIONS_END))       \
			      ? TRUE : FALSE)

#define isLocalOption(opno) ((((int)(opno) > (int)LOCAL_OPTIONS_START) && \
			    ((int)(opno) < (int)LOCAL_OPTIONS_END))       \
			    ? TRUE : FALSE)