return strtoul(s, NULL, 0);
}
+/*******************************************************************
+convenience routine to return unsigned long parameters.
+********************************************************************/
+static double lp_double(const char *s)
+{
+
+ if (!s) {
+ DEBUG(0,("lp_double(%s): is called with NULL!\n",s));
+ return (-1);
+ }
+
+ return strtod(s, NULL);
+}
+
/*******************************************************************
convenience routine to return boolean parameters.
********************************************************************/
return default_v;
}
+
+double lp_parm_double(int lookup_service, const char *type, const char *option, double default_v)
+{
+ const char *value = lp_get_parametric(lookup_service, type, option);
+
+ if (value)
+ return lp_double(value);
+
+ return default_v;
+}
+
/* Return parametric option from a given service. Type is a part of option before ':' */
/* Parametric option has following syntax: 'Type: option = value' */