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>
* src/fn-math.c (gnumeric_trunc): Implement TRUNC.
* src/func.c (function_iterate_argument_values): Do not evaluate a
subexpression if the previous expression failed due to an error.
Basically: add a check to the eval return value.
......
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
subexpression if the previous expression failed due to an error.
Basically: add a check to the eval return value.
......
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
subexpression if the previous expression failed due to an error.
Basically: add a check to the eval return value.
......
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
subexpression if the previous expression failed due to an error.
Basically: add a check to the eval return value.
......
AC_INIT(src/gnumeric.h)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gnumeric,0.11)
AM_INIT_AUTOMAKE(gnumeric,0.12)
AM_MAINTAINER_MODE
AM_ACLOCAL_INCLUDE(macros)
......
......@@ -1110,6 +1110,59 @@ gnumeric_pi (struct FunctionDefinition *i, Value *argv [], char **error_string)
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 [] = {
{ "abs", "f", "number", &help_abs, NULL, gnumeric_abs },
{ "acos", "f", "number", &help_acos, NULL, gnumeric_acos },
......@@ -1148,7 +1201,8 @@ FunctionDefinition math_functions [] = {
{ "sum", 0, "number", &help_sum, gnumeric_sum, NULL },
{ "tan", "f", "number", &help_tan, NULL, gnumeric_tan },
{ "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 },
};
......
......@@ -28,13 +28,13 @@ noinst_PROGRAMS = perl.so
perl_so_SOURCES = perl.c
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:
perl -MExtUtils::Embed -e xsinit -- -o xsinit.c
-perl -MExtUtils::Embed -e xsinit -- -o xsinit.c
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
Perlscriptsdir = $(datadir)/gnumeric/perl
......
msgid ""
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"
"Date: 1998-09-30 00:38:13-0500\n"
"From: Petr Vyyhnalek <petr.vyhnalek@email.cz>\n"
......@@ -51,11 +51,11 @@ msgstr ""
msgid "variance - division by 0"
msgstr ""
#: src/about.c:37
#: src/about.c:38
msgid "Gnumeric"
msgstr "Gnumeric"
#: src/about.c:40
#: src/about.c:41
msgid ""
"The GNOME spreadsheet.\n"
"http://www.gnome.org/gnumeric"
......@@ -279,7 +279,7 @@ msgid "Left"
msgstr "Vlevo"
#: src/dialog-cell-format.c:355 src/dialog-cell-format.c:364
#: src/workbook.c:849
#: src/workbook.c:851
msgid "Center"
msgstr "Doprosed"
......@@ -322,7 +322,7 @@ msgid "Text color"
msgstr "Barva textu"
#. 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
msgid "None"
msgstr "dn"
......@@ -331,31 +331,36 @@ msgstr "
msgid "Use this color"
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"
msgstr "Konfigurace pozad"
#: src/dialog-cell-format.c:633
#: src/dialog-cell-format.c:636
msgid "Use solid color"
msgstr "Pouij plnou barvu"
#: src/dialog-cell-format.c:635
#: src/dialog-cell-format.c:638
msgid "Use a pattern"
msgstr "Pouij vpl"
#: src/dialog-cell-format.c:865
#: src/dialog-cell-format.c:891
msgid "Number"
msgstr "slo"
#: src/dialog-cell-format.c:866
#: src/dialog-cell-format.c:892
msgid "Alignment"
msgstr "Zarovnvn"
#: src/dialog-cell-format.c:867
#: src/dialog-cell-format.c:893
msgid "Font"
msgstr "Font"
#: src/dialog-cell-format.c:868
#: src/dialog-cell-format.c:894
msgid "Coloring"
msgstr ""
......@@ -388,7 +393,7 @@ msgstr "smaz
msgid "Delete cells"
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"
msgstr "Mazn"
......@@ -428,7 +433,7 @@ msgstr "vlo
msgid "Insert cells"
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"
msgstr "Vlo"
......@@ -476,7 +481,7 @@ msgstr "N
msgid "Divide"
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"
msgstr "Vlo jinak"
......@@ -514,7 +519,7 @@ msgstr "Chyba syntaxe"
msgid "Missing quote"
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"
msgstr "patn poet argumentu"
......@@ -539,15 +544,15 @@ msgstr "Nezn
msgid "File format:"
msgstr "Formt buky"
#: src/file.c:254
#: src/file.c:256
msgid "Save workbook as"
msgstr "Uloit seit jako"
#: src/file.c:286
#: src/file.c:288
msgid "Sorry, there are no file savers loaded, I can not save"
msgstr ""
#: src/file.c:314
#: src/file.c:316
msgid "Load file"
msgstr "Otevt soubor"
......@@ -1027,7 +1032,7 @@ msgid ""
"@SEEALSO=AVERAGE, COUNT"
msgstr ""
#: src/fn-math.c:1052
#: src/fn-math.c:1055
msgid ""
"@FUNCTION=TAN\n"
"@SYNTAX=TAN(x)\n"
......@@ -1038,7 +1043,7 @@ msgid ""
"@SEEALSO=TANH, COS, COSH, SIN, SINH, DEGREES, RADIANS"
msgstr ""
#: src/fn-math.c:1072
#: src/fn-math.c:1075
msgid ""
"@FUNCTION=TANH\n"
"@SYNTAX=TANH(x)\n"
......@@ -1049,7 +1054,7 @@ msgid ""
"@SEEALSO=TAN, SIN, SINH, COS, COSH, DEGREES, RADIANS"
msgstr ""
#: src/fn-math.c:1092
#: src/fn-math.c:1095
msgid ""
"@FUNCTION=PI\n"
"@SYNTAX=PI()\n"
......@@ -1058,6 +1063,17 @@ msgid ""
"@SEEALSO="
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
msgid ""
"@FUNCTION=CLEAN\n"
......@@ -1443,51 +1459,58 @@ msgstr ""
msgid "Bricks"
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"
msgstr "Kopie"
#: src/item-cursor.c:555
#: src/item-cursor.c:580
msgid "Move"
msgstr "Pesun"
#: src/item-cursor.c:556
#: src/item-cursor.c:581
msgid "Copy formats"
msgstr "Kopie formtu"
#: src/item-cursor.c:557
#: src/item-cursor.c:582
msgid "Copy values"
msgstr "Kopie hodnot"
#: src/item-cursor.c:558
#: src/item-cursor.c:583
msgid "Shift cells down and copy"
msgstr "Posu buky dolu a kopruj"
#: src/item-cursor.c:559
#: src/item-cursor.c:584
msgid "Shift cells right and copy"
msgstr "Posu buky doprava a kopruj"
#: src/item-cursor.c:560
#: src/item-cursor.c:585
msgid "Shift cells down and move"
msgstr "Posu buky dolu a pesu"
#: src/item-cursor.c:561
#: src/item-cursor.c:586
msgid "Shift cells right and move"
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"
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"
msgstr "Vloit"
#: src/item-grid.c:529
#: src/item-grid.c:533
msgid "Erase content"
msgstr "Vyma content"
#: src/item-grid.c:531
#: src/item-grid.c:535
msgid "Cell format"
msgstr "Formt buky"
......@@ -1553,403 +1576,403 @@ msgstr "
msgid "Column: %s"
msgstr "Sloupec: %s"
#: src/workbook.c:282
#: src/workbook.c:284
msgid "Warning"
msgstr ""
#: src/workbook.c:290
#: src/workbook.c:292
#, c-format
msgid "Workbook %s has unsaved changes, save them?"
msgstr ""
#: src/workbook.c:293
#: src/workbook.c:295
msgid "Workbook has unsaved changes, save them?"
msgstr ""
#: src/workbook.c:482 src/workbook.c:498
#: src/workbook.c:484 src/workbook.c:500
msgid "Insert rows"
msgstr "Vlo dky"
#: src/workbook.c:585
#: src/workbook.c:587
msgid ">mm/dd/yyyy"
msgstr ""
#: src/workbook.c:604
#: src/workbook.c:606
msgid ">hh:mm"
msgstr ""
#: src/workbook.c:660
#: src/workbook.c:662
msgid "_New"
msgstr "_Nov"
#: src/workbook.c:660
#: src/workbook.c:662
#, fuzzy
msgid "Create a new spreadsheet"
msgstr "Vytvo nov list"
#: src/workbook.c:671
#: src/workbook.c:673
msgid "Plu_g-ins..."
msgstr ""
#: src/workbook.c:671
#: src/workbook.c:673
#, fuzzy
msgid "Gnumeric plugins"
msgstr "Gnumeric"
#: src/workbook.c:685
#: src/workbook.c:687
msgid "_All"
msgstr "Ve"
#: src/workbook.c:686
#: src/workbook.c:688
msgid "Clear the selected cells' formats, comments, and contents"
msgstr ""
#: src/workbook.c:688
#: src/workbook.c:690
msgid "_Formats"
msgstr "_Formty"
#: src/workbook.c:689
#: src/workbook.c:691
msgid "Clear the selected cells' formats"
msgstr ""
#: src/workbook.c:690
#: src/workbook.c:692
msgid "_Comments"
msgstr ""
#: src/workbook.c:691
#: src/workbook.c:693
#, fuzzy
msgid "Clear the selected cells' comments"
msgstr "Vycentruje buku"
#: src/workbook.c:692
#: src/workbook.c:694
msgid "_Content"
msgstr ""
#: src/workbook.c:693
#: src/workbook.c:695
#, fuzzy
msgid "Clear the selected cells' contents"
msgstr "Vycentruje buku"
#: src/workbook.c:701
#: src/workbook.c:703
#, fuzzy
msgid "P_aste special..."
msgstr "Vloit jinak"
#: src/workbook.c:702
#: src/workbook.c:704
msgid "C_lear"
msgstr "Vymazat"
#: src/workbook.c:703
#: src/workbook.c:705
msgid "Clear the selected cell(s)"
msgstr ""
#: src/workbook.c:707
#: src/workbook.c:709
msgid "_Select All"
msgstr "Vybrat ve"
#: src/workbook.c:708
#: src/workbook.c:710
msgid "Select all cells in the spreadsheet"
msgstr ""
#: src/workbook.c:710
#: src/workbook.c:712
msgid "_Goto cell.."
msgstr "Jdi na buku.."
#: src/workbook.c:711
#: src/workbook.c:713
msgid "Jump to a specified cell"
msgstr ""
#: src/workbook.c:717
#: src/workbook.c:719
#, fuzzy
msgid "_Define cell names"
msgstr "Smazn bunk"
#: src/workbook.c:721
#: src/workbook.c:723
#, fuzzy
msgid "_Recalculate"
msgstr "Pepotat"
#: src/workbook.c:722
#: src/workbook.c:724
msgid "Recalculate the spreadsheet"
msgstr ""
#: src/workbook.c:730
#: src/workbook.c:732
msgid "_Zoom..."
msgstr "Mtko..."
#: src/workbook.c:731
#: src/workbook.c:733
msgid "Zoom the spreadsheet in or out"
msgstr ""
#: src/workbook.c:738
#: src/workbook.c:740
#, fuzzy
msgid "Current _date"
msgstr "Dnen datum"
#: src/workbook.c:739
#: src/workbook.c:741
msgid "Insert the current data into the selected cell(s)"
msgstr ""
#: src/workbook.c:742
#: src/workbook.c:744
#, fuzzy
msgid "Current _time"
msgstr "Souasn as"
#: src/workbook.c:743
#: src/workbook.c:745
msgid "Insert the current time into the selected cell(s)"
msgstr ""
#: src/workbook.c:750 src/workbook.c:796
#: src/workbook.c:752 src/workbook.c:798
msgid "_Sheet"
msgstr "List"
#: src/workbook.c:750
#: src/workbook.c:752
#, fuzzy
msgid "Insert a new spreadsheet"
msgstr "Vytvo nov list"
#: src/workbook.c:752 src/workbook.c:790
#: src/workbook.c:754 src/workbook.c:792
msgid "_Cells..."
msgstr "Buky..."
#: src/workbook.c:752
#: src/workbook.c:754
#, fuzzy
msgid "Insert new cells"
msgstr "Vlo buky"
#: src/workbook.c:754
#: src/workbook.c:756
msgid "_Rows"
msgstr "dky"
#: src/workbook.c:754
#: src/workbook.c:756
#, fuzzy
msgid "Insert new rows"
msgstr "Vlo dky"
#: src/workbook.c:756
#: src/workbook.c:758
msgid "C_olumns"
msgstr "Sloupce"
#: src/workbook.c:756
#: src/workbook.c:758
#, fuzzy
msgid "Insert new columns"
msgstr "Vlo sloupec(e)"
#: src/workbook.c:761
#: src/workbook.c:763
msgid "_Add/Modify comment"
msgstr ""
#: src/workbook.c:762
#: src/workbook.c:764
msgid "Edit the selected cell's comment"
msgstr ""
#: src/workbook.c:763
#: src/workbook.c:765
#, fuzzy
msgid "_Special"
msgstr "Zvltnosti"
#: src/workbook.c:772 src/workbook.c:778
#: src/workbook.c:774 src/workbook.c:780
msgid "_Autoadjust"
msgstr ""
#: src/workbook.c:773
#: src/workbook.c:775
msgid "_Width"
msgstr "ka"
#: src/workbook.c:779
#: src/workbook.c:781
msgid "_Height"
msgstr "Dlka"
#: src/workbook.c:784
#: src/workbook.c:786
msgid "_Change name"
msgstr "Zm jmno"
#: src/workbook.c:791
#: src/workbook.c:793
msgid "Modify the formatting of the selected cells"
msgstr ""
#: src/workbook.c:794
#: src/workbook.c:796
msgid "C_olumn"
msgstr "Sloupec"
#: src/workbook.c:795
#: src/workbook.c:797
msgid "_Row"
msgstr "dek"
#: src/workbook.c:812