Beispiel #1
0
unsigned long git_config_ulong(const char *name, const char *value)
{
	unsigned long ret;
	if (!git_parse_ulong(value, &ret))
		die_bad_config(name);
	return ret;
}
Beispiel #2
0
int perf_config_int(const char *name, const char *value)
{
	long ret = 0;
	if (!perf_parse_long(value, &ret))
		die_bad_config(name);
	return ret;
}
Beispiel #3
0
int git_config_int(const char *name, const char *value)
{
	long ret;
	if (!git_parse_long(value, &ret))
		die_bad_config(name);
	return ret;
}
Beispiel #4
0
/**
	Get a value as double

	\param key key
	\param value value to read
	\returns value
*/
static double as_double(const char *key, const char *value)
{
	double ret = 0;
	if (!parse_double(value, &ret))
		die_bad_config(key);
	return ret;
}
Beispiel #5
0
/**
	Get a value as unsigned int

	\param key key
	\param value value to read
	\returns value
*/
static unsigned int as_unsigned_int(const char *key, const char *value)
{
	unsigned long ret = 0;
	if (!parse_unsigned_long(value, &ret))
		die_bad_config(key);
	return ret;
}
Beispiel #6
0
/**
	Get a value as int

	\param key key
	\param value value to read
	\returns value
*/
static int as_int(const char *key, const char *value)
{
	long ret = 0;
	if (!parse_long(value, &ret))
		die_bad_config(key);
	return ret;
}
Beispiel #7
0
u64 perf_config_u64(const char *name, const char *value)
{
	long long ret = 0;

	if (!perf_parse_llong(value, &ret))
		die_bad_config(name);
	return (u64) ret;
}