Commit 37cc982d authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder
Browse files

Fix thingo.

1999-09-23  Morten Welinder  <terra@diku.dk>

	* src/regression.c (exponential_regression): Fix thingo.

	* src/widgets/widget-color-combo.c (color_table_setup): Static.
	(color_combo_construct): Static.
	(color_table_setup): really break out.
parent 3730dfef
1999-09-23 Morten Welinder <terra@diku.dk>
* src/regression.c (exponential_regression): Fix thingo.
* src/widgets/widget-color-combo.c (color_table_setup): Static.
(color_combo_construct): Static.
(color_table_setup): really break out.
1999-09-23 Rodrigo Stulzer Lopes <rodrigo@conectiva.com.br>
* configure.in: add pt_BR to ALL_LINGUAS
1999-09-23 Miguel de Icaza <miguel@gnu.org>
* src/print.c (print_page): Setup the rotation for each page.
......
1999-09-23 Morten Welinder <terra@diku.dk>
* src/regression.c (exponential_regression): Fix thingo.
* src/widgets/widget-color-combo.c (color_table_setup): Static.
(color_combo_construct): Static.
(color_table_setup): really break out.
1999-09-23 Rodrigo Stulzer Lopes <rodrigo@conectiva.com.br>
* configure.in: add pt_BR to ALL_LINGUAS
1999-09-23 Miguel de Icaza <miguel@gnu.org>
* src/print.c (print_page): Setup the rotation for each page.
......
......@@ -82,7 +82,7 @@ color_clicked (GtkWidget *button, ColorCombo *combo)
gtk_combo_box_popup_hide (GTK_COMBO_BOX (combo));
}
GtkWidget *
static GtkWidget *
color_table_setup (ColorCombo *cc, gboolean no_color, int ncols, int nrows, char **color_names)
{
GtkWidget *label;
......@@ -105,8 +105,11 @@ color_table_setup (ColorCombo *cc, gboolean no_color, int ncols, int nrows, char
pos = row * ncols + col;
if (color_names [pos] == NULL)
if (color_names [pos] == NULL) {
/* Break out of two for-loops. */
row = nrows;
break;
}
button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
......@@ -161,7 +164,7 @@ emit_change (GtkWidget *button, ColorCombo *cc)
GTK_OBJECT (cc), color_combo_signals [CHANGED], color, cc->last_index);
}
void
static void
color_combo_construct (ColorCombo *cc, char **icon, gboolean no_color,
int ncols, int nrows, char **color_names)
{
......
......@@ -145,6 +145,7 @@ exponential_regression (const float_t *xs, const float_t *ys, int n,
float_t *log_ys;
int result;
int i;
int dim = 1;
log_ys = g_new (float_t, n);
for (i = 0; i < n; i++)
......@@ -156,19 +157,19 @@ exponential_regression (const float_t *xs, const float_t *ys, int n,
}
if (affine) {
const float_t *xss[2];
const float_t *xss[dim + 1];
xss[0] = NULL; /* Substitute for 1-vector. */
xss[1] = xs;
result = general_linear_regression (xss, 2, log_ys, n, res);
result = general_linear_regression (xss, dim + 1, log_ys, n, res);
} else {
res[0] = 0;
result = general_linear_regression (&xs, 1, log_ys, n, res + 1);
result = general_linear_regression (&xs, dim, log_ys, n, res + 1);
}
if (result == 0)
for (i = 0; i < n; i++)
for (i = 0; i < dim + 1; i++)
res[i] = exp (res[i]);
out:
......
......@@ -82,7 +82,7 @@ color_clicked (GtkWidget *button, ColorCombo *combo)
gtk_combo_box_popup_hide (GTK_COMBO_BOX (combo));
}
GtkWidget *
static GtkWidget *
color_table_setup (ColorCombo *cc, gboolean no_color, int ncols, int nrows, char **color_names)
{
GtkWidget *label;
......@@ -105,8 +105,11 @@ color_table_setup (ColorCombo *cc, gboolean no_color, int ncols, int nrows, char
pos = row * ncols + col;
if (color_names [pos] == NULL)
if (color_names [pos] == NULL) {
/* Break out of two for-loops. */
row = nrows;
break;
}
button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
......@@ -161,7 +164,7 @@ emit_change (GtkWidget *button, ColorCombo *cc)
GTK_OBJECT (cc), color_combo_signals [CHANGED], color, cc->last_index);
}
void
static void
color_combo_construct (ColorCombo *cc, char **icon, gboolean no_color,
int ncols, int nrows, char **color_names)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment