2005-01-09 20:21:22 +00:00
|
|
|
#ifndef OPTION_H
|
|
|
|
#define OPTION_H
|
|
|
|
|
2005-03-03 12:46:48 +00:00
|
|
|
#include <math.h>
|
2005-01-09 20:21:22 +00:00
|
|
|
#include "bygfoot.h"
|
2005-03-23 19:03:26 +00:00
|
|
|
#include "option_struct.h"
|
2005-01-09 20:21:22 +00:00
|
|
|
|
2005-03-03 12:46:48 +00:00
|
|
|
/** Convenience abbrevs. */
|
|
|
|
#define option_set_float(name, option_array, value) option_set_int(name, option_array, (gint)rint(value * 1000))
|
|
|
|
|
2005-03-23 19:03:26 +00:00
|
|
|
#define opt_str(name) option_string(name, &options)
|
|
|
|
#define opt_strp(name) option_string_pointer(name, &options)
|
|
|
|
#define opt_int(name) option_int(name, &options)
|
|
|
|
#define opt_intp(name) option_int_pointer(name, &options)
|
|
|
|
#define opt_float(name) option_float(name, &options)
|
2005-03-03 12:46:48 +00:00
|
|
|
|
2005-03-23 19:03:26 +00:00
|
|
|
#define opt_set_int(name, value) option_set_int(name, &options, value)
|
|
|
|
#define opt_set_str(name, value) option_set_string(name, &options, value)
|
|
|
|
#define opt_set_float(name, value) option_set_float(name, &options, value)
|
2005-03-03 12:46:48 +00:00
|
|
|
|
2005-03-23 19:03:26 +00:00
|
|
|
#define opt_user_str(name) option_string(name, ¤t_user.options)
|
|
|
|
#define opt_user_strp(name) option_string_pointer(name, ¤t_user.options)
|
|
|
|
#define opt_user_int(name) option_int(name, ¤t_user.options)
|
|
|
|
#define opt_user_intp(name) option_int_pointer(name, ¤t_user.options)
|
|
|
|
#define opt_user_float(name) option_float(name, ¤t_user.options)
|
2005-03-03 12:46:48 +00:00
|
|
|
|
2005-03-23 19:03:26 +00:00
|
|
|
#define opt_user_set_int(name, value) option_set_int(name, ¤t_user.options, value)
|
|
|
|
#define opt_user_set_str(name, value) option_set_string(name, ¤t_user.options, value)
|
|
|
|
#define opt_user_set_float(name, value) option_set_float(name, ¤t_user.options, value)
|
2005-03-03 12:46:48 +00:00
|
|
|
|
2005-03-23 19:03:26 +00:00
|
|
|
#define const_str(name) option_string(name, &constants)
|
|
|
|
#define const_int(name) option_int(name, &constants)
|
|
|
|
#define const_float(name) option_float(name, &constants)
|
2005-03-03 12:46:48 +00:00
|
|
|
|
|
|
|
gfloat
|
2005-03-23 19:03:26 +00:00
|
|
|
option_float(const gchar *name, OptionList *optionlist);
|
2005-03-03 12:46:48 +00:00
|
|
|
|
|
|
|
gint
|
2005-03-23 19:03:26 +00:00
|
|
|
option_int(const gchar *name, OptionList *optionlist);
|
|
|
|
|
|
|
|
gint*
|
|
|
|
option_int_pointer(const gchar *name, OptionList *optionlist);
|
2005-03-03 12:46:48 +00:00
|
|
|
|
|
|
|
gchar*
|
2005-03-23 19:03:26 +00:00
|
|
|
option_string(const gchar *name, OptionList *optionlist);
|
|
|
|
|
|
|
|
GString*
|
|
|
|
option_string_pointer(const gchar *name, OptionList *optionlist);
|
2005-03-03 12:46:48 +00:00
|
|
|
|
|
|
|
void
|
2005-03-23 19:03:26 +00:00
|
|
|
option_set_string(const gchar *name, OptionList *optionlist, const gchar *new_value);
|
2005-03-03 12:46:48 +00:00
|
|
|
|
|
|
|
void
|
2005-03-23 19:03:26 +00:00
|
|
|
option_set_int(const gchar *name, OptionList *optionlist, gint new_value);
|
2005-03-03 12:46:48 +00:00
|
|
|
|
2005-01-09 20:21:22 +00:00
|
|
|
#endif
|