summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/currency-manager.c19
-rw-r--r--src/currency.c8
-rw-r--r--src/financial.c10
-rw-r--r--src/mate-calc-cmd.c1
-rw-r--r--src/mate-calc.c4
-rw-r--r--src/math-buttons.c47
-rw-r--r--src/math-converter.c17
-rw-r--r--src/math-display.c9
-rw-r--r--src/math-equation.c88
-rw-r--r--src/math-preferences.c22
-rw-r--r--src/math-variable-popup.c12
-rw-r--r--src/math-variables.c10
-rw-r--r--src/math-window.c7
-rw-r--r--src/mp-binary.c11
-rw-r--r--src/mp-convert.c9
-rw-r--r--src/mp-equation.c7
-rw-r--r--src/mp-serializer.c29
-rw-r--r--src/mp-trigonometric.c13
-rw-r--r--src/mp.c1
-rw-r--r--src/test-mp-equation.c11
-rw-r--r--src/test-mp.c6
-rw-r--r--src/unit-category.c10
-rw-r--r--src/unit-manager.c11
-rw-r--r--src/unit.c13
24 files changed, 0 insertions, 375 deletions
diff --git a/src/currency-manager.c b/src/currency-manager.c
index 5ffffa4..4e2b1ef 100644
--- a/src/currency-manager.c
+++ b/src/currency-manager.c
@@ -101,7 +101,6 @@ struct CurrencyManagerPrivate
G_DEFINE_TYPE_WITH_PRIVATE (CurrencyManager, currency_manager, G_TYPE_OBJECT);
-
enum {
UPDATED,
LAST_SIGNAL
@@ -110,7 +109,6 @@ static guint signals[LAST_SIGNAL] = { 0, };
static CurrencyManager *default_currency_manager = NULL;
-
CurrencyManager *
currency_manager_get_default(void)
{
@@ -131,7 +129,6 @@ currency_manager_get_default(void)
return default_currency_manager;
}
-
GList *
currency_manager_get_currencies(CurrencyManager *manager)
{
@@ -139,7 +136,6 @@ currency_manager_get_currencies(CurrencyManager *manager)
return manager->priv->currencies;
}
-
Currency *
currency_manager_get_currency(CurrencyManager *manager, const gchar *name)
{
@@ -165,7 +161,6 @@ currency_manager_get_currency(CurrencyManager *manager, const gchar *name)
return NULL;
}
-
static char *
get_imf_rate_filepath(void)
{
@@ -175,7 +170,6 @@ get_imf_rate_filepath(void)
NULL);
}
-
static char *
get_ecb_rate_filepath(void)
{
@@ -185,7 +179,6 @@ get_ecb_rate_filepath(void)
NULL);
}
-
static Currency *
add_currency(CurrencyManager *manager, const gchar *short_name)
{
@@ -205,7 +198,6 @@ add_currency(CurrencyManager *manager, const gchar *short_name)
return c;
}
-
/* A file needs to be redownloaded if it doesn't exist, or is too old.
* When an error occur, it probably won't hurt to try to download again.
*/
@@ -226,7 +218,6 @@ file_needs_update(gchar *filename, double max_age)
return FALSE;
}
-
static void
download_imf_cb(GObject *object, GAsyncResult *result, gpointer user_data)
{
@@ -242,7 +233,6 @@ download_imf_cb(GObject *object, GAsyncResult *result, gpointer user_data)
load_rates(manager);
}
-
static void
download_ecb_cb(GObject *object, GAsyncResult *result, gpointer user_data)
{
@@ -258,7 +248,6 @@ download_ecb_cb(GObject *object, GAsyncResult *result, gpointer user_data)
load_rates(manager);
}
-
static void
download_file(CurrencyManager *manager, gchar *uri, gchar *filename, GAsyncReadyCallback callback)
{
@@ -277,7 +266,6 @@ download_file(CurrencyManager *manager, gchar *uri, gchar *filename, GAsyncReady
g_object_unref(dest);
}
-
static void
load_imf_rates(CurrencyManager *manager)
{
@@ -414,7 +402,6 @@ load_imf_rates(CurrencyManager *manager)
g_strfreev(lines);
}
-
static void
set_ecb_rate(CurrencyManager *manager, xmlNodePtr node, Currency *eur_rate)
{
@@ -455,7 +442,6 @@ set_ecb_rate(CurrencyManager *manager, xmlNodePtr node, Currency *eur_rate)
xmlFree(value);
}
-
static void
set_ecb_fixed_rate(CurrencyManager *manager, const gchar *name, const gchar *value, Currency *eur_rate)
{
@@ -473,7 +459,6 @@ set_ecb_fixed_rate(CurrencyManager *manager, const gchar *name, const gchar *val
mp_clear(&v);
}
-
static void
load_ecb_rates(CurrencyManager *manager)
{
@@ -538,7 +523,6 @@ load_ecb_rates(CurrencyManager *manager)
xmlCleanupParser();
}
-
static gboolean
load_rates(CurrencyManager *manager)
{
@@ -575,7 +559,6 @@ load_rates(CurrencyManager *manager)
return TRUE;
}
-
const MPNumber *
currency_manager_get_value(CurrencyManager *manager, const gchar *currency)
{
@@ -611,7 +594,6 @@ currency_manager_get_value(CurrencyManager *manager, const gchar *currency)
return NULL;
}
-
static void
currency_manager_class_init(CurrencyManagerClass *klass)
{
@@ -625,7 +607,6 @@ currency_manager_class_init(CurrencyManagerClass *klass)
G_TYPE_NONE, 0);
}
-
static void
currency_manager_init(CurrencyManager *manager)
{
diff --git a/src/currency.c b/src/currency.c
index a6295ee..6829267 100644
--- a/src/currency.c
+++ b/src/currency.c
@@ -25,7 +25,6 @@ struct CurrencyPrivate
G_DEFINE_TYPE_WITH_PRIVATE (Currency, currency, G_TYPE_OBJECT);
-
Currency *
currency_new(const gchar *name,
const gchar *display_name,
@@ -41,7 +40,6 @@ currency_new(const gchar *name,
return currency;
}
-
const gchar *
currency_get_name(Currency *currency)
{
@@ -49,7 +47,6 @@ currency_get_name(Currency *currency)
return currency->priv->name;
}
-
const gchar *
currency_get_display_name(Currency *currency)
{
@@ -57,7 +54,6 @@ currency_get_display_name(Currency *currency)
return currency->priv->display_name;
}
-
const gchar *
currency_get_symbol(Currency *currency)
{
@@ -65,7 +61,6 @@ currency_get_symbol(Currency *currency)
return currency->priv->symbol;
}
-
void
currency_set_value(Currency *currency, MPNumber *value)
{
@@ -74,7 +69,6 @@ currency_set_value(Currency *currency, MPNumber *value)
mp_set_from_mp (value, &currency->priv->value);
}
-
const MPNumber *
currency_get_value(Currency *currency)
{
@@ -82,13 +76,11 @@ currency_get_value(Currency *currency)
return &currency->priv->value;
}
-
static void
currency_class_init(CurrencyClass *klass)
{
}
-
static void
currency_init(Currency *currency)
{
diff --git a/src/financial.c b/src/financial.c
index 97ae50c..8bb208d 100644
--- a/src/financial.c
+++ b/src/financial.c
@@ -41,7 +41,6 @@ calc_ctrm(MPNumber *t, MPNumber *pint, MPNumber *fv, MPNumber *pv)
mp_clear(&MP4);
}
-
static void
calc_ddb(MathEquation *equation, MPNumber *t, MPNumber *cost, MPNumber *life, MPNumber *period)
{
@@ -85,7 +84,6 @@ calc_ddb(MathEquation *equation, MPNumber *t, MPNumber *cost, MPNumber *life, MP
mp_clear(&MP2);
}
-
static void
calc_fv(MPNumber *t, MPNumber *pmt, MPNumber *pint, MPNumber *n)
{
@@ -114,7 +112,6 @@ calc_fv(MPNumber *t, MPNumber *pmt, MPNumber *pint, MPNumber *n)
mp_clear(&MP4);
}
-
static void
calc_gpm(MPNumber *t, MPNumber *cost, MPNumber *margin)
{
@@ -136,7 +133,6 @@ calc_gpm(MPNumber *t, MPNumber *cost, MPNumber *margin)
mp_clear(&MP2);
}
-
static void
calc_pmt(MPNumber *t, MPNumber *prin, MPNumber *pint, MPNumber *n)
{
@@ -167,7 +163,6 @@ calc_pmt(MPNumber *t, MPNumber *prin, MPNumber *pint, MPNumber *n)
mp_clear(&MP4);
}
-
static void
calc_pv(MPNumber *t, MPNumber *pmt, MPNumber *pint, MPNumber *n)
{
@@ -198,7 +193,6 @@ calc_pv(MPNumber *t, MPNumber *pmt, MPNumber *pint, MPNumber *n)
mp_clear(&MP4);
}
-
static void
calc_rate(MPNumber *t, MPNumber *fv, MPNumber *pv, MPNumber *n)
{
@@ -227,7 +221,6 @@ calc_rate(MPNumber *t, MPNumber *fv, MPNumber *pv, MPNumber *n)
mp_clear(&MP4);
}
-
static void
calc_sln(MPNumber *t, MPNumber *cost, MPNumber *salvage, MPNumber *life)
{
@@ -245,7 +238,6 @@ calc_sln(MPNumber *t, MPNumber *cost, MPNumber *salvage, MPNumber *life)
mp_clear(&MP1);
}
-
static void
calc_syd(MPNumber *t, MPNumber *cost, MPNumber *salvage, MPNumber *life, MPNumber *period)
{
@@ -280,7 +272,6 @@ calc_syd(MPNumber *t, MPNumber *cost, MPNumber *salvage, MPNumber *life, MPNumbe
mp_clear(&MP4);
}
-
static void
calc_term(MPNumber *t, MPNumber *pmt, MPNumber *fv, MPNumber *pint)
{
@@ -311,7 +302,6 @@ calc_term(MPNumber *t, MPNumber *pmt, MPNumber *fv, MPNumber *pint)
mp_clear(&MP4);
}
-
void
do_finc_expression(MathEquation *equation, int function, MPNumber *arg1, MPNumber *arg2, MPNumber *arg3, MPNumber *arg4)
{
diff --git a/src/mate-calc-cmd.c b/src/mate-calc-cmd.c
index 9075310..842eab5 100644
--- a/src/mate-calc-cmd.c
+++ b/src/mate-calc-cmd.c
@@ -49,7 +49,6 @@ solve(const char *equation)
mp_clear(&z);
}
-
/* Adjust user input equation string before solving it. */
static void
str_adjust(char *str)
diff --git a/src/mate-calc.c b/src/mate-calc.c
index 99224ba..da95462 100644
--- a/src/mate-calc.c
+++ b/src/mate-calc.c
@@ -36,14 +36,12 @@ version(const gchar *progname)
fprintf(stderr, "%1$s %2$s\n", progname, VERSION);
}
-
static int
do_convert(const MPNumber *x, const char *x_units, const char *z_units, MPNumber *z, void *data)
{
return unit_manager_convert_by_symbol(unit_manager_get_default(), x, x_units, z_units, z);
}
-
static void
solve(const char *equation)
{
@@ -77,7 +75,6 @@ solve(const char *equation)
}
}
-
static void
usage(const gchar *progname, gboolean show_application, gboolean show_gtk)
{
@@ -123,7 +120,6 @@ usage(const gchar *progname, gboolean show_application, gboolean show_gtk)
}
}
-
static void
get_options(int argc, char *argv[])
{
diff --git a/src/math-buttons.c b/src/math-buttons.c
index 500c9ca..19195aa 100644
--- a/src/math-buttons.c
+++ b/src/math-buttons.c
@@ -301,7 +301,6 @@ static char *finc_dialog_fields[][5] = {
{NULL, NULL, NULL, NULL, NULL}
};
-
MathButtons *
math_buttons_new(MathEquation *equation)
{
@@ -317,7 +316,6 @@ set_data(GtkBuilder *ui, const gchar *object_name, const gchar *name, const char
g_object_set_data(object, name, GINT_TO_POINTER(value));
}
-
static void
set_int_data(GtkBuilder *ui, const gchar *object_name, const gchar *name, gint value)
{
@@ -327,7 +325,6 @@ set_int_data(GtkBuilder *ui, const gchar *object_name, const gchar *name, gint v
g_object_set_data(object, name, GINT_TO_POINTER(value));
}
-
static void
load_finc_dialogs(MathButtons *buttons)
{
@@ -354,7 +351,6 @@ load_finc_dialogs(MathButtons *buttons)
}
}
-
static void
update_bit_panel(MathButtons *buttons)
{
@@ -430,14 +426,12 @@ update_bit_panel(MathButtons *buttons)
mp_clear(&x);
}
-
static void
display_changed_cb(MathEquation *equation, GParamSpec *spec, MathButtons *buttons)
{
update_bit_panel(buttons);
}
-
static void
base_combobox_changed_cb(GtkWidget *combo, MathButtons *buttons)
{
@@ -452,7 +446,6 @@ base_combobox_changed_cb(GtkWidget *combo, MathButtons *buttons)
math_buttons_set_programming_base(buttons, value);
}
-
static void
base_changed_cb(MathEquation *equation, GParamSpec *spec, MathButtons *buttons)
{
@@ -481,7 +474,6 @@ base_changed_cb(MathEquation *equation, GParamSpec *spec, MathButtons *buttons)
gtk_combo_box_set_active_iter(GTK_COMBO_BOX(buttons->priv->base_combo), &iter);
}
-
static GtkWidget *
load_mode(MathButtons *buttons, ButtonMode mode)
{
@@ -675,7 +667,6 @@ out:
return *panel;
}
-
static void
converter_changed_cb(MathConverter *converter, MathButtons *buttons)
{
@@ -695,7 +686,6 @@ converter_changed_cb(MathConverter *converter, MathButtons *buttons)
g_object_unref(to_unit);
}
-
static void
load_buttons(MathButtons *buttons)
{
@@ -724,7 +714,6 @@ load_buttons(MathButtons *buttons)
gtk_widget_show(panel);
}
-
void
math_buttons_set_mode(MathButtons *buttons, ButtonMode mode)
{
@@ -759,14 +748,12 @@ math_buttons_set_mode(MathButtons *buttons, ButtonMode mode)
g_object_notify(G_OBJECT(buttons), "mode");
}
-
ButtonMode
math_buttons_get_mode(MathButtons *buttons)
{
return buttons->priv->mode;
}
-
void
math_buttons_set_programming_base(MathButtons *buttons, gint base)
{
@@ -783,7 +770,6 @@ math_buttons_set_programming_base(MathButtons *buttons, gint base)
math_equation_set_base(buttons->priv->equation, base);
}
-
gint
math_buttons_get_programming_base(MathButtons *buttons)
{
@@ -791,7 +777,6 @@ math_buttons_get_programming_base(MathButtons *buttons)
return buttons->priv->programming_base;
}
-
void exponent_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -800,7 +785,6 @@ exponent_cb(GtkWidget *widget, MathButtons *buttons)
math_equation_insert_exponent(buttons->priv->equation);
}
-
void subtract_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -809,7 +793,6 @@ subtract_cb(GtkWidget *widget, MathButtons *buttons)
math_equation_insert_subtract(buttons->priv->equation);
}
-
void button_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -818,7 +801,6 @@ button_cb(GtkWidget *widget, MathButtons *buttons)
math_equation_insert(buttons->priv->equation, g_object_get_data(G_OBJECT(widget), "calc_text"));
}
-
void solve_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -827,7 +809,6 @@ solve_cb(GtkWidget *widget, MathButtons *buttons)
math_equation_solve(buttons->priv->equation);
}
-
void clear_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -836,7 +817,6 @@ clear_cb(GtkWidget *widget, MathButtons *buttons)
math_equation_clear(buttons->priv->equation);
}
-
void delete_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -845,7 +825,6 @@ delete_cb(GtkWidget *widget, MathButtons *buttons)
math_equation_delete(buttons->priv->equation);
}
-
void undo_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -854,7 +833,6 @@ undo_cb(GtkWidget *widget, MathButtons *buttons)
math_equation_undo(buttons->priv->equation);
}
-
static void
shift_cb(GtkWidget *widget, MathButtons *buttons)
{
@@ -871,7 +849,6 @@ popup_button_menu(GtkWidget *widget, GtkMenu *menu)
NULL);
}
-
void memory_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -890,7 +867,6 @@ memory_cb(GtkWidget *widget, MathButtons *buttons)
gtk_widget_show(GTK_WIDGET(popup));
}
-
void shift_left_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -932,7 +908,6 @@ shift_left_cb(GtkWidget *widget, MathButtons *buttons)
popup_button_menu(widget, GTK_MENU(buttons->priv->shift_left_menu));
}
-
void shift_right_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -974,14 +949,12 @@ shift_right_cb(GtkWidget *widget, MathButtons *buttons)
popup_button_menu(widget, GTK_MENU(buttons->priv->shift_right_menu));
}
-
static void
insert_function_cb(GtkWidget *widget, MathButtons *buttons)
{
math_equation_insert(buttons->priv->equation, g_object_get_data(G_OBJECT(widget), "function"));
}
-
void function_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -1033,7 +1006,6 @@ insert_const_cb(GtkWidget *widget, MathButtons *buttons)
math_equation_insert(buttons->priv->equation, g_object_get_data(G_OBJECT(widget), "const"));
}
-
void const_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -1094,7 +1066,6 @@ factorize_cb(GtkWidget *widget, MathButtons *buttons)
math_equation_factorize(buttons->priv->equation);
}
-
void digit_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -1103,7 +1074,6 @@ digit_cb(GtkWidget *widget, MathButtons *buttons)
math_equation_insert_digit(buttons->priv->equation, GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "calc_digit")));
}
-
void numeric_point_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -1112,8 +1082,6 @@ numeric_point_cb(GtkWidget *widget, MathButtons *buttons)
math_equation_insert_numeric_point(buttons->priv->equation);
}
-
-
void finc_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -1126,7 +1094,6 @@ finc_cb(GtkWidget *widget, MathButtons *buttons)
gtk_widget_hide(GTK_WIDGET(GET_WIDGET(buttons->priv->financial_ui, name)));
}
-
void insert_character_code_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -1135,7 +1102,6 @@ insert_character_code_cb(GtkWidget *widget, MathButtons *buttons)
gtk_window_present(GTK_WINDOW(buttons->priv->character_code_dialog));
}
-
void finc_activate_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -1162,7 +1128,6 @@ finc_activate_cb(GtkWidget *widget, MathButtons *buttons)
}
}
-
void finc_response_cb(GtkWidget *widget, gint response_id, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -1196,7 +1161,6 @@ finc_response_cb(GtkWidget *widget, gint response_id, MathButtons *buttons)
}
}
-
void character_code_dialog_response_cb(GtkWidget *dialog, gint response_id, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -1226,7 +1190,6 @@ character_code_dialog_response_cb(GtkWidget *dialog, gint response_id, MathButto
gtk_widget_hide(dialog);
}
-
void character_code_dialog_activate_cb(GtkWidget *entry, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -1235,7 +1198,6 @@ character_code_dialog_activate_cb(GtkWidget *entry, MathButtons *buttons)
character_code_dialog_response_cb(buttons->priv->character_code_dialog, GTK_RESPONSE_OK, buttons);
}
-
gboolean character_code_dialog_delete_cb(GtkWidget *dialog, GdkEvent *event, MathButtons *buttons);
G_MODULE_EXPORT
gboolean
@@ -1245,7 +1207,6 @@ character_code_dialog_delete_cb(GtkWidget *dialog, GdkEvent *event, MathButtons
return TRUE;
}
-
gboolean bit_toggle_cb(GtkWidget *event_box, GdkEventButton *event, MathButtons *buttons);
G_MODULE_EXPORT
gboolean
@@ -1255,7 +1216,6 @@ bit_toggle_cb(GtkWidget *event_box, GdkEventButton *event, MathButtons *buttons)
return TRUE;
}
-
static void
remove_trailing_spaces(MathButtons *buttons)
{
@@ -1271,7 +1231,6 @@ remove_trailing_spaces(MathButtons *buttons)
}
}
-
void set_superscript_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -1287,7 +1246,6 @@ set_superscript_cb(GtkWidget *widget, MathButtons *buttons)
math_equation_set_number_mode(buttons->priv->equation, NORMAL);
}
-
void set_subscript_cb(GtkWidget *widget, MathButtons *buttons);
G_MODULE_EXPORT
void
@@ -1303,7 +1261,6 @@ set_subscript_cb(GtkWidget *widget, MathButtons *buttons)
math_equation_set_number_mode(buttons->priv->equation, NORMAL);
}
-
static void
number_mode_changed_cb(MathEquation *equation, GParamSpec *spec, MathButtons *buttons)
{
@@ -1322,7 +1279,6 @@ number_mode_changed_cb(MathEquation *equation, GParamSpec *spec, MathButtons *bu
}
}
-
static void
math_buttons_set_property(GObject *object,
guint prop_id,
@@ -1356,7 +1312,6 @@ math_buttons_set_property(GObject *object,
}
}
-
static void
math_buttons_get_property(GObject *object,
guint prop_id,
@@ -1383,7 +1338,6 @@ math_buttons_get_property(GObject *object,
}
}
-
static void
math_buttons_class_init(MathButtonsClass *klass)
{
@@ -1426,7 +1380,6 @@ math_buttons_class_init(MathButtonsClass *klass)
G_PARAM_READWRITE));
}
-
static void
math_buttons_init(MathButtons *buttons)
{
diff --git a/src/math-converter.c b/src/math-converter.c
index 5f8dccf..a94f986 100644
--- a/src/math-converter.c
+++ b/src/math-converter.c
@@ -32,13 +32,11 @@ struct MathConverterPrivate
GtkWidget *result_label;
};
-
G_DEFINE_TYPE_WITH_PRIVATE (MathConverter, math_converter, GTK_TYPE_BOX);
static void display_changed_cb(MathEquation *equation, GParamSpec *spec, MathConverter *converter);
static void update_from_model(MathConverter *converter);
-
MathConverter *
math_converter_new(MathEquation *equation)
{
@@ -49,7 +47,6 @@ math_converter_new(MathEquation *equation)
return converter;
}
-
static gboolean
convert_equation(MathConverter *converter, const MPNumber *x, MPNumber *z)
{
@@ -77,7 +74,6 @@ convert_equation(MathConverter *converter, const MPNumber *x, MPNumber *z)
return result;
}
-
static void
update_result_label(MathConverter *converter)
{
@@ -116,14 +112,12 @@ update_result_label(MathConverter *converter)
mp_clear(&z);
}
-
static void
display_changed_cb(MathEquation *equation, GParamSpec *spec, MathConverter *converter)
{
update_result_label(converter);
}
-
static void
update_from_model(MathConverter *converter)
{
@@ -169,7 +163,6 @@ update_from_model(MathConverter *converter)
gtk_combo_box_set_model(GTK_COMBO_BOX(converter->priv->from_combo), GTK_TREE_MODEL(from_model));
}
-
void
math_converter_set_category(MathConverter *converter, const gchar *category)
{
@@ -186,7 +179,6 @@ math_converter_set_category(MathConverter *converter, const gchar *category)
update_from_model(converter);
}
-
const gchar *
math_converter_get_category(MathConverter *converter)
{
@@ -194,7 +186,6 @@ math_converter_get_category(MathConverter *converter)
return converter->priv->category;
}
-
static gboolean
iter_is_unit(GtkTreeModel *model, GtkTreeIter *iter, const Unit *unit)
{
@@ -212,7 +203,6 @@ iter_is_unit(GtkTreeModel *model, GtkTreeIter *iter, const Unit *unit)
return FALSE;
}
-
static gboolean
set_active_unit(GtkComboBox *combo, GtkTreeIter *iter, Unit *unit)
{
@@ -237,7 +227,6 @@ set_active_unit(GtkComboBox *combo, GtkTreeIter *iter, Unit *unit)
return FALSE;
}
-
void
math_converter_set_conversion(MathConverter *converter, /*const gchar *category,*/ const gchar *unit_a, const gchar *unit_b)
{
@@ -270,7 +259,6 @@ math_converter_set_conversion(MathConverter *converter, /*const gchar *category,
set_active_unit(GTK_COMBO_BOX(converter->priv->to_combo), NULL, ub);
}
-
void
math_converter_get_conversion(MathConverter *converter, Unit **from_unit, Unit **to_unit)
{
@@ -287,7 +275,6 @@ math_converter_get_conversion(MathConverter *converter, Unit **from_unit, Unit *
gtk_tree_model_get(gtk_combo_box_get_model(GTK_COMBO_BOX(converter->priv->to_combo)), &to_iter, 2, to_unit, -1);
}
-
static void
math_converter_class_init(MathConverterClass *klass)
{
@@ -301,7 +288,6 @@ math_converter_class_init(MathConverterClass *klass)
G_TYPE_NONE, 0);
}
-
static void
from_combobox_changed_cb(GtkWidget *combo, MathConverter *converter)
{
@@ -334,7 +320,6 @@ from_combobox_changed_cb(GtkWidget *combo, MathConverter *converter)
g_object_unref(unit);
}
-
static void
to_combobox_changed_cb(GtkWidget *combo, MathConverter *converter)
{
@@ -344,7 +329,6 @@ to_combobox_changed_cb(GtkWidget *combo, MathConverter *converter)
g_signal_emit(converter, signals[CHANGED], 0);
}
-
static void
from_cell_data_func(GtkCellLayout *cell_layout,
GtkCellRenderer *cell,
@@ -355,7 +339,6 @@ from_cell_data_func(GtkCellLayout *cell_layout,
g_object_set(cell, "sensitive", !gtk_tree_model_iter_has_child(tree_model, iter), NULL);
}
-
static void
currency_updated_cb(CurrencyManager *manager, MathConverter *converter)
{
diff --git a/src/math-display.c b/src/math-display.c
index 7a24838..b0f3e0e 100644
--- a/src/math-display.c
+++ b/src/math-display.c
@@ -42,21 +42,18 @@ math_display_new()
return g_object_new(math_display_get_type(), "equation", math_equation_new(), NULL);
}
-
MathDisplay *
math_display_new_with_equation(MathEquation *equation)
{
return g_object_new(math_display_get_type(), "equation", equation, NULL);
}
-
MathEquation *
math_display_get_equation(MathDisplay *display)
{
return display->priv->equation;
}
-
static gboolean
display_key_press_cb(GtkWidget *widget, GdkEventKey *event, MathDisplay *display)
{
@@ -294,7 +291,6 @@ display_key_press_cb(GtkWidget *widget, GdkEventKey *event, MathDisplay *display
return FALSE;
}
-
static gboolean
key_press_cb(MathDisplay *display, GdkEventKey *event)
{
@@ -303,7 +299,6 @@ key_press_cb(MathDisplay *display, GdkEventKey *event)
return result;
}
-
static void
status_changed_cb(MathEquation *equation, GParamSpec *spec, MathDisplay *display)
{
@@ -414,7 +409,6 @@ create_gui(MathDisplay *display)
status_changed_cb(display->priv->equation, NULL, display);
}
-
static void
math_display_set_property(GObject *object,
guint prop_id,
@@ -436,7 +430,6 @@ math_display_set_property(GObject *object,
}
}
-
static void
math_display_get_property(GObject *object,
guint prop_id,
@@ -457,7 +450,6 @@ math_display_get_property(GObject *object,
}
}
-
static void
math_display_class_init(MathDisplayClass *klass)
{
@@ -475,7 +467,6 @@ math_display_class_init(MathDisplayClass *klass)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}
-
static void
math_display_init(MathDisplay *display)
{
diff --git a/src/math-equation.c b/src/math-equation.c
index d332718..2ce3ab8 100644
--- a/src/math-equation.c
+++ b/src/math-equation.c
@@ -103,21 +103,18 @@ typedef struct {
G_DEFINE_TYPE_WITH_PRIVATE (MathEquation, math_equation, GTK_TYPE_TEXT_BUFFER);
-
MathEquation *
math_equation_new()
{
return g_object_new(math_equation_get_type(), NULL);
}
-
MathVariables *
math_equation_get_variables(MathEquation *equation)
{
return equation->priv->variables;
}
-
static void
get_ans_offsets(MathEquation *equation, gint *start, gint *end)
{
@@ -134,7 +131,6 @@ get_ans_offsets(MathEquation *equation, gint *start, gint *end)
*end = gtk_text_iter_get_offset(&iter);
}
-
static void
reformat_ans(MathEquation *equation)
{
@@ -173,7 +169,6 @@ reformat_ans(MathEquation *equation)
g_free(ans_text);
}
-
static gint
count_digits(MathEquation *equation, const gchar *text)
{
@@ -200,7 +195,6 @@ count_digits(MathEquation *equation, const gchar *text)
return count;
}
-
static void
reformat_separators(MathEquation *equation)
{
@@ -279,7 +273,6 @@ reformat_separators(MathEquation *equation)
equation->priv->in_undo_operation = FALSE;
}
-
static void
reformat_display(MathEquation *equation)
{
@@ -292,7 +285,6 @@ reformat_display(MathEquation *equation)
g_signal_emit_by_name(equation, "display-changed");
}
-
static MathEquationState *
get_current_state(MathEquation *equation)
{
@@ -324,7 +316,6 @@ get_current_state(MathEquation *equation)
return state;
}
-
static void
free_state(MathEquationState *state)
{
@@ -333,7 +324,6 @@ free_state(MathEquationState *state)
g_free(state);
}
-
static void
math_equation_push_undo_stack(MathEquation *equation)
{
@@ -357,7 +347,6 @@ math_equation_push_undo_stack(MathEquation *equation)
equation->priv->undo_stack = g_list_prepend(equation->priv->undo_stack, state);
}
-
static void
clear_ans(MathEquation *equation, gboolean remove_tag)
{
@@ -378,7 +367,6 @@ clear_ans(MathEquation *equation, gboolean remove_tag)
equation->priv->ans_end = NULL;
}
-
static void
apply_state(MathEquation *equation, MathEquationState *state)
{
@@ -411,7 +399,6 @@ apply_state(MathEquation *equation, MathEquationState *state)
equation->priv->in_undo_operation = FALSE;
}
-
void
math_equation_copy(MathEquation *equation)
{
@@ -428,7 +415,6 @@ math_equation_copy(MathEquation *equation)
g_free(text);
}
-
static void
on_paste(GtkClipboard *clipboard, const gchar *text, gpointer data)
{
@@ -437,7 +423,6 @@ on_paste(GtkClipboard *clipboard, const gchar *text, gpointer data)
math_equation_insert(equation, text);
}
-
void
math_equation_paste(MathEquation *equation)
{
@@ -445,7 +430,6 @@ math_equation_paste(MathEquation *equation)
gtk_clipboard_request_text(gtk_clipboard_get(GDK_NONE), on_paste, equation);
}
-
void
math_equation_undo(MathEquation *equation)
{
@@ -472,7 +456,6 @@ math_equation_undo(MathEquation *equation)
free_state(state);
}
-
void
math_equation_redo(MathEquation *equation)
{
@@ -499,7 +482,6 @@ math_equation_redo(MathEquation *equation)
free_state(state);
}
-
gunichar
math_equation_get_digit_text(MathEquation *equation, guint digit)
{
@@ -509,7 +491,6 @@ math_equation_get_digit_text(MathEquation *equation, guint digit)
return equation->priv->digits[digit];
}
-
void
math_equation_set_accuracy(MathEquation *equation, gint accuracy)
{
@@ -522,7 +503,6 @@ math_equation_set_accuracy(MathEquation *equation, gint accuracy)
g_object_notify(G_OBJECT(equation), "accuracy");
}
-
gint
math_equation_get_accuracy(MathEquation *equation)
{
@@ -531,7 +511,6 @@ math_equation_get_accuracy(MathEquation *equation)
return mp_serializer_get_trailing_digits(equation->priv->serializer);
}
-
void
math_equation_set_show_thousands_separators(MathEquation *equation, gboolean visible)
{
@@ -545,7 +524,6 @@ math_equation_set_show_thousands_separators(MathEquation *equation, gboolean vis
g_object_notify(G_OBJECT(equation), "show-thousands-separators");
}
-
gboolean
math_equation_get_show_thousands_separators(MathEquation *equation)
{
@@ -553,7 +531,6 @@ math_equation_get_show_thousands_separators(MathEquation *equation)
return mp_serializer_get_show_thousands_separators(equation->priv->serializer);
}
-
void
math_equation_set_show_trailing_zeroes(MathEquation *equation, gboolean visible)
{
@@ -567,7 +544,6 @@ math_equation_set_show_trailing_zeroes(MathEquation *equation, gboolean visible)
g_object_notify(G_OBJECT(equation), "show-trailing-zeroes");
}
-
gboolean
math_equation_get_show_trailing_zeroes(MathEquation *equation)
{
@@ -575,7 +551,6 @@ math_equation_get_show_trailing_zeroes(MathEquation *equation)
return mp_serializer_get_show_trailing_zeroes(equation->priv->serializer);
}
-
void
math_equation_set_number_format(MathEquation *equation, MpDisplayFormat format)
{
@@ -589,7 +564,6 @@ math_equation_set_number_format(MathEquation *equation, MpDisplayFormat format)
g_object_notify(G_OBJECT(equation), "number-format");
}
-
MpDisplayFormat
math_equation_get_number_format(MathEquation *equation)
{
@@ -597,7 +571,6 @@ math_equation_get_number_format(MathEquation *equation)
return mp_serializer_get_number_format(equation->priv->serializer);
}
-
void
math_equation_set_base(MathEquation *equation, gint base)
{
@@ -611,7 +584,6 @@ math_equation_set_base(MathEquation *equation, gint base)
g_object_notify(G_OBJECT(equation), "base");
}
-
gint
math_equation_get_base(MathEquation *equation)
{
@@ -619,7 +591,6 @@ math_equation_get_base(MathEquation *equation)
return mp_serializer_get_base(equation->priv->serializer);
}
-
void
math_equation_set_word_size(MathEquation *equation, gint word_size)
{
@@ -632,7 +603,6 @@ math_equation_set_word_size(MathEquation *equation, gint word_size)
g_object_notify(G_OBJECT(equation), "word-size");
}
-
gint
math_equation_get_word_size(MathEquation *equation)
{
@@ -640,7 +610,6 @@ math_equation_get_word_size(MathEquation *equation)
return equation->priv->word_size;
}
-
void
math_equation_set_angle_units(MathEquation *equation, MPAngleUnit angle_units)
{
@@ -653,7 +622,6 @@ math_equation_set_angle_units(MathEquation *equation, MPAngleUnit angle_units)
g_object_notify(G_OBJECT(equation), "angle-units");
}
-
MPAngleUnit
math_equation_get_angle_units(MathEquation *equation)
{
@@ -661,7 +629,6 @@ math_equation_get_angle_units(MathEquation *equation)
return equation->priv->angle_units;
}
-
void
math_equation_set_source_currency(MathEquation *equation, const gchar *currency)
{
@@ -676,7 +643,6 @@ math_equation_set_source_currency(MathEquation *equation, const gchar *currency)
math_equation_get_source_currency(equation));
}
-
const gchar *
math_equation_get_source_currency(MathEquation *equation)
{
@@ -684,7 +650,6 @@ math_equation_get_source_currency(MathEquation *equation)
return equation->priv->source_currency;
}
-
void
math_equation_set_target_currency(MathEquation *equation, const gchar *currency)
{
@@ -699,7 +664,6 @@ math_equation_set_target_currency(MathEquation *equation, const gchar *currency)
math_equation_get_target_currency(equation));
}
-
const gchar *
math_equation_get_target_currency(MathEquation *equation)
{
@@ -707,7 +671,6 @@ math_equation_get_target_currency(MathEquation *equation)
return equation->priv->target_currency;
}
-
void
math_equation_set_source_units(MathEquation *equation, const gchar *units)
{
@@ -730,7 +693,6 @@ math_equation_get_source_units(MathEquation *equation)
return equation->priv->source_units;
}
-
void
math_equation_set_target_units(MathEquation *equation, const gchar *units)
{
@@ -746,7 +708,6 @@ math_equation_set_target_units(MathEquation *equation, const gchar *units)
math_equation_get_target_units(equation));
}
-
const gchar *
math_equation_get_target_units(MathEquation *equation)
{
@@ -754,7 +715,6 @@ math_equation_get_target_units(MathEquation *equation)
return equation->priv->target_units;
}
-
void
math_equation_set_status(MathEquation *equation, const gchar *status)
{
@@ -769,7 +729,6 @@ math_equation_set_status(MathEquation *equation, const gchar *status)
g_object_notify(G_OBJECT(equation), "status");
}
-
const gchar *
math_equation_get_status(MathEquation *equation)
{
@@ -777,7 +736,6 @@ math_equation_get_status(MathEquation *equation)
return equation->priv->state.status;
}
-
gboolean
math_equation_is_empty(MathEquation *equation)
{
@@ -785,7 +743,6 @@ math_equation_is_empty(MathEquation *equation)
return gtk_text_buffer_get_char_count(GTK_TEXT_BUFFER(equation)) == 0;
}
-
gboolean
math_equation_is_result(MathEquation *equation)
{
@@ -801,7 +758,6 @@ math_equation_is_result(MathEquation *equation)
return result;
}
-
gchar *
math_equation_get_display(MathEquation *equation)
{
@@ -813,7 +769,6 @@ math_equation_get_display(MathEquation *equation)
return gtk_text_buffer_get_text(GTK_TEXT_BUFFER(equation), &start, &end, FALSE);
}
-
gchar *
math_equation_get_equation(MathEquation *equation)
{
@@ -867,7 +822,6 @@ math_equation_get_equation(MathEquation *equation)
return text;
}
-
gboolean
math_equation_get_number(MathEquation *equation, MPNumber *z)
{
@@ -889,7 +843,6 @@ math_equation_get_number(MathEquation *equation, MPNumber *z)
}
}
-
MpSerializer *
math_equation_get_serializer(MathEquation *equation)
{
@@ -897,7 +850,6 @@ math_equation_get_serializer(MathEquation *equation)
return equation->priv->serializer;
}
-
void
math_equation_set_number_mode(MathEquation *equation, NumberMode mode)
{
@@ -912,7 +864,6 @@ math_equation_set_number_mode(MathEquation *equation, NumberMode mode)
g_object_notify(G_OBJECT(equation), "number-mode");
}
-
NumberMode
math_equation_get_number_mode(MathEquation *equation)
{
@@ -920,7 +871,6 @@ math_equation_get_number_mode(MathEquation *equation)
return equation->priv->number_mode;
}
-
gboolean
math_equation_in_solve(MathEquation *equation)
{
@@ -928,7 +878,6 @@ math_equation_in_solve(MathEquation *equation)
return equation->priv->in_solve;
}
-
const MPNumber *
math_equation_get_answer(MathEquation *equation)
{
@@ -936,7 +885,6 @@ math_equation_get_answer(MathEquation *equation)
return &equation->priv->state.ans;
}
-
void
math_equation_store(MathEquation *equation, const gchar *name)
{
@@ -952,7 +900,6 @@ math_equation_store(MathEquation *equation, const gchar *name)
mp_clear(&t);
}
-
void
math_equation_recall(MathEquation *equation, const gchar *name)
{
@@ -961,7 +908,6 @@ math_equation_recall(MathEquation *equation, const gchar *name)
math_equation_insert(equation, name);
}
-
void
math_equation_set(MathEquation *equation, const gchar *text)
{
@@ -988,7 +934,6 @@ math_equation_set_with_history(MathEquation *equation, const gchar *text)
mp_clear(&x);
}
-
void
math_equation_set_number(MathEquation *equation, const MPNumber *x)
{
@@ -1021,7 +966,6 @@ math_equation_set_number(MathEquation *equation, const MPNumber *x)
free_state(state);
}
-
void
math_equation_insert(MathEquation *equation, const gchar *text)
{
@@ -1051,7 +995,6 @@ math_equation_insert(MathEquation *equation, const gchar *text)
gtk_text_buffer_insert_at_cursor(GTK_TEXT_BUFFER(equation), text, -1);
}
-
void
math_equation_insert_digit(MathEquation *equation, guint digit)
{
@@ -1074,7 +1017,6 @@ math_equation_insert_digit(MathEquation *equation, guint digit)
math_equation_insert(equation, subscript_digits[digit]);
}
-
void
math_equation_insert_numeric_point(MathEquation *equation)
{
@@ -1088,7 +1030,6 @@ math_equation_insert_numeric_point(MathEquation *equation)
math_equation_insert(equation, buffer);
}
-
void
math_equation_insert_number(MathEquation *equation, const MPNumber *x)
{
@@ -1102,7 +1043,6 @@ math_equation_insert_number(MathEquation *equation, const MPNumber *x)
g_free(text);
}
-
void
math_equation_insert_exponent(MathEquation *equation)
{
@@ -1111,7 +1051,6 @@ math_equation_insert_exponent(MathEquation *equation)
math_equation_set_number_mode(equation, SUPERSCRIPT);
}
-
void
math_equation_insert_subtract(MathEquation *equation)
{
@@ -1126,7 +1065,6 @@ math_equation_insert_subtract(MathEquation *equation)
}
}
-
static int
variable_is_defined(const char *name, void *data)
{
@@ -1147,7 +1085,6 @@ variable_is_defined(const char *name, void *data)
return math_variables_get(equation->priv->variables, name) != NULL;
}
-
static int
get_variable(const char *name, MPNumber *z, void *data)
{
@@ -1176,7 +1113,6 @@ get_variable(const char *name, MPNumber *z, void *data)
return result;
}
-
static void
set_variable(const char *name, const MPNumber *x, void *data)
{
@@ -1185,14 +1121,12 @@ set_variable(const char *name, const MPNumber *x, void *data)
math_variables_set(equation->priv->variables, name, x);
}
-
static int
convert(const MPNumber *x, const char *x_units, const char *z_units, MPNumber *z, void *data)
{
return unit_manager_convert_by_symbol(unit_manager_get_default(), x, x_units, z_units, z);
}
-
static int
parse(MathEquation *equation, const char *text, MPNumber *z, char **error_token)
{
@@ -1211,7 +1145,6 @@ parse(MathEquation *equation, const char *text, MPNumber *z, char **error_token)
return mp_equation_parse(text, &options, z, error_token);
}
-
/*
* Executed in separate thread. It is thus not a good idea to write to anything
* in MathEquation but the async queue from here.
@@ -1242,7 +1175,6 @@ math_equation_solve_real(gpointer data)
n_brackets--;
}
-
result = parse(equation, equation_text->str, &z, &error_token);
g_string_free(equation_text, TRUE);
@@ -1295,7 +1227,6 @@ math_equation_solve_real(gpointer data)
return NULL;
}
-
static gboolean
math_equation_show_in_progress(gpointer data)
{
@@ -1305,7 +1236,6 @@ math_equation_show_in_progress(gpointer data)
return false;
}
-
static gboolean
math_equation_look_for_answer(gpointer data)
{
@@ -1338,7 +1268,6 @@ math_equation_look_for_answer(gpointer data)
return false;
}
-
void
math_equation_solve(MathEquation *equation)
{
@@ -1367,7 +1296,6 @@ math_equation_solve(MathEquation *equation)
g_timeout_add(100, math_equation_show_in_progress, equation);
}
-
static gpointer
math_equation_factorize_real(gpointer data)
{
@@ -1426,7 +1354,6 @@ math_equation_factorize_real(gpointer data)
return NULL;
}
-
void
math_equation_factorize(MathEquation *equation)
{
@@ -1453,7 +1380,6 @@ math_equation_factorize(MathEquation *equation)
g_timeout_add(100, math_equation_show_in_progress, equation);
}
-
void
math_equation_delete(MathEquation *equation)
{
@@ -1471,7 +1397,6 @@ math_equation_delete(MathEquation *equation)
gtk_text_buffer_delete(GTK_TEXT_BUFFER(equation), &start, &end);
}
-
void
math_equation_backspace(MathEquation *equation)
{
@@ -1490,7 +1415,6 @@ math_equation_backspace(MathEquation *equation)
}
}
-
void
math_equation_clear(MathEquation *equation)
{
@@ -1501,7 +1425,6 @@ math_equation_clear(MathEquation *equation)
clear_ans(equation, FALSE);
}
-
void
math_equation_shift(MathEquation *equation, gint count)
{
@@ -1522,7 +1445,6 @@ math_equation_shift(MathEquation *equation, gint count)
mp_clear(&z);
}
-
void
math_equation_toggle_bit(MathEquation *equation, guint bit)
{
@@ -1560,7 +1482,6 @@ math_equation_toggle_bit(MathEquation *equation, guint bit)
mp_clear(&x);
}
-
static void
math_equation_set_property(GObject *object,
guint prop_id,
@@ -1620,7 +1541,6 @@ math_equation_set_property(GObject *object,
}
}
-
static void
math_equation_get_property(GObject *object,
guint prop_id,
@@ -1691,7 +1611,6 @@ math_equation_get_property(GObject *object,
}
}
-
static void
math_equation_constructed(GObject *object)
{
@@ -1703,7 +1622,6 @@ math_equation_constructed(GObject *object)
MATH_EQUATION(object)->priv->ans_tag = gtk_text_buffer_create_tag(GTK_TEXT_BUFFER(object), NULL, "weight", PANGO_WEIGHT_BOLD, NULL);
}
-
static void
math_equation_class_init(MathEquationClass *klass)
{
@@ -1871,7 +1789,6 @@ math_equation_class_init(MathEquationClass *klass)
NULL);
}
-
static void
pre_insert_text_cb(MathEquation *equation,
GtkTextIter *location,
@@ -1914,7 +1831,6 @@ pre_insert_text_cb(MathEquation *equation,
}
}
-
static gboolean
on_delete(MathEquation *equation)
{
@@ -1922,7 +1838,6 @@ on_delete(MathEquation *equation)
return FALSE;
}
-
static void
pre_delete_range_cb(MathEquation *equation,
GtkTextIter *start,
@@ -1951,7 +1866,6 @@ pre_delete_range_cb(MathEquation *equation,
}
}
-
static void
insert_text_cb(MathEquation *equation,
GtkTextIter *location,
@@ -1970,7 +1884,6 @@ insert_text_cb(MathEquation *equation,
g_object_notify(G_OBJECT(equation), "display");
}
-
static void
delete_range_cb(MathEquation *equation,
GtkTextIter *start,
@@ -1989,7 +1902,6 @@ delete_range_cb(MathEquation *equation,
g_object_notify(G_OBJECT(equation), "display");
}
-
static void
math_equation_init(MathEquation *equation)
{
diff --git a/src/math-preferences.c b/src/math-preferences.c
index 33565d9..41e43a6 100644
--- a/src/math-preferences.c
+++ b/src/math-preferences.c
@@ -14,7 +14,6 @@
#include "math-preferences.h"
#include "utility.h"
-
enum {
PROP_0,
PROP_EQUATION
@@ -32,21 +31,18 @@ G_DEFINE_TYPE_WITH_PRIVATE (MathPreferencesDialog, math_preferences, GTK_TYPE_DI
#define GET_WIDGET(ui, name) \
GTK_WIDGET(gtk_builder_get_object(ui, name))
-
MathPreferencesDialog *
math_preferences_dialog_new(MathEquation *equation)
{
return g_object_new(math_preferences_get_type(), "equation", equation, NULL);
}
-
static void
preferences_response_cb(GtkWidget *widget, gint id)
{
gtk_widget_hide(widget);
}
-
static gboolean
preferences_dialog_delete_cb(GtkWidget *widget, GdkEvent *event)
{
@@ -54,7 +50,6 @@ preferences_dialog_delete_cb(GtkWidget *widget, GdkEvent *event)
return TRUE;
}
-
void number_format_combobox_changed_cb(GtkWidget *combo, MathPreferencesDialog *dialog);
G_MODULE_EXPORT
void
@@ -70,7 +65,6 @@ number_format_combobox_changed_cb(GtkWidget *combo, MathPreferencesDialog *dialo
math_equation_set_number_format(dialog->priv->equation, value);
}
-
void angle_unit_combobox_changed_cb(GtkWidget *combo, MathPreferencesDialog *dialog);
G_MODULE_EXPORT
void
@@ -86,7 +80,6 @@ angle_unit_combobox_changed_cb(GtkWidget *combo, MathPreferencesDialog *dialog)
math_equation_set_angle_units(dialog->priv->equation, value);
}
-
void word_size_combobox_changed_cb(GtkWidget *combo, MathPreferencesDialog *dialog);
G_MODULE_EXPORT
void
@@ -102,7 +95,6 @@ word_size_combobox_changed_cb(GtkWidget *combo, MathPreferencesDialog *dialog)
math_equation_set_word_size(dialog->priv->equation, value);
}
-
void decimal_places_spin_change_value_cb(GtkWidget *spin, MathPreferencesDialog *dialog);
G_MODULE_EXPORT
void
@@ -114,7 +106,6 @@ decimal_places_spin_change_value_cb(GtkWidget *spin, MathPreferencesDialog *dial
math_equation_set_accuracy(dialog->priv->equation, value);
}
-
void thousands_separator_check_toggled_cb(GtkWidget *check, MathPreferencesDialog *dialog);
G_MODULE_EXPORT
void
@@ -126,7 +117,6 @@ thousands_separator_check_toggled_cb(GtkWidget *check, MathPreferencesDialog *di
math_equation_set_show_thousands_separators(dialog->priv->equation, value);
}
-
void trailing_zeroes_check_toggled_cb(GtkWidget *check, MathPreferencesDialog *dialog);
G_MODULE_EXPORT
void
@@ -138,7 +128,6 @@ trailing_zeroes_check_toggled_cb(GtkWidget *check, MathPreferencesDialog *dialog
math_equation_set_show_trailing_zeroes(dialog->priv->equation, value);
}
-
static void
set_combo_box_from_int(GtkWidget *combo, int value)
{
@@ -163,7 +152,6 @@ set_combo_box_from_int(GtkWidget *combo, int value)
gtk_combo_box_set_active_iter(GTK_COMBO_BOX(combo), &iter);
}
-
static void
accuracy_cb(MathEquation *equation, GParamSpec *spec, MathPreferencesDialog *dialog)
{
@@ -172,7 +160,6 @@ accuracy_cb(MathEquation *equation, GParamSpec *spec, MathPreferencesDialog *dia
g_settings_set_int(g_settings_var, "accuracy", math_equation_get_accuracy(equation));
}
-
static void
show_thousands_separators_cb(MathEquation *equation, GParamSpec *spec, MathPreferencesDialog *dialog)
{
@@ -181,7 +168,6 @@ show_thousands_separators_cb(MathEquation *equation, GParamSpec *spec, MathPrefe
g_settings_set_boolean(g_settings_var, "show-thousands", math_equation_get_show_thousands_separators(equation));
}
-
static void
show_trailing_zeroes_cb(MathEquation *equation, GParamSpec *spec, MathPreferencesDialog *dialog)
{
@@ -190,7 +176,6 @@ show_trailing_zeroes_cb(MathEquation *equation, GParamSpec *spec, MathPreference
g_settings_set_boolean(g_settings_var, "show-zeroes", math_equation_get_show_trailing_zeroes(equation));
}
-
static void
number_format_cb(MathEquation *equation, GParamSpec *spec, MathPreferencesDialog *dialog)
{
@@ -198,7 +183,6 @@ number_format_cb(MathEquation *equation, GParamSpec *spec, MathPreferencesDialog
g_settings_set_enum(g_settings_var, "number-format", math_equation_get_number_format(equation));
}
-
static void
word_size_cb(MathEquation *equation, GParamSpec *spec, MathPreferencesDialog *dialog)
{
@@ -206,7 +190,6 @@ word_size_cb(MathEquation *equation, GParamSpec *spec, MathPreferencesDialog *di
g_settings_set_int(g_settings_var, "word-size", math_equation_get_word_size(equation));
}
-
static void
angle_unit_cb(MathEquation *equation, GParamSpec *spec, MathPreferencesDialog *dialog)
{
@@ -214,7 +197,6 @@ angle_unit_cb(MathEquation *equation, GParamSpec *spec, MathPreferencesDialog *d
g_settings_set_enum(g_settings_var, "angle-units", math_equation_get_angle_units(equation));
}
-
static void
create_gui(MathPreferencesDialog *dialog)
{
@@ -335,7 +317,6 @@ create_gui(MathPreferencesDialog *dialog)
angle_unit_cb(dialog->priv->equation, NULL, dialog);
}
-
static void
math_preferences_set_property(GObject *object,
guint prop_id,
@@ -357,7 +338,6 @@ math_preferences_set_property(GObject *object,
}
}
-
static void
math_preferences_get_property(GObject *object,
guint prop_id,
@@ -378,7 +358,6 @@ math_preferences_get_property(GObject *object,
}
}
-
static void
math_preferences_class_init(MathPreferencesDialogClass *klass)
{
@@ -396,7 +375,6 @@ math_preferences_class_init(MathPreferencesDialogClass *klass)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}
-
static void
math_preferences_init(MathPreferencesDialog *dialog)
{
diff --git a/src/math-variable-popup.c b/src/math-variable-popup.c
index 26bc4f5..0a78455 100644
--- a/src/math-variable-popup.c
+++ b/src/math-variable-popup.c
@@ -35,14 +35,12 @@ math_variable_popup_new(MathEquation *equation)
return g_object_new(math_variable_popup_get_type(), "equation", equation, NULL);
}
-
static void
variable_focus_out_event_cb(GtkWidget *widget, GdkEventFocus *event, MathVariablePopup *popup)
{
gtk_widget_destroy(widget);
}
-
static void
insert_variable_cb(GtkWidget *widget, MathVariablePopup *popup)
{
@@ -54,7 +52,6 @@ insert_variable_cb(GtkWidget *widget, MathVariablePopup *popup)
gtk_widget_destroy(gtk_widget_get_toplevel(widget));
}
-
static gboolean
variable_name_key_press_cb(GtkWidget *widget, GdkEventKey *event, MathVariablePopup *popup)
{
@@ -65,7 +62,6 @@ variable_name_key_press_cb(GtkWidget *widget, GdkEventKey *event, MathVariablePo
return FALSE;
}
-
static void
variable_name_changed_cb(GtkWidget *widget, MathVariablePopup *popup)
{
@@ -73,7 +69,6 @@ variable_name_changed_cb(GtkWidget *widget, MathVariablePopup *popup)
gtk_widget_set_sensitive(popup->priv->add_variable_button, text[0] != '\0');
}
-
static void
add_variable_cb(GtkWidget *widget, MathVariablePopup *popup)
{
@@ -95,7 +90,6 @@ add_variable_cb(GtkWidget *widget, MathVariablePopup *popup)
mp_clear(&z);
}
-
static void
save_variable_cb(GtkWidget *widget, MathVariablePopup *popup)
{
@@ -114,7 +108,6 @@ save_variable_cb(GtkWidget *widget, MathVariablePopup *popup)
mp_clear(&z);
}
-
static void
delete_variable_cb(GtkWidget *widget, MathVariablePopup *popup)
{
@@ -126,7 +119,6 @@ delete_variable_cb(GtkWidget *widget, MathVariablePopup *popup)
gtk_widget_destroy(gtk_widget_get_toplevel(widget));
}
-
static GtkWidget *
make_variable_entry(MathVariablePopup *popup, const gchar *name, const MPNumber *value, gboolean writable)
{
@@ -184,7 +176,6 @@ make_variable_entry(MathVariablePopup *popup, const gchar *name, const MPNumber
return hbox;
}
-
static void
math_variable_popup_set_property(GObject *object,
guint prop_id,
@@ -248,7 +239,6 @@ math_variable_popup_set_property(GObject *object,
}
}
-
static void
math_variable_popup_get_property(GObject *object,
guint prop_id,
@@ -269,7 +259,6 @@ math_variable_popup_get_property(GObject *object,
}
}
-
static void
math_variable_popup_class_init(MathVariablePopupClass *klass)
{
@@ -287,7 +276,6 @@ math_variable_popup_class_init(MathVariablePopupClass *klass)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}
-
static void
math_variable_popup_init(MathVariablePopup *popup)
{
diff --git a/src/math-variables.c b/src/math-variables.c
index b44b387..3eddc4d 100644
--- a/src/math-variables.c
+++ b/src/math-variables.c
@@ -14,7 +14,6 @@
#include "math-variables.h"
#include "mp-serializer.h"
-
struct MathVariablesPrivate
{
gchar *file_name;
@@ -24,14 +23,12 @@ struct MathVariablesPrivate
G_DEFINE_TYPE_WITH_PRIVATE (MathVariables, math_variables, G_TYPE_OBJECT);
-
MathVariables *
math_variables_new()
{
return g_object_new (math_variables_get_type(), NULL);
}
-
static void
registers_load(MathVariables *variables)
{
@@ -71,7 +68,6 @@ registers_load(MathVariables *variables)
fclose(f);
}
-
static void
registers_save(MathVariables *variables)
{
@@ -102,7 +98,6 @@ registers_save(MathVariables *variables)
fclose(f);
}
-
// FIXME: Sort
gchar **
math_variables_get_names(MathVariables *variables)
@@ -128,7 +123,6 @@ math_variables_get_names(MathVariables *variables)
return names;
}
-
void
math_variables_set(MathVariables *variables, const char *name, const MPNumber *value)
{
@@ -145,7 +139,6 @@ math_variables_set(MathVariables *variables, const char *name, const MPNumber *v
registers_save(variables);
}
-
MPNumber *
math_variables_get(MathVariables *variables, const char *name)
{
@@ -154,7 +147,6 @@ math_variables_get(MathVariables *variables, const char *name)
return g_hash_table_lookup(variables->priv->registers, name);
}
-
void
math_variables_delete(MathVariables *variables, const char *name)
{
@@ -164,13 +156,11 @@ math_variables_delete(MathVariables *variables, const char *name)
registers_save(variables);
}
-
static void
math_variables_class_init (MathVariablesClass *klass)
{
}
-
static void
math_variables_init(MathVariables *variables)
{
diff --git a/src/math-window.c b/src/math-window.c
index 8d6f79d..320f83b 100644
--- a/src/math-window.c
+++ b/src/math-window.c
@@ -86,7 +86,6 @@ math_window_get_equation(MathWindow *window)
return window->priv->equation;
}
-
MathDisplay *
math_window_get_display(MathWindow *window)
{
@@ -94,7 +93,6 @@ math_window_get_display(MathWindow *window)
return window->priv->display;
}
-
MathButtons *
math_window_get_buttons(MathWindow *window)
{
@@ -393,7 +391,6 @@ scroll_changed_cb(GtkAdjustment *adjustment, MathWindow *window)
gtk_adjustment_set_value(adjustment, gtk_adjustment_get_upper(adjustment) - gtk_adjustment_get_page_size(adjustment));
}
-
static void
scroll_value_changed_cb(GtkAdjustment *adjustment, MathWindow *window)
{
@@ -630,7 +627,6 @@ create_gui(MathWindow *window)
gtk_widget_show(GTK_WIDGET(window->priv->buttons));
}
-
static void
math_window_set_property(GObject *object,
guint prop_id,
@@ -655,7 +651,6 @@ math_window_set_property(GObject *object,
}
}
-
static void
math_window_get_property(GObject *object,
guint prop_id,
@@ -679,7 +674,6 @@ math_window_get_property(GObject *object,
}
}
-
static void
math_window_class_init(MathWindowClass *klass)
{
@@ -713,7 +707,6 @@ math_window_class_init(MathWindowClass *klass)
G_TYPE_NONE, 0);
}
-
static void
math_window_init(MathWindow *window)
{
diff --git a/src/mp-binary.c b/src/mp-binary.c
index 800724c..046bd92 100644
--- a/src/mp-binary.c
+++ b/src/mp-binary.c
@@ -30,7 +30,6 @@ static int hex_to_int(char digit)
return 0;
}
-
static gchar *
to_hex_string(const MPNumber *x)
{
@@ -44,7 +43,6 @@ to_hex_string(const MPNumber *x)
return result;
}
-
static void
mp_bitwise(const MPNumber *x, const MPNumber *y, int (*bitwise_operator)(int, int), MPNumber *z, int wordlen)
{
@@ -88,13 +86,11 @@ mp_bitwise(const MPNumber *x, const MPNumber *y, int (*bitwise_operator)(int, in
g_free(text2);
}
-
static int mp_bitwise_and(int v1, int v2) { return v1 & v2; }
static int mp_bitwise_or(int v1, int v2) { return v1 | v2; }
static int mp_bitwise_xor(int v1, int v2) { return v1 ^ v2; }
static int mp_bitwise_not(int v1, int dummy) { return v1 ^ 0xF; }
-
bool
mp_is_overflow (const MPNumber *x, int wordlen)
{
@@ -109,7 +105,6 @@ mp_is_overflow (const MPNumber *x, int wordlen)
return is_overflow;
}
-
void
mp_and(const MPNumber *x, const MPNumber *y, MPNumber *z)
{
@@ -122,7 +117,6 @@ mp_and(const MPNumber *x, const MPNumber *y, MPNumber *z)
mp_bitwise(x, y, mp_bitwise_and, z, 0);
}
-
void
mp_or(const MPNumber *x, const MPNumber *y, MPNumber *z)
{
@@ -135,7 +129,6 @@ mp_or(const MPNumber *x, const MPNumber *y, MPNumber *z)
mp_bitwise(x, y, mp_bitwise_or, z, 0);
}
-
void
mp_xor(const MPNumber *x, const MPNumber *y, MPNumber *z)
{
@@ -148,7 +141,6 @@ mp_xor(const MPNumber *x, const MPNumber *y, MPNumber *z)
mp_bitwise(x, y, mp_bitwise_xor, z, 0);
}
-
void
mp_not(const MPNumber *x, int wordlen, MPNumber *z)
{
@@ -166,7 +158,6 @@ mp_not(const MPNumber *x, int wordlen, MPNumber *z)
mp_clear(&temp);
}
-
void
mp_shift(const MPNumber *x, int count, MPNumber *z)
{
@@ -192,7 +183,6 @@ mp_shift(const MPNumber *x, int count, MPNumber *z)
mp_clear(&multiplier);
}
-
void
mp_ones_complement(const MPNumber *x, int wordlen, MPNumber *z)
{
@@ -203,7 +193,6 @@ mp_ones_complement(const MPNumber *x, int wordlen, MPNumber *z)
mp_clear(&t);
}
-
void
mp_twos_complement(const MPNumber *x, int wordlen, MPNumber *z)
{
diff --git a/src/mp-convert.c b/src/mp-convert.c
index c0a88c1..5f097c8 100644
--- a/src/mp-convert.c
+++ b/src/mp-convert.c
@@ -24,28 +24,24 @@ mp_set_from_mp(const MPNumber *x, MPNumber *z)
mpc_set(z->num, x->num, MPC_RNDNN);
}
-
void
mp_set_from_double(double dx, MPNumber *z)
{
mpc_set_d(z->num, dx, MPC_RNDNN);
}
-
void
mp_set_from_integer(long x, MPNumber *z)
{
mpc_set_si(z->num, x, MPC_RNDNN);
}
-
void
mp_set_from_unsigned_integer(ulong x, MPNumber *z)
{
mpc_set_ui(z->num, x, MPC_RNDNN);
}
-
void
mp_set_from_fraction(long numerator, long denominator, MPNumber *z)
{
@@ -59,7 +55,6 @@ mp_set_from_fraction(long numerator, long denominator, MPNumber *z)
mp_divide_integer(z, denominator, z);
}
-
void
mp_set_from_polar(const MPNumber *r, MPAngleUnit unit, const MPNumber *theta, MPNumber *z)
{
@@ -94,7 +89,6 @@ mp_to_integer(const MPNumber *x)
return mpfr_get_si(mpc_realref(x->num), MPFR_RNDN);
}
-
ulong
mp_to_unsigned_integer(const MPNumber *x)
{
@@ -182,7 +176,6 @@ char_val(char **c, int base)
return value;
}
-
static int
ends_with(const char *start, const char *end, const char *word)
{
@@ -194,7 +187,6 @@ ends_with(const char *start, const char *end, const char *word)
return strncmp(end - word_len, word, word_len) == 0;
}
-
// FIXME: Doesn't handle errors well (e.g. trailing space)
static bool
set_from_sexagesimal(const char *str, int length, MPNumber *z)
@@ -225,7 +217,6 @@ set_from_sexagesimal(const char *str, int length, MPNumber *z)
return false;
}
-
bool
mp_set_from_string(const char *str, int default_base, MPNumber *z)
{
diff --git a/src/mp-equation.c b/src/mp-equation.c
index df9d872..0c9e204 100644
--- a/src/mp-equation.c
+++ b/src/mp-equation.c
@@ -37,7 +37,6 @@ variable_is_defined(ParserState *state, const char *name)
return 0;
}
-
static int
get_variable(ParserState *state, const char *name, MPNumber *z)
{
@@ -103,7 +102,6 @@ set_variable(ParserState *state, const char *name, const MPNumber *x)
// i.e. numbers+letters = variable or function depending on following arg
// letters+numbers = numbers+letters+numbers = function
-
int
sub_atoi(const char *data)
{
@@ -143,7 +141,6 @@ super_atoi(const char *data)
return sign * value;
}
-
static int
function_is_defined(ParserState *state, const char *name)
{
@@ -188,7 +185,6 @@ function_is_defined(ParserState *state, const char *name)
return 0;
}
-
static int
get_function(ParserState *state, const char *name, const MPNumber *x, MPNumber *z)
{
@@ -280,7 +276,6 @@ get_function(ParserState *state, const char *name, const MPNumber *x, MPNumber *
return result;
}
-
static int
convert(ParserState *state, const MPNumber *x, const char *x_units, const char *z_units, MPNumber *z)
{
@@ -290,7 +285,6 @@ convert(ParserState *state, const MPNumber *x, const char *x_units, const char *
return 0;
}
-
MPErrorCode
mp_equation_parse(const char *expression, MPEquationOptions *options, MPNumber *result, char **error_token)
{
@@ -336,7 +330,6 @@ mp_equation_parse(const char *expression, MPEquationOptions *options, MPNumber *
return PARSER_ERR_NONE;
}
-
const char *
mp_error_code_to_string(MPErrorCode error_code)
{
diff --git a/src/mp-serializer.c b/src/mp-serializer.c
index cd72eee..4c04f64 100644
--- a/src/mp-serializer.c
+++ b/src/mp-serializer.c
@@ -41,7 +41,6 @@ struct MpSerializerPrivate
gint tsep_count; /* Number of digits between separator. */
};
-
G_DEFINE_TYPE_WITH_PRIVATE (MpSerializer, mp_serializer, G_TYPE_OBJECT);
MpSerializer *
@@ -54,7 +53,6 @@ mp_serializer_new(MpDisplayFormat format, int base, int trailing_digits)
return serializer;
}
-
static void
mp_to_string_real(MpSerializer *serializer, const MPNumber *x, int base, gboolean force_sign, int *n_digits, GString *string)
{
@@ -180,7 +178,6 @@ mp_to_string_real(MpSerializer *serializer, const MPNumber *x, int base, gboolea
mp_clear(&temp);
}
-
static gchar *
mp_to_string(MpSerializer *serializer, const MPNumber *x, int *n_digits)
{
@@ -243,7 +240,6 @@ mp_to_string(MpSerializer *serializer, const MPNumber *x, int *n_digits)
return result;
}
-
static int
mp_to_exponential_string_real(MpSerializer *serializer, const MPNumber *x, GString *string, gboolean eng_format, int *n_digits)
{
@@ -307,7 +303,6 @@ mp_to_exponential_string_real(MpSerializer *serializer, const MPNumber *x, GStri
return exponent;
}
-
static void
append_exponent(GString *string, int exponent)
{
@@ -329,7 +324,6 @@ append_exponent(GString *string, int exponent)
g_free (super_value);
}
-
static gchar *
mp_to_exponential_string(MpSerializer *serializer, const MPNumber *x, gboolean eng_format, int *n_digits)
{
@@ -392,7 +386,6 @@ mp_to_exponential_string(MpSerializer *serializer, const MPNumber *x, gboolean e
return result;
}
-
gchar *
mp_serializer_to_string(MpSerializer *serializer, const MPNumber *x)
{
@@ -418,133 +411,114 @@ mp_serializer_to_string(MpSerializer *serializer, const MPNumber *x)
}
}
-
gboolean
mp_serializer_from_string(MpSerializer *serializer, const gchar *str, MPNumber *z)
{
return mp_set_from_string(str, serializer->priv->base, z);
}
-
void
mp_serializer_set_base(MpSerializer *serializer, gint base)
{
serializer->priv->base = base;
}
-
int
mp_serializer_get_base(MpSerializer *serializer)
{
return serializer->priv->base;
}
-
void
mp_serializer_set_radix(MpSerializer *serializer, gunichar radix)
{
serializer->priv->radix = radix;
}
-
gunichar
mp_serializer_get_radix(MpSerializer *serializer)
{
return serializer->priv->radix;
}
-
void
mp_serializer_set_thousands_separator(MpSerializer *serializer, gunichar separator)
{
serializer->priv->tsep = separator;
}
-
gunichar
mp_serializer_get_thousands_separator(MpSerializer *serializer)
{
return serializer->priv->tsep;
}
-
gint
mp_serializer_get_thousands_separator_count(MpSerializer *serializer)
{
return serializer->priv->tsep_count;
}
-
void
mp_serializer_set_show_thousands_separators(MpSerializer *serializer, gboolean visible)
{
serializer->priv->show_tsep = visible;
}
-
gboolean
mp_serializer_get_show_thousands_separators(MpSerializer *serializer)
{
return serializer->priv->show_tsep;
}
-
void
mp_serializer_set_show_trailing_zeroes(MpSerializer *serializer, gboolean visible)
{
serializer->priv->show_zeroes = visible;
}
-
gboolean
mp_serializer_get_show_trailing_zeroes(MpSerializer *serializer)
{
return serializer->priv->show_zeroes;
}
-
int
mp_serializer_get_leading_digits(MpSerializer *serializer)
{
return serializer->priv->leading_digits;
}
-
void
mp_serializer_set_leading_digits(MpSerializer *serializer, int leading_digits)
{
serializer->priv->leading_digits = leading_digits;
}
-
int
mp_serializer_get_trailing_digits(MpSerializer *serializer)
{
return serializer->priv->trailing_digits;
}
-
void
mp_serializer_set_trailing_digits(MpSerializer *serializer, int trailing_digits)
{
serializer->priv->trailing_digits = trailing_digits;
}
-
MpDisplayFormat
mp_serializer_get_number_format(MpSerializer *serializer)
{
return serializer->priv->format;
}
-
void
mp_serializer_set_number_format(MpSerializer *serializer, MpDisplayFormat format)
{
serializer->priv->format = format;
}
-
static void
mp_serializer_set_property(GObject *object,
guint prop_id,
@@ -569,7 +543,6 @@ mp_serializer_set_property(GObject *object,
}
}
-
static void
mp_serializer_get_property(GObject *object,
guint prop_id,
@@ -594,7 +567,6 @@ mp_serializer_get_property(GObject *object,
}
}
-
static void
mp_serializer_class_init(MpSerializerClass *klass)
{
@@ -633,7 +605,6 @@ mp_serializer_class_init(MpSerializerClass *klass)
G_PARAM_READWRITE));
}
-
static void
mp_serializer_init(MpSerializer *serializer)
{
diff --git a/src/mp-trigonometric.c b/src/mp-trigonometric.c
index 622d2dd..70838f8 100644
--- a/src/mp-trigonometric.c
+++ b/src/mp-trigonometric.c
@@ -71,7 +71,6 @@ convert_from_radians(const MPNumber *x, MPAngleUnit unit, MPNumber *z)
mpfr_clear(scale);
}
-
void
mp_get_pi (MPNumber *z)
{
@@ -79,7 +78,6 @@ mp_get_pi (MPNumber *z)
mpfr_set_zero(mpc_imagref(z->num), 0);
}
-
void
mp_sin(const MPNumber *x, MPAngleUnit unit, MPNumber *z)
{
@@ -90,7 +88,6 @@ mp_sin(const MPNumber *x, MPAngleUnit unit, MPNumber *z)
mpc_sin(z->num, z->num, MPC_RNDNN);
}
-
void
mp_cos(const MPNumber *x, MPAngleUnit unit, MPNumber *z)
{
@@ -101,7 +98,6 @@ mp_cos(const MPNumber *x, MPAngleUnit unit, MPNumber *z)
mpc_cos(z->num, z->num, MPC_RNDNN);
}
-
void
mp_tan(const MPNumber *x, MPAngleUnit unit, MPNumber *z)
{
@@ -135,7 +131,6 @@ mp_tan(const MPNumber *x, MPAngleUnit unit, MPNumber *z)
mp_clear(&t1);
}
-
void
mp_asin(const MPNumber *x, MPAngleUnit unit, MPNumber *z)
{
@@ -160,7 +155,6 @@ mp_asin(const MPNumber *x, MPAngleUnit unit, MPNumber *z)
mp_clear(&x_min);
}
-
void
mp_acos(const MPNumber *x, MPAngleUnit unit, MPNumber *z)
{
@@ -185,7 +179,6 @@ mp_acos(const MPNumber *x, MPAngleUnit unit, MPNumber *z)
mp_clear(&x_min);
}
-
void
mp_atan(const MPNumber *x, MPAngleUnit unit, MPNumber *z)
{
@@ -211,35 +204,30 @@ mp_atan(const MPNumber *x, MPAngleUnit unit, MPNumber *z)
mp_clear(&minus_i);
}
-
void
mp_sinh(const MPNumber *x, MPNumber *z)
{
mpc_sinh(z->num, x->num, MPC_RNDNN);
}
-
void
mp_cosh(const MPNumber *x, MPNumber *z)
{
mpc_cosh(z->num, x->num, MPC_RNDNN);
}
-
void
mp_tanh(const MPNumber *x, MPNumber *z)
{
mpc_tanh(z->num, x->num, MPC_RNDNN);
}
-
void
mp_asinh(const MPNumber *x, MPNumber *z)
{
mpc_asinh(z->num, x->num, MPC_RNDNN);
}
-
void
mp_acosh(const MPNumber *x, MPNumber *z)
{
@@ -260,7 +248,6 @@ mp_acosh(const MPNumber *x, MPNumber *z)
mp_clear(&t);
}
-
void
mp_atanh(const MPNumber *x, MPNumber *z)
{
diff --git a/src/mp.c b/src/mp.c
index 40aacdc..31a84d4 100644
--- a/src/mp.c
+++ b/src/mp.c
@@ -645,7 +645,6 @@ mp_zeta(const MPNumber *x, MPNumber *z)
/** FACTORIZATION **/
/***********************************************************************/
-
/**
* mp_is_pprime uses the Miller-Rabin primality test to decide
* whether or not a number is probable prime.
diff --git a/src/test-mp-equation.c b/src/test-mp-equation.c
index 84e3fdf..5d480df 100644
--- a/src/test-mp-equation.c
+++ b/src/test-mp-equation.c
@@ -33,7 +33,6 @@ static int passes = 0;
static void pass(const char *format, ...) __attribute__((format(printf, 1, 2)));
static void fail(const char *format, ...) __attribute__((format(printf, 1, 2)));
-
static void pass(const char *format, ...)
{
/* va_list args;
@@ -59,7 +58,6 @@ static void fail(const char *format, ...)
fails++;
}
-
static const char *
error_code_to_string(MPErrorCode error)
{
@@ -72,7 +70,6 @@ error_code_to_string(MPErrorCode error)
return error_string;
}
-
static void
Test(char *expression, char *expected, int expected_error, int trailing_digits)
{
@@ -113,14 +110,12 @@ Test(char *expression, char *expected, int expected_error, int trailing_digits)
mp_clear(&result);
}
-
static int
do_convert(const MPNumber *x, const char *x_units, const char *z_units, MPNumber *z, void *data)
{
return unit_manager_convert_by_symbol(unit_manager_get_default(), x, x_units, z_units, z);
}
-
static void
test_conversions(void)
{
@@ -161,7 +156,6 @@ test_conversions(void)
test("0 K in degC", "−273.15", 0);
}
-
static void try(const char* string, bool result, bool expected)
{
if ((result && !expected) || (!result && expected))
@@ -174,7 +168,6 @@ static void try(const char* string, bool result, bool expected)
}
}
-
static void test_mp()
{
MPNumber zero = mp_new();
@@ -263,14 +256,12 @@ static void test_mp()
mp_clear(&minus_one);
}
-
static int
variable_is_defined(const char *name, void *data)
{
return strcmp (name, "x") == 0 || strcmp (name, "y") == 0;
}
-
static int
get_variable(const char *name, MPNumber *z, void *data)
{
@@ -285,7 +276,6 @@ get_variable(const char *name, MPNumber *z, void *data)
return 0;
}
-
static void
set_variable(const char *name, const MPNumber *x, void *data)
{
@@ -783,7 +773,6 @@ test_equations(void)
//test("¬¬10₂", "10₂", 0);
}
-
int
main (void)
{
diff --git a/src/test-mp.c b/src/test-mp.c
index 1a8c0d7..f367093 100644
--- a/src/test-mp.c
+++ b/src/test-mp.c
@@ -27,7 +27,6 @@ static int passes = 0;
static void pass(const char *format, ...) __attribute__((format(printf, 1, 2)));
static void fail(const char *format, ...) __attribute__((format(printf, 1, 2)));
-
static void pass(const char *format, ...)
{
/* va_list args;
@@ -53,7 +52,6 @@ static void fail(const char *format, ...)
fails++;
}
-
static void
print_number(MPNumber *x)
{
@@ -86,7 +84,6 @@ test_integer(int number)
mp_clear(&t);
}
-
static void
test_numbers(void)
{
@@ -119,7 +116,6 @@ test_numbers(void)
test_string("16384.00006103515625");
}
-
static void
try(const char *string, bool result, bool expected)
{
@@ -129,7 +125,6 @@ try(const char *string, bool result, bool expected)
pass("%s -> %s", string, result ? "true" : "false");
}
-
static void
test_mp(void)
{
@@ -219,7 +214,6 @@ test_mp(void)
mp_clear(&minus_one);
}
-
int
main (void)
{
diff --git a/src/unit-category.c b/src/unit-category.c
index af4fb18..a19b68b 100644
--- a/src/unit-category.c
+++ b/src/unit-category.c
@@ -22,7 +22,6 @@ struct UnitCategoryPrivate
G_DEFINE_TYPE_WITH_PRIVATE (UnitCategory, unit_category, G_TYPE_OBJECT);
-
UnitCategory *
unit_category_new(const gchar *name, const gchar *display_name)
{
@@ -32,7 +31,6 @@ unit_category_new(const gchar *name, const gchar *display_name)
return category;
}
-
const gchar *
unit_category_get_name(UnitCategory *category)
{
@@ -40,7 +38,6 @@ unit_category_get_name(UnitCategory *category)
return category->priv->name;
}
-
const gchar *
unit_category_get_display_name(UnitCategory *category)
{
@@ -48,7 +45,6 @@ unit_category_get_display_name(UnitCategory *category)
return category->priv->display_name;
}
-
void
unit_category_add_unit(UnitCategory *category, Unit *unit)
{
@@ -57,7 +53,6 @@ unit_category_add_unit(UnitCategory *category, Unit *unit)
category->priv->units = g_list_append(category->priv->units, g_object_ref(unit));
}
-
Unit *
unit_category_get_unit_by_name(UnitCategory *category, const gchar *name)
{
@@ -76,7 +71,6 @@ unit_category_get_unit_by_name(UnitCategory *category, const gchar *name)
return NULL;
}
-
Unit *
unit_category_get_unit_by_symbol(UnitCategory *category, const gchar *symbol)
{
@@ -94,7 +88,6 @@ unit_category_get_unit_by_symbol(UnitCategory *category, const gchar *symbol)
return NULL;
}
-
const GList *
unit_category_get_units(UnitCategory *category)
{
@@ -102,7 +95,6 @@ unit_category_get_units(UnitCategory *category)
return category->priv->units;
}
-
gboolean
unit_category_convert(const UnitCategory *category, const MPNumber *x, Unit *x_units, Unit *z_units, MPNumber *z)
{
@@ -126,13 +118,11 @@ unit_category_convert(const UnitCategory *category, const MPNumber *x, Unit *x_u
return TRUE;
}
-
static void
unit_category_class_init(UnitCategoryClass *klass)
{
}
-
static void
unit_category_init(UnitCategory *category)
{
diff --git a/src/unit-manager.c b/src/unit-manager.c
index cb81045..91ec8b6 100644
--- a/src/unit-manager.c
+++ b/src/unit-manager.c
@@ -22,17 +22,14 @@ struct UnitManagerPrivate
G_DEFINE_TYPE_WITH_PRIVATE (UnitManager, unit_manager, G_TYPE_OBJECT);
-
static UnitManager *default_unit_manager = NULL;
-
static gint
compare_currencies(gconstpointer a, gconstpointer b)
{
return strcmp(currency_get_display_name((Currency *)a), currency_get_display_name((Currency *)b));
}
-
UnitManager *
unit_manager_get_default(void)
{
@@ -145,7 +142,6 @@ unit_manager_get_default(void)
return default_unit_manager;
}
-
UnitCategory *
unit_manager_add_category(UnitManager *manager, const gchar *name, const gchar *display_name)
{
@@ -162,7 +158,6 @@ unit_manager_add_category(UnitManager *manager, const gchar *name, const gchar *
return category;
}
-
const GList *
unit_manager_get_categories(UnitManager *manager)
{
@@ -170,7 +165,6 @@ unit_manager_get_categories(UnitManager *manager)
return manager->priv->categories;
}
-
UnitCategory *
unit_manager_get_category(UnitManager *manager, const gchar *category)
{
@@ -188,7 +182,6 @@ unit_manager_get_category(UnitManager *manager, const gchar *category)
return NULL;
}
-
Unit *
unit_manager_get_unit_by_name(UnitManager *manager, const gchar *name)
{
@@ -208,7 +201,6 @@ unit_manager_get_unit_by_name(UnitManager *manager, const gchar *name)
return NULL;
}
-
Unit *
unit_manager_get_unit_by_symbol(UnitManager *manager, const gchar *symbol)
{
@@ -228,7 +220,6 @@ unit_manager_get_unit_by_symbol(UnitManager *manager, const gchar *symbol)
return NULL;
}
-
gboolean
unit_manager_convert_by_symbol(UnitManager *manager, const MPNumber *x, const char *x_symbol, const char *z_symbol, MPNumber *z)
{
@@ -253,13 +244,11 @@ unit_manager_convert_by_symbol(UnitManager *manager, const MPNumber *x, const ch
return FALSE;
}
-
static void
unit_manager_class_init(UnitManagerClass *klass)
{
}
-
static void
unit_manager_init(UnitManager *manager)
{
diff --git a/src/unit.c b/src/unit.c
index e52d979..35dcca5 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -29,7 +29,6 @@ struct UnitPrivate
G_DEFINE_TYPE_WITH_PRIVATE (Unit, unit, G_TYPE_OBJECT);
-
Unit *
unit_new(const gchar *name,
const gchar *display_name,
@@ -55,7 +54,6 @@ unit_new(const gchar *name,
return unit;
}
-
const gchar *
unit_get_name(Unit *unit)
{
@@ -63,7 +61,6 @@ unit_get_name(Unit *unit)
return unit->priv->name;
}
-
const gchar *
unit_get_display_name(Unit *unit)
{
@@ -71,7 +68,6 @@ unit_get_display_name(Unit *unit)
return unit->priv->display_name;
}
-
gboolean
unit_matches_symbol(Unit *unit, const gchar *symbol)
{
@@ -89,7 +85,6 @@ unit_matches_symbol(Unit *unit, const gchar *symbol)
return FALSE;
}
-
const GList *
unit_get_symbols(Unit *unit)
{
@@ -97,14 +92,12 @@ unit_get_symbols(Unit *unit)
return unit->priv->symbols;
}
-
static int
variable_is_defined(const char *name, void *data)
{
return TRUE;
}
-
static int
get_variable(const char *name, MPNumber *z, void *data)
{
@@ -113,7 +106,6 @@ get_variable(const char *name, MPNumber *z, void *data)
return TRUE;
}
-
static gboolean
solve_function(const gchar *function, const MPNumber *x, MPNumber *z)
{
@@ -135,7 +127,6 @@ solve_function(const gchar *function, const MPNumber *x, MPNumber *z)
return TRUE;
}
-
gboolean
unit_convert_from(Unit *unit, const MPNumber *x, MPNumber *z)
{
@@ -157,7 +148,6 @@ unit_convert_from(Unit *unit, const MPNumber *x, MPNumber *z)
}
}
-
gboolean
unit_convert_to(Unit *unit, const MPNumber *x, MPNumber *z)
{
@@ -179,7 +169,6 @@ unit_convert_to(Unit *unit, const MPNumber *x, MPNumber *z)
}
}
-
gchar *
unit_format(Unit *unit, MPNumber *x)
{
@@ -195,13 +184,11 @@ unit_format(Unit *unit, MPNumber *x)
return text;
}
-
static void
unit_class_init(UnitClass *klass)
{
}
-
static void
unit_init(Unit *unit)
{