Commit 6f909f6f authored by Arturo Espinosa's avatar Arturo Espinosa

Prepare for 0.12

parent d5ce9558
1999-02-17 Miguel de Icaza <miguel@nuclecu.unam.mx> 1999-02-17 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/fn-math.c (gnumeric_trunc): Implement TRUNC.
* src/func.c (function_iterate_argument_values): Do not evaluate a * src/func.c (function_iterate_argument_values): Do not evaluate a
subexpression if the previous expression failed due to an error. subexpression if the previous expression failed due to an error.
Basically: add a check to the eval return value. Basically: add a check to the eval return value.
......
1999-02-17 Miguel de Icaza <miguel@nuclecu.unam.mx> 1999-02-17 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/fn-math.c (gnumeric_trunc): Implement TRUNC.
* src/func.c (function_iterate_argument_values): Do not evaluate a * src/func.c (function_iterate_argument_values): Do not evaluate a
subexpression if the previous expression failed due to an error. subexpression if the previous expression failed due to an error.
Basically: add a check to the eval return value. Basically: add a check to the eval return value.
......
1999-02-17 Miguel de Icaza <miguel@nuclecu.unam.mx> 1999-02-17 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/fn-math.c (gnumeric_trunc): Implement TRUNC.
* src/func.c (function_iterate_argument_values): Do not evaluate a * src/func.c (function_iterate_argument_values): Do not evaluate a
subexpression if the previous expression failed due to an error. subexpression if the previous expression failed due to an error.
Basically: add a check to the eval return value. Basically: add a check to the eval return value.
......
1999-02-17 Miguel de Icaza <miguel@nuclecu.unam.mx> 1999-02-17 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/fn-math.c (gnumeric_trunc): Implement TRUNC.
* src/func.c (function_iterate_argument_values): Do not evaluate a * src/func.c (function_iterate_argument_values): Do not evaluate a
subexpression if the previous expression failed due to an error. subexpression if the previous expression failed due to an error.
Basically: add a check to the eval return value. Basically: add a check to the eval return value.
......
AC_INIT(src/gnumeric.h) AC_INIT(src/gnumeric.h)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gnumeric,0.11) AM_INIT_AUTOMAKE(gnumeric,0.12)
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
AM_ACLOCAL_INCLUDE(macros) AM_ACLOCAL_INCLUDE(macros)
......
...@@ -1110,6 +1110,59 @@ gnumeric_pi (struct FunctionDefinition *i, Value *argv [], char **error_string) ...@@ -1110,6 +1110,59 @@ gnumeric_pi (struct FunctionDefinition *i, Value *argv [], char **error_string)
return value_float (M_PI); return value_float (M_PI);
} }
static char *help_trunc = {
N_("@FUNCTION=TRUNC\n"
"@SYNTAX=TRUNC(number[,digits])\n"
"@DESCRIPTION=The TRUNC function returns the value of number "
"truncated to the number of digits specified. If digits is omited "
"then digits defaults to zero."
"\n"
"\n"
"@SEEALSO=")
};
static Value *
gnumeric_trunc (void *tsheet, GList *expr_node_list, int eval_col, int eval_row, char **error_string)
{
Value *number;
int args = g_list_length (expr_node_list);
int decimals = 0;
double v, integral, fraction;
if (args < 1 || args > 2){
*error_string = _("Invalid number of arguments");
return NULL;
}
number = eval_expr (tsheet, (ExprTree *) expr_node_list->data, eval_col, eval_row, error_string);
if (!number)
return NULL;
v = number->v.v_float;
value_release (number);
if (args == 2){
Value *value;
value = eval_expr (tsheet, (ExprTree *) expr_node_list->next->data, eval_col, eval_row, error_string);
if (!value){
return NULL;
}
decimals = value_get_as_int (value);
value_release (value);
}
fraction = modf (v, &integral);
if (decimals){
double pot = pow (10, decimals);
return value_float (integral + floor (fraction * pot) / pot);
} else
return value_float (integral);
}
FunctionDefinition math_functions [] = { FunctionDefinition math_functions [] = {
{ "abs", "f", "number", &help_abs, NULL, gnumeric_abs }, { "abs", "f", "number", &help_abs, NULL, gnumeric_abs },
{ "acos", "f", "number", &help_acos, NULL, gnumeric_acos }, { "acos", "f", "number", &help_acos, NULL, gnumeric_acos },
...@@ -1148,7 +1201,8 @@ FunctionDefinition math_functions [] = { ...@@ -1148,7 +1201,8 @@ FunctionDefinition math_functions [] = {
{ "sum", 0, "number", &help_sum, gnumeric_sum, NULL }, { "sum", 0, "number", &help_sum, gnumeric_sum, NULL },
{ "tan", "f", "number", &help_tan, NULL, gnumeric_tan }, { "tan", "f", "number", &help_tan, NULL, gnumeric_tan },
{ "tanh", "f", "number", &help_tanh, NULL, gnumeric_tanh }, { "tanh", "f", "number", &help_tanh, NULL, gnumeric_tanh },
{ "pi", "", "", &help_pi, NULL,gnumeric_pi }, { "trunc", "f", "number", &help_trunc, gnumeric_trunc, NULL },
{ "pi", "", "", &help_pi, NULL, gnumeric_pi },
{ NULL, NULL }, { NULL, NULL },
}; };
......
...@@ -28,13 +28,13 @@ noinst_PROGRAMS = perl.so ...@@ -28,13 +28,13 @@ noinst_PROGRAMS = perl.so
perl_so_SOURCES = perl.c perl_so_SOURCES = perl.c
perl.so: perl.o xsinit.o ext.timestamp perl.so: perl.o xsinit.o ext.timestamp
$(PERL_LD) $(PERL_LDDLFLAGS) -o perl.so perl.o xsinit.o $(PERL_LDOPTS) -$(PERL_LD) $(PERL_LDDLFLAGS) -o perl.so perl.o xsinit.o $(PERL_LDOPTS)
xsinit.c: xsinit.c:
perl -MExtUtils::Embed -e xsinit -- -o xsinit.c -perl -MExtUtils::Embed -e xsinit -- -o xsinit.c
ext.timestamp: ext.timestamp:
( cd ext ; perl Makefile.PL LIB=$(datadir)/gnumeric/perl/lib ) -( cd ext ; perl Makefile.PL LIB=$(datadir)/gnumeric/perl/lib )
touch ext.timestamp touch ext.timestamp
Perlscriptsdir = $(datadir)/gnumeric/perl Perlscriptsdir = $(datadir)/gnumeric/perl
......
msgid "" msgid ""
msgstr "" msgstr ""
"POT-Creation-Date: 1999-02-10 17:34-0600\n" "POT-Creation-Date: 1999-02-17 17:31-0600\n"
"Content-Type: text/plain; charset=iso8859-2\n" "Content-Type: text/plain; charset=iso8859-2\n"
"Date: 1998-09-30 00:38:13-0500\n" "Date: 1998-09-30 00:38:13-0500\n"
"From: Petr Vyyhnalek <petr.vyhnalek@email.cz>\n" "From: Petr Vyyhnalek <petr.vyhnalek@email.cz>\n"
...@@ -51,11 +51,11 @@ msgstr "" ...@@ -51,11 +51,11 @@ msgstr ""
msgid "variance - division by 0" msgid "variance - division by 0"
msgstr "" msgstr ""
#: src/about.c:37 #: src/about.c:38
msgid "Gnumeric" msgid "Gnumeric"
msgstr "Gnumeric" msgstr "Gnumeric"
#: src/about.c:40 #: src/about.c:41
msgid "" msgid ""
"The GNOME spreadsheet.\n" "The GNOME spreadsheet.\n"
"http://www.gnome.org/gnumeric" "http://www.gnome.org/gnumeric"
...@@ -279,7 +279,7 @@ msgid "Left" ...@@ -279,7 +279,7 @@ msgid "Left"
msgstr "Vlevo" msgstr "Vlevo"
#: src/dialog-cell-format.c:355 src/dialog-cell-format.c:364 #: src/dialog-cell-format.c:355 src/dialog-cell-format.c:364
#: src/workbook.c:849 #: src/workbook.c:851
msgid "Center" msgid "Center"
msgstr "Doprosed" msgstr "Doprosed"
...@@ -322,7 +322,7 @@ msgid "Text color" ...@@ -322,7 +322,7 @@ msgid "Text color"
msgstr "Barva textu" msgstr "Barva textu"
#. The radio buttons #. The radio buttons
#: src/dialog-cell-format.c:601 src/dialog-cell-format.c:631 #: src/dialog-cell-format.c:601 src/dialog-cell-format.c:634
#: src/dialog-paste-special.c:28 #: src/dialog-paste-special.c:28
msgid "None" msgid "None"
msgstr "dn" msgstr "dn"
...@@ -331,31 +331,36 @@ msgstr " ...@@ -331,31 +331,36 @@ msgstr "
msgid "Use this color" msgid "Use this color"
msgstr "Pouij tuto barvu" msgstr "Pouij tuto barvu"
#: src/dialog-cell-format.c:625 #: src/dialog-cell-format.c:605
#, fuzzy
msgid "No change"
msgstr "dn"
#: src/dialog-cell-format.c:628
msgid "Background configuration" msgid "Background configuration"
msgstr "Konfigurace pozad" msgstr "Konfigurace pozad"
#: src/dialog-cell-format.c:633 #: src/dialog-cell-format.c:636
msgid "Use solid color" msgid "Use solid color"
msgstr "Pouij plnou barvu" msgstr "Pouij plnou barvu"
#: src/dialog-cell-format.c:635 #: src/dialog-cell-format.c:638
msgid "Use a pattern" msgid "Use a pattern"
msgstr "Pouij vpl" msgstr "Pouij vpl"
#: src/dialog-cell-format.c:865 #: src/dialog-cell-format.c:891
msgid "Number" msgid "Number"
msgstr "slo" msgstr "slo"
#: src/dialog-cell-format.c:866 #: src/dialog-cell-format.c:892
msgid "Alignment" msgid "Alignment"
msgstr "Zarovnvn" msgstr "Zarovnvn"
#: src/dialog-cell-format.c:867 #: src/dialog-cell-format.c:893
msgid "Font" msgid "Font"
msgstr "Font" msgstr "Font"
#: src/dialog-cell-format.c:868 #: src/dialog-cell-format.c:894
msgid "Coloring" msgid "Coloring"
msgstr "" msgstr ""
...@@ -388,7 +393,7 @@ msgstr "smaz ...@@ -388,7 +393,7 @@ msgstr "smaz
msgid "Delete cells" msgid "Delete cells"
msgstr "Smazn bunk" msgstr "Smazn bunk"
#: src/dialog-delete-cells.c:32 src/item-grid.c:528 #: src/dialog-delete-cells.c:32 src/item-grid.c:532
msgid "Delete" msgid "Delete"
msgstr "Mazn" msgstr "Mazn"
...@@ -428,7 +433,7 @@ msgstr "vlo ...@@ -428,7 +433,7 @@ msgstr "vlo
msgid "Insert cells" msgid "Insert cells"
msgstr "Vlo buky" msgstr "Vlo buky"
#: src/dialog-insert-cells.c:33 src/item-grid.c:527 #: src/dialog-insert-cells.c:33 src/item-grid.c:531
msgid "Insert" msgid "Insert"
msgstr "Vlo" msgstr "Vlo"
...@@ -476,7 +481,7 @@ msgstr "N ...@@ -476,7 +481,7 @@ msgstr "N
msgid "Divide" msgid "Divide"
msgstr "Vydl" msgstr "Vydl"
#: src/dialog-paste-special.c:56 src/item-grid.c:525 #: src/dialog-paste-special.c:56 src/item-grid.c:529
msgid "Paste special" msgid "Paste special"
msgstr "Vlo jinak" msgstr "Vlo jinak"
...@@ -514,7 +519,7 @@ msgstr "Chyba syntaxe" ...@@ -514,7 +519,7 @@ msgstr "Chyba syntaxe"
msgid "Missing quote" msgid "Missing quote"
msgstr "Chyb uvozovky" msgstr "Chyb uvozovky"
#: src/expr.c:479 src/fn-sheet.c:38 src/fn-sheet.c:83 #: src/expr.c:479 src/fn-math.c:1134 src/fn-sheet.c:38 src/fn-sheet.c:83
msgid "Invalid number of arguments" msgid "Invalid number of arguments"
msgstr "patn poet argumentu" msgstr "patn poet argumentu"
...@@ -539,15 +544,15 @@ msgstr "Nezn ...@@ -539,15 +544,15 @@ msgstr "Nezn
msgid "File format:" msgid "File format:"
msgstr "Formt buky" msgstr "Formt buky"
#: src/file.c:254 #: src/file.c:256
msgid "Save workbook as" msgid "Save workbook as"
msgstr "Uloit seit jako" msgstr "Uloit seit jako"
#: src/file.c:286 #: src/file.c:288
msgid "Sorry, there are no file savers loaded, I can not save" msgid "Sorry, there are no file savers loaded, I can not save"
msgstr "" msgstr ""
#: src/file.c:314 #: src/file.c:316
msgid "Load file" msgid "Load file"
msgstr "Otevt soubor" msgstr "Otevt soubor"
...@@ -1027,7 +1032,7 @@ msgid "" ...@@ -1027,7 +1032,7 @@ msgid ""
"@SEEALSO=AVERAGE, COUNT" "@SEEALSO=AVERAGE, COUNT"
msgstr "" msgstr ""
#: src/fn-math.c:1052 #: src/fn-math.c:1055
msgid "" msgid ""
"@FUNCTION=TAN\n" "@FUNCTION=TAN\n"
"@SYNTAX=TAN(x)\n" "@SYNTAX=TAN(x)\n"
...@@ -1038,7 +1043,7 @@ msgid "" ...@@ -1038,7 +1043,7 @@ msgid ""
"@SEEALSO=TANH, COS, COSH, SIN, SINH, DEGREES, RADIANS" "@SEEALSO=TANH, COS, COSH, SIN, SINH, DEGREES, RADIANS"
msgstr "" msgstr ""
#: src/fn-math.c:1072 #: src/fn-math.c:1075
msgid "" msgid ""
"@FUNCTION=TANH\n" "@FUNCTION=TANH\n"
"@SYNTAX=TANH(x)\n" "@SYNTAX=TANH(x)\n"
...@@ -1049,7 +1054,7 @@ msgid "" ...@@ -1049,7 +1054,7 @@ msgid ""
"@SEEALSO=TAN, SIN, SINH, COS, COSH, DEGREES, RADIANS" "@SEEALSO=TAN, SIN, SINH, COS, COSH, DEGREES, RADIANS"
msgstr "" msgstr ""
#: src/fn-math.c:1092 #: src/fn-math.c:1095
msgid "" msgid ""
"@FUNCTION=PI\n" "@FUNCTION=PI\n"
"@SYNTAX=PI()\n" "@SYNTAX=PI()\n"
...@@ -1058,6 +1063,17 @@ msgid "" ...@@ -1058,6 +1063,17 @@ msgid ""
"@SEEALSO=" "@SEEALSO="
msgstr "" msgstr ""
#: src/fn-math.c:1114
msgid ""
"@FUNCTION=TRUNC\n"
"@SYNTAX=TRUNC(number[,digits])\n"
"@DESCRIPTION=The TRUNC function returns the value of number truncated to the "
"number of digits specified. If digits is omited then digits defaults to "
"zero.\n"
"\n"
"@SEEALSO="
msgstr ""
#: src/fn-misc.c:18 #: src/fn-misc.c:18
msgid "" msgid ""
"@FUNCTION=CLEAN\n" "@FUNCTION=CLEAN\n"
...@@ -1443,51 +1459,58 @@ msgstr "" ...@@ -1443,51 +1459,58 @@ msgstr ""
msgid "Bricks" msgid "Bricks"
msgstr "Cihly" msgstr "Cihly"
#: src/item-cursor.c:554 src/item-grid.c:523 src/workbook.c:837 #: src/item-cursor.c:498
msgid ""
"The cells dragged will overwrite the contents of the\n"
"existing cells in that range. Do you want me to replace\n"
"the contents in this region?"
msgstr ""
#: src/item-cursor.c:579 src/item-grid.c:527 src/workbook.c:839
msgid "Copy" msgid "Copy"
msgstr "Kopie" msgstr "Kopie"
#: src/item-cursor.c:555 #: src/item-cursor.c:580
msgid "Move" msgid "Move"
msgstr "Pesun" msgstr "Pesun"
#: src/item-cursor.c:556 #: src/item-cursor.c:581
msgid "Copy formats" msgid "Copy formats"
msgstr "Kopie formtu" msgstr "Kopie formtu"
#: src/item-cursor.c:557 #: src/item-cursor.c:582
msgid "Copy values" msgid "Copy values"
msgstr "Kopie hodnot" msgstr "Kopie hodnot"
#: src/item-cursor.c:558 #: src/item-cursor.c:583
msgid "Shift cells down and copy" msgid "Shift cells down and copy"
msgstr "Posu buky dolu a kopruj" msgstr "Posu buky dolu a kopruj"
#: src/item-cursor.c:559 #: src/item-cursor.c:584
msgid "Shift cells right and copy" msgid "Shift cells right and copy"
msgstr "Posu buky doprava a kopruj" msgstr "Posu buky doprava a kopruj"
#: src/item-cursor.c:560 #: src/item-cursor.c:585
msgid "Shift cells down and move" msgid "Shift cells down and move"
msgstr "Posu buky dolu a pesu" msgstr "Posu buky dolu a pesu"
#: src/item-cursor.c:561 #: src/item-cursor.c:586
msgid "Shift cells right and move" msgid "Shift cells right and move"
msgstr "Posu buky doprava a pesu" msgstr "Posu buky doprava a pesu"
#: src/item-grid.c:522 src/workbook.c:834 #: src/item-grid.c:526 src/workbook.c:836
msgid "Cut" msgid "Cut"
msgstr "Vyjmout" msgstr "Vyjmout"
#: src/item-grid.c:524 src/sheet.c:2456 src/workbook.c:840 #: src/item-grid.c:528 src/sheet.c:2490 src/workbook.c:842
msgid "Paste" msgid "Paste"
msgstr "Vloit" msgstr "Vloit"
#: src/item-grid.c:529 #: src/item-grid.c:533
msgid "Erase content" msgid "Erase content"
msgstr "Vyma content" msgstr "Vyma content"
#: src/item-grid.c:531 #: src/item-grid.c:535
msgid "Cell format" msgid "Cell format"
msgstr "Formt buky" msgstr "Formt buky"
...@@ -1553,403 +1576,403 @@ msgstr " ...@@ -1553,403 +1576,403 @@ msgstr "
msgid "Column: %s" msgid "Column: %s"
msgstr "Sloupec: %s" msgstr "Sloupec: %s"
#: src/workbook.c:282 #: src/workbook.c:284
msgid "Warning" msgid "Warning"
msgstr "" msgstr ""
#: src/workbook.c:290 #: src/workbook.c:292
#, c-format #, c-format
msgid "Workbook %s has unsaved changes, save them?" msgid "Workbook %s has unsaved changes, save them?"
msgstr "" msgstr ""
#: src/workbook.c:293 #: src/workbook.c:295
msgid "Workbook has unsaved changes, save them?" msgid "Workbook has unsaved changes, save them?"
msgstr "" msgstr ""
#: src/workbook.c:482 src/workbook.c:498 #: src/workbook.c:484 src/workbook.c:500
msgid "Insert rows" msgid "Insert rows"
msgstr "Vlo dky" msgstr "Vlo dky"
#: src/workbook.c:585 #: src/workbook.c:587
msgid ">mm/dd/yyyy" msgid ">mm/dd/yyyy"
msgstr "" msgstr ""
#: src/workbook.c:604 #: src/workbook.c:606
msgid ">hh:mm" msgid ">hh:mm"
msgstr "" msgstr ""
#: src/workbook.c:660 #: src/workbook.c:662
msgid "_New" msgid "_New"
msgstr "_Nov" msgstr "_Nov"
#: src/workbook.c:660 #: src/workbook.c:662
#, fuzzy #, fuzzy
msgid "Create a new spreadsheet" msgid "Create a new spreadsheet"
msgstr "Vytvo nov list" msgstr "Vytvo nov list"
#: src/workbook.c:671 #: src/workbook.c:673
msgid "Plu_g-ins..." msgid "Plu_g-ins..."
msgstr "" msgstr ""
#: src/workbook.c:671 #: src/workbook.c:673
#, fuzzy #, fuzzy
msgid "Gnumeric plugins" msgid "Gnumeric plugins"
msgstr "Gnumeric" msgstr "Gnumeric"
#: src/workbook.c:685 #: src/workbook.c:687
msgid "_All" msgid "_All"
msgstr "Ve" msgstr "Ve"
#: src/workbook.c:686 #: src/workbook.c:688
msgid "Clear the selected cells' formats, comments, and contents" msgid "Clear the selected cells' formats, comments, and contents"
msgstr "" msgstr ""
#: src/workbook.c:688 #: src/workbook.c:690
msgid "_Formats" msgid "_Formats"
msgstr "_Formty" msgstr "_Formty"
#: src/workbook.c:689 #: src/workbook.c:691
msgid "Clear the selected cells' formats" msgid "Clear the selected cells' formats"
msgstr "" msgstr ""
#: src/workbook.c:690 #: src/workbook.c:692
msgid "_Comments" msgid "_Comments"
msgstr "" msgstr ""
#: src/workbook.c:691 #: src/workbook.c:693
#, fuzzy #, fuzzy
msgid "Clear the selected cells' comments" msgid "Clear the selected cells' comments"