Yimmo Env Utils

Functions

int ymo_env_as_long(const char *env_name, long *value, long *def_val)
Parameters
  • env_name – the name of the environment variable

  • value – the value of the env var as a long, if valid

  • def_val – an optional default value to use if the env var isn’t valid

Returns

0 on success; else, the return value is an errno code.

int ymo_env_as_float(const char *env_name, float *value, float *def_val)
Parameters
  • env_name – the name of the environment variable

  • value – the value of the env var as a float, if valid

  • def_val – an optional default value to use if the env var isn’t valid

Returns

0 on success; else, the return value is an errno code.

int ymo_env_as_double(const char *env_name, double *value, double *def_val)
Parameters
  • env_name – the name of the environment variable

  • value – the value of the env var as a double, if valid

  • def_val – an optional default value to use if the env var isn’t valid

Returns

0 on success; else, the return value is an errno code.