コード例 #1
0
ファイル: options.c プロジェクト: 20400992/tmux
struct grid_cell *
options_get_style(struct options *oo, const char *name)
{
	struct options_entry	*o;

	if ((o = options_find(oo, name)) == NULL)
		fatalx("missing option %s", name);
	if (o->type != OPTIONS_STYLE)
		fatalx("option %s not a style", name);
	return (&o->style);
}
コード例 #2
0
ファイル: options.c プロジェクト: 20400992/tmux
char *
options_get_string(struct options *oo, const char *name)
{
	struct options_entry	*o;

	if ((o = options_find(oo, name)) == NULL)
		fatalx("missing option %s", name);
	if (o->type != OPTIONS_STRING)
		fatalx("option %s not a string", name);
	return (o->str);
}
コード例 #3
0
ファイル: options.c プロジェクト: 20400992/tmux
long long
options_get_number(struct options *oo, const char *name)
{
	struct options_entry	*o;

	if ((o = options_find(oo, name)) == NULL)
		fatalx("missing option %s", name);
	if (o->type != OPTIONS_NUMBER)
		fatalx("option %s not a number", name);
	return (o->num);
}
コード例 #4
0
ファイル: options.c プロジェクト: Hooman3/minix
void *
options_get_data(struct options *oo, const char *name)
{
	struct options_entry	*o;

	if ((o = options_find(oo, name)) == NULL)
		fatalx("missing option");
	if (o->type != OPTIONS_DATA)
		fatalx("option not data");
	return (o->data);
}