File: videogen.h

package info (click to toggle)
videogen 0.32-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 312 kB
  • ctags: 457
  • sloc: ansic: 1,134; sh: 524; yacc: 396; lex: 118; makefile: 84
file content (129 lines) | stat: -rw-r--r-- 3,520 bytes parent folder | download | duplicates (3)
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/* 
 * +-------------------------------------------------------+
 * |                                                       |
 * |     videogen                                          |
 * |                                                       |
 * |     a simple XFree86 Modeline calculator              |
 * |     (c) 1997-2002, Szabolcs Rumi                      |   
 * |                                                       |
 * |     http://www.rtfm.hu/videogen                       |
 * |                                                       |
 * |     the videogen package is distributed under the     |
 * |     GNU General Public License Version 2 (GPLv2)      |
 * |                                                       |
 * +-------------------------------------------------------+   
 */

#ifndef VIDEOGEN_H
# define VIDEOGEN_H





#define ERR_SYSTEM	100	/* environmental or system error */
#define ERR_CMDLINE	101	/* command line error */
#define ERR_CFGFILE	102	/* config file error */
#define ERR_RES		103	/* bad resolution */
#define ERR_MDC		104	/* bad max dot clock */
#define ERR_MHF		105	/* bad max horizontal freq */
#define ERR_MVF		106	/* bad max vertical freq */



#define VL_QUIET	0
#define VL_VERBOSE	1
#define VL_DEBUG	2





typedef struct {
	unsigned int hres;
	unsigned int vres;
} resolution_t;

extern char *cfgfile;
extern unsigned int verbose;
extern unsigned int fbset;
extern unsigned int nvidia;
extern unsigned int num_modes;
extern resolution_t modes[];
extern double max_dotclk;
extern double max_hfreq;
extern double max_vfreq;
extern double desired_vfreq;
extern double hvisible;
extern double vvisible;
extern double hfporch;
extern double hbporch;
extern double hsync;
extern double vfporch;
extern double vbporch;
extern double vsync;



extern void banner (void);
extern void usage (void);

extern int pmsg (int, char *, ...);
extern char *tpathexp (char *, char *);





#define ARG_FOUND		0x1
#define ARG_FOUND_PARM		0x2

typedef struct
{
	char *ao_option;		/* option string to be matched */
	char *ao_parameter;		/* argument parameter parsed */
	int ao_flags;			/* flags */
}
arg_opt_t;

typedef struct
{
	int aindex;			/* command line argument currently examined */
	int oindex;			/* option the current argument is believed to match */

	int argc;			/* argc to be parsed */
	char **argv;			/* argv to be parsed */

	arg_opt_t (*options)[];		/* pre-defined options list */
}
arg_parse_t;

extern arg_opt_t opts[];
extern int arg_action (arg_parse_t *);
extern int arg_parse (arg_parse_t *, int (*) (arg_parse_t *));



extern int commit_verbose (int, unsigned int *, unsigned int);
extern int commit_fbset (int, unsigned int *, unsigned int);
extern int commit_nvidia (int, unsigned int *, unsigned int);
extern int commit_mode (int, resolution_t (*)[], unsigned int *, unsigned int, unsigned int);
extern int commit_max_dotclk (int, double *, double);
extern int commit_max_hfreq (int, double *, double);
extern int commit_max_vfreq (int, double *, double);
extern int commit_desired_vfreq (int, double *, double);
extern int commit_hvisible (int, double *, double);
extern int commit_vvisible (int, double *, double);
extern int commit_hfporch (int, double *, double);
extern int commit_hbporch (int, double *, double);
extern int commit_hsync (int, double *, double);
extern int commit_vfporch (int, double *, double);
extern int commit_vbporch (int, double *, double);
extern int commit_vsync (int, double *, double);





#endif /* !VIDEOGEN_H */
/* EOF */