From 7666a707c833d93d7f931c5bfd5962afa4842af3 Mon Sep 17 00:00:00 2001 From: Jody Goldberg Date: Wed, 27 Jun 2001 01:49:59 +0000 Subject: [PATCH] partial patch. Should this be tied to the current locale ? 2001-06-25 Jody 2001-06-25 Jody Goldberg * fn-information.c (translate_table) : partial patch. Should this be tied to the current locale ? 2001-06-25 Jody Goldberg * src/xml-io.c (xml_not_used_old_array_spec) : fix a few warnings. --- doc/C/Makefile.am | 4 --- doc/C/func.defs | 10 +++--- doc/C/functions.sgml | 10 +++--- doc/ja/Makefile.am | 4 --- plugins/fn-info/functions.c | 8 ++--- src/Makefile.am | 59 ++++++++++++---------------------- src/functions/ChangeLog | 5 +++ src/functions/fn-information.c | 8 ++--- src/xml-io.c | 6 ++-- 9 files changed, 46 insertions(+), 68 deletions(-) diff --git a/doc/C/Makefile.am b/doc/C/Makefile.am index 14758e31c..3dc9b9a69 100644 --- a/doc/C/Makefile.am +++ b/doc/C/Makefile.am @@ -1,8 +1,4 @@ -if BONOBO -gnumeric = gnumeric-bonobo -else gnumeric = gnumeric -endif gnumeric_helpdir = $(datadir)/gnome/help/gnumeric/C diff --git a/doc/C/func.defs b/doc/C/func.defs index 2dbcbadff..b29674e6e 100644 --- a/doc/C/func.defs +++ b/doc/C/func.defs @@ -2296,7 +2296,7 @@ ATANH(0.5) equals 0.549306. @FUNCTION=ERFC @SYNTAX=ERFC(x) -@DESCRIPTION=The ERFC function returns the complimentary error function, defined as 1 - erf(x). erfc(x) is calculated more accurately than erf(x) for arguments larger than about 0.5. +@DESCRIPTION=The ERFC function returns the complementary error function, defined as 1 - erf(x). erfc(x) is calculated more accurately than 1 - erf(x) for arguments larger than about 0.5. If @x is not numeric a #VALUE! error is returned. @EXAMPLES= ERFC(6) equals 2.15197367e-17. @@ -2494,8 +2494,8 @@ NORMINV(0.76,2,3) equals 4.118907689. @SEEALSO=NORMDIST,NORMSDIST,NORMSINV,STANDARDIZE,ZTEST @FUNCTION=PV -@SYNTAX=PV(rate,nper,pmt,fv,type) -@DESCRIPTION=PV calculates the present value of an investment. @rate is the periodic interest rate, @nper is the number of periods used for compounding. @pmt is the payment made each period, @fv is the future value and @type is when the payment is made. If @type = 1 then the payment is made at the begining of the period. If @type = 0 it is made at the end of each period.@EXAMPLES= +@SYNTAX=PV(rate,nper,pmt[,fv,type]) +@DESCRIPTION=PV calculates the present value of an investment. @rate is the periodic interest rate, @nper is the number of periods used for compounding. @pmt is the payment made each period, @fv is the future value and @type is when the payment is made. If @type = 1 then the payment is made at the begining of the period. If @type = 0 (or omitted) it is made at the end of each period.@EXAMPLES= @SEEALSO=FV @@ -2587,7 +2587,7 @@ PROPER("j. f. kennedy") equals "J. F. Kennedy". @FUNCTION=DELTA @SYNTAX=DELTA(x[,y]) -@DESCRIPTION=DELTA function test for numerical equivilance of two arguments returning 1 in equality @y is optional, and defaults to 0. +@DESCRIPTION=The DELTA function tests for numerical equivalence of two arguments returning 1 in case of equality. @y is optional, and defaults to 0. If either argument is non-numeric returns a #VALUE! error. This function is Excel compatible. @EXAMPLES= DELTA(42.99,43) equals 0. @@ -3349,7 +3349,7 @@ This function is Excel compatible. @FUNCTION=IMLN @SYNTAX=IMLN(inumber) -@DESCRIPTION=IMLN returns the natural logarithm of a complex number. (The result will have an imaginary part between -pi an +pi. The natural logarithm is not uniquely defined on complex numbers. You may need to add or subtract an even multiple of pi to the imaginary part.) +@DESCRIPTION=IMLN returns the natural logarithm of a complex number. (The result will have an imaginary part between -pi and +pi. The natural logarithm is not uniquely defined on complex numbers. You may need to add or subtract an even multiple of pi to the imaginary part.) This function is Excel compatible. @EXAMPLES= IMLN("3-j") equals 1.15129-0.32175j. diff --git a/doc/C/functions.sgml b/doc/C/functions.sgml index f327be2de..891fe10f0 100644 --- a/doc/C/functions.sgml +++ b/doc/C/functions.sgml @@ -7065,7 +7065,7 @@ Description - The ERFC function returns the complimentary error function, defined as 1 - erf(x). erfc(x) is calculated more accurately than erf(x) for arguments larger than about 0.5. + The ERFC function returns the complementary error function, defined as 1 - erf(x). erfc(x) is calculated more accurately than 1 - erf(x) for arguments larger than about 0.5. If @x is not numeric a #VALUE! error is returned. Examples @@ -7642,11 +7642,11 @@ - PV(rate,nper,pmt,fv,type) + PV(rate,nper,pmt[,fv,type]) Description - PV calculates the present value of an investment. @rate is the periodic interest rate, @nper is the number of periods used for compounding. @pmt is the payment made each period, @fv is the future value and @type is when the payment is made. If @type = 1 then the payment is made at the begining of the period. If @type = 0 it is made at the end of each period.@EXAMPLES= + PV calculates the present value of an investment. @rate is the periodic interest rate, @nper is the number of periods used for compounding. @pmt is the payment made each period, @fv is the future value and @type is when the payment is made. If @type = 1 then the payment is made at the begining of the period. If @type = 0 (or omitted) it is made at the end of each period.@EXAMPLES= See also @@ -7964,7 +7964,7 @@ Description - DELTA function test for numerical equivilance of two arguments returning 1 in equality @y is optional, and defaults to 0. + The DELTA function tests for numerical equivalence of two arguments returning 1 in case of equality. @y is optional, and defaults to 0. If either argument is non-numeric returns a #VALUE! error. This function is Excel compatible. Examples @@ -10173,7 +10173,7 @@ Description - IMLN returns the natural logarithm of a complex number. (The result will have an imaginary part between -pi an +pi. The natural logarithm is not uniquely defined on complex numbers. You may need to add or subtract an even multiple of pi to the imaginary part.) + IMLN returns the natural logarithm of a complex number. (The result will have an imaginary part between -pi and +pi. The natural logarithm is not uniquely defined on complex numbers. You may need to add or subtract an even multiple of pi to the imaginary part.) This function is Excel compatible. Examples diff --git a/doc/ja/Makefile.am b/doc/ja/Makefile.am index a02cbe3b7..9656852fa 100644 --- a/doc/ja/Makefile.am +++ b/doc/ja/Makefile.am @@ -1,8 +1,4 @@ -if BONOBO -gnumeric = gnumeric-bonobo -else gnumeric = gnumeric -endif gnumeric_helpdir = $(datadir)/gnome/help/gnumeric/ja diff --git a/plugins/fn-info/functions.c b/plugins/fn-info/functions.c index d7a4cef40..cd9773429 100644 --- a/plugins/fn-info/functions.c +++ b/plugins/fn-info/functions.c @@ -99,10 +99,10 @@ static translate_t translate_table[] = { { "#,##0", ",0" }, { "0.00", "F2" }, { "#,##0.00", ",2" }, - { "$#,##0_);($#,##0)", "C0" }, - { "$#,##0_);[Red]($#,##0)", "C0-" }, - { "$#,##0.00_);($#,##0.00)", "C2" }, - { "$#,##0.00_);[Red]($#,##0.00)", "C2-" }, + { "\"$\"#,##0_);\\(\"$\"#,##0\\)", "C0" }, + { "\"$\"#,##0_);[Red]\\(\"$\"#,##0\\)", "C0-" }, + { "\"$\"#,##0.00_);\\(\"$\"#,##0.00\\)", "C2" }, + { "\"$\"#,##0.00_);[Red]\\(\"$\"#,##0.00\\)", "C2-" }, { "0%", "P0" }, { "0.00%", "P2" }, { "0.00e+00", "S2" }, diff --git a/src/Makefile.am b/src/Makefile.am index 4967f11a4..f42bbd3b0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,27 +1,10 @@ # # Gnumeric's Makefile. # Author: Miguel de Icaza (miguel@kernel.org) -# -# This Makefile has targets for three programs: -# -# gnumeric: -# the plain spreadsheet -# -# gnumeric-bonobo: -# spreadsheet with CORBA and Bonobo additions -# -# SUBDIRS = dialogs functions widgets -if BONOBO -bin_PROGRAMS = gnumeric-bonobo -CLEANFILES += gnumeric -else bin_PROGRAMS = gnumeric -CLEANFILES +=gnumeric-bonobo -endif - #noinst_PROGRAMS = number-match INCLUDES = \ @@ -135,6 +118,7 @@ GNUMERIC_BASE_SOURCES = \ item-grid.c \ item-grid.h \ main.h \ + main.c \ mathfunc.c \ mathfunc.h \ module-plugin-defs.h \ @@ -266,44 +250,41 @@ GNUMERIC_BONOBO_SOURCES = \ sheet-object-container.h \ sheet-object-item.c \ sheet-object-item.h -# workbook-control-bonobo.h \ -# workbook-control-bonobo.c +if BONOBO gnumeric_SOURCES = \ - main.c \ - normal-args.c \ - $(GNUMERIC_BASE_SOURCES) - -gnumeric_bonobo_SOURCES = \ - main.c \ - corba-args.c \ $(GNUMERIC_BASE_SOURCES) \ + corba-args.c \ $(GNUMERIC_BONOBO_SOURCES) -gnumeric_LDFLAGS = -export-dynamic - -gnumeric_libs = \ - dialogs/libdialogs.a \ - widgets/libwidgets.a \ - functions/libfunctions.a - -gnumeric_LDADD = \ +gnumeric_LDADD = \ $(gnumeric_libs) \ + -lbonobo-print \ + ../idl/libGnumericIDL.a \ $(EXTRA_GNOME_LIBS) \ $(GNOME_XML_LIB) \ $(GUILE_LIBS) \ + $(PSPELL_LIBS) \ $(INTLLIBS) -# $(PSPELL_LIBS) +else +gnumeric_SOURCES = \ + $(GNUMERIC_BASE_SOURCES) \ + normal-args.c -gnumeric_bonobo_LDADD = \ +gnumeric_LDADD = \ $(gnumeric_libs) \ - -lbonobo-print \ - ../idl/libGnumericIDL.a \ $(EXTRA_GNOME_LIBS) \ $(GNOME_XML_LIB) \ $(GUILE_LIBS) \ - $(PSPELL_LIBS) \ $(INTLLIBS) +endif + +gnumeric_LDFLAGS = -export-dynamic + +gnumeric_libs = \ + dialogs/libdialogs.a \ + widgets/libwidgets.a \ + functions/libfunctions.a dist-hook: -mkdir $(distdir)/pixmaps diff --git a/src/functions/ChangeLog b/src/functions/ChangeLog index 669f01bfe..40dff94e6 100644 --- a/src/functions/ChangeLog +++ b/src/functions/ChangeLog @@ -1,3 +1,8 @@ +2001-06-25 Jody Goldberg + + * fn-information.c (translate_table) : partial patch. Should this be + tied to the current locale ? + 2001-06-22 Morten Welinder * fn-financial.c (gnumeric_rate, gnumeric_irr): No longer respect diff --git a/src/functions/fn-information.c b/src/functions/fn-information.c index d7a4cef40..cd9773429 100644 --- a/src/functions/fn-information.c +++ b/src/functions/fn-information.c @@ -99,10 +99,10 @@ static translate_t translate_table[] = { { "#,##0", ",0" }, { "0.00", "F2" }, { "#,##0.00", ",2" }, - { "$#,##0_);($#,##0)", "C0" }, - { "$#,##0_);[Red]($#,##0)", "C0-" }, - { "$#,##0.00_);($#,##0.00)", "C2" }, - { "$#,##0.00_);[Red]($#,##0.00)", "C2-" }, + { "\"$\"#,##0_);\\(\"$\"#,##0\\)", "C0" }, + { "\"$\"#,##0_);[Red]\\(\"$\"#,##0\\)", "C0-" }, + { "\"$\"#,##0.00_);\\(\"$\"#,##0.00\\)", "C2" }, + { "\"$\"#,##0.00_);[Red]\\(\"$\"#,##0.00\\)", "C2-" }, { "0%", "P0" }, { "0.00%", "P2" }, { "0.00e+00", "S2" }, diff --git a/src/xml-io.c b/src/xml-io.c index 435755b63..3bd5f423b 100644 --- a/src/xml-io.c +++ b/src/xml-io.c @@ -1832,13 +1832,13 @@ xml_not_used_old_array_spec (Cell *cell, char *content) rows = strtol (ptr = expr_end + 2, &end, 10); if (end == ptr || *end != ',') return TRUE; - cols = strtol (ptr = ++end, &end, 10); + cols = strtol (ptr = end + 1, &end, 10); if (end == ptr || end[0] != ')' || end[1] != '[') return TRUE; - row = strtol (ptr = (end += 2), &end, 10); + row = strtol (ptr = (end + 2), &end, 10); if (end == ptr || end[0] != ']' || end[1] != '[') return TRUE; - col = strtol (ptr = (end += 2), &end, 10); + col = strtol (ptr = (end + 2), &end, 10); if (end == ptr || end[0] != ']' || end[1] != '\0') return TRUE; -- GitLab