Commit 6d4992dc authored by Jukka-Pekka Iivonen's avatar Jukka-Pekka Iivonen Committed by jpekka

If a condition contains just a number, it is an equality condition.

1999-05-05  Jukka-Pekka Iivonen  <iivonen@iki.fi>

	* src/fn-database.c (parse_criteria): If a condition contains
	just a number, it is an equality condition.
parent c77128da
1999-05-05 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/fn-database.c (parse_criteria): If a condition contains
just a number, it is an equality condition.
1999-05-05 Miguel de Icaza <miguel@nuclecu.unam.mx>
* configure.in: Laptop does not have resources. Make guile
......
1999-05-05 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/fn-database.c (parse_criteria): If a condition contains
just a number, it is an equality condition.
1999-05-05 Miguel de Icaza <miguel@nuclecu.unam.mx>
* configure.in: Laptop does not have resources. Make guile
......
1999-05-05 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/fn-database.c (parse_criteria): If a condition contains
just a number, it is an equality condition.
1999-05-05 Miguel de Icaza <miguel@nuclecu.unam.mx>
* configure.in: Laptop does not have resources. Make guile
......
1999-05-05 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/fn-database.c (parse_criteria): If a condition contains
just a number, it is an equality condition.
1999-05-05 Miguel de Icaza <miguel@nuclecu.unam.mx>
* configure.in: Laptop does not have resources. Make guile
......
......@@ -189,8 +189,15 @@ parse_criteria(Value *database, Value *criteria)
cell = sheet_cell_get(sheet, i, j);
if (cell == NULL || cell->value == NULL)
continue;
cell_str = cell_get_text(cell);
cond = g_new(condition_t, 1);
if (VALUE_IS_NUMBER(cell->value)) {
cond->x = value_get_as_double (cell->value);
cond->fun =
(condition_test_fun_t) test_equal;
conditions = g_slist_append(conditions, cond);
continue;
}
cell_str = cell_get_text(cell);
if (strncmp(cell_str, "<=", 2) == 0) {
cond->fun =
(condition_test_fun_t) test_less_or_equal;
......
......@@ -189,8 +189,15 @@ parse_criteria(Value *database, Value *criteria)
cell = sheet_cell_get(sheet, i, j);
if (cell == NULL || cell->value == NULL)
continue;
cell_str = cell_get_text(cell);
cond = g_new(condition_t, 1);
if (VALUE_IS_NUMBER(cell->value)) {
cond->x = value_get_as_double (cell->value);
cond->fun =
(condition_test_fun_t) test_equal;
conditions = g_slist_append(conditions, cond);
continue;
}
cell_str = cell_get_text(cell);
if (strncmp(cell_str, "<=", 2) == 0) {
cond->fun =
(condition_test_fun_t) test_less_or_equal;
......
......@@ -189,8 +189,15 @@ parse_criteria(Value *database, Value *criteria)
cell = sheet_cell_get(sheet, i, j);
if (cell == NULL || cell->value == NULL)
continue;
cell_str = cell_get_text(cell);
cond = g_new(condition_t, 1);
if (VALUE_IS_NUMBER(cell->value)) {
cond->x = value_get_as_double (cell->value);
cond->fun =
(condition_test_fun_t) test_equal;
conditions = g_slist_append(conditions, cond);
continue;
}
cell_str = cell_get_text(cell);
if (strncmp(cell_str, "<=", 2) == 0) {
cond->fun =
(condition_test_fun_t) test_less_or_equal;
......
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