Commit 646d9e15 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Make new plugins fn-eng from src/functions/fn-eng.c

2002-04-11  Morten Welinder  <terra@diku.dk>

	* */*: Make new plugins fn-eng from src/functions/fn-eng.c
parent cdba3617
2002-04-11 Morten Welinder <terra@diku.dk>
* */*: Make new plugins fn-eng from src/functions/fn-eng.c
* src/parser.y (gnumeric_parse_error): Plug leak.
* src/item-edit.c (item_edit_destroy): Fix memory corruption on
......
2002-04-11 Morten Welinder <terra@diku.dk>
* */*: Make new plugins fn-eng from src/functions/fn-eng.c
* src/parser.y (gnumeric_parse_error): Plug leak.
* src/item-edit.c (item_edit_destroy): Fix memory corruption on
......
2002-04-11 Morten Welinder <terra@diku.dk>
* */*: Make new plugins fn-eng from src/functions/fn-eng.c
* src/parser.y (gnumeric_parse_error): Plug leak.
* src/item-edit.c (item_edit_destroy): Fix memory corruption on
......
......@@ -640,6 +640,7 @@ doc/sv/Makefile
omf-install/Makefile
plugins/Makefile
plugins/numtheory/Makefile
plugins/fn-eng/Makefile
plugins/derivatives/Makefile
plugins/sc/Makefile
plugins/sylk/Makefile
......
......@@ -52,7 +52,7 @@ SUBDIRS_FILE_FORMATS = $(EXCEL_DIR) lotus-123 oleo sc sylk xbase html dif plan-p
xml_sax applix mps $(GNOME_GLOSSARY_DIR) $(PSICONV_DIR)
SUBDIRS_FUNCTIONS = $(PYTHON_DIR) $(PERL_DIR) $(GUILE_DIR) $(GB_DIR) \
numtheory derivatives $(GDA_DIR) $(PYFUNC_DIR)
numtheory fn-eng derivatives $(GDA_DIR) $(PYFUNC_DIR)
SUBDIRS_LOADERS = $(PYTHON_LOADER_DIR)
......
Makefile.in
Makefile
.deps
.libs
*.lo
*.la
plugin.xml
......@@ -5,9 +5,9 @@ INCLUDES = \
gnumeric_plugin_fnengdir = $(gnumeric_plugindir)/fn-eng
xmldir = $(gnumeric_plugin_fnengdir)
gnumeric_plugin_fneng_LTLIBRARIES = functions.la
fneng_la_LDFLAGS = -module -avoid-version
fneng_la_SOURCES = functions.c
gnumeric_plugin_fneng_LTLIBRARIES = plugin.la
plugin_la_LDFLAGS = -module -avoid-version
plugin_la_SOURCES = functions.c
xml_in_files = plugin.xml.in
xml_DATA = $(xml_in_files:.xml.in=.xml)
......
<?xml version="1.0"?>
<plugin id="Gnumeric_fneng">
<information>
<_name>Engineering Functions</_name>
<_description>Functions for complex numbers, base conversions, and more</_description>
</information>
<loader type="g_module">
<attribute name="module_file" value="plugin.la"/>
</loader>
<services>
<service type="function_group" id="engineering">
<_category>Engineering</_category>
<functions>
<function name="besseli"/>
<function name="besselk"/>
<function name="besselj"/>
<function name="bessely"/>
<function name="bin2dec"/>
<function name="bin2hex"/>
<function name="bin2oct"/>
<function name="complex"/>
<function name="convert"/>
<function name="dec2bin"/>
<function name="dec2oct"/>
<function name="dec2hex"/>
<function name="delta"/>
<function name="erf"/>
<function name="erfc"/>
<function name="gestep"/>
<function name="hex2bin"/>
<function name="hex2dec"/>
<function name="hex2oct"/>
<function name="imabs"/>
<function name="imaginary"/>
<function name="imargument"/>
<function name="imconjugate"/>
<function name="imcos"/>
<function name="imtan"/>
<function name="imdiv"/>
<function name="imexp"/>
<function name="imln"/>
<function name="imlog10"/>
<function name="imlog2"/>
<function name="impower"/>
<function name="improduct"/>
<function name="imreal"/>
<function name="imsin"/>
<function name="imsqrt"/>
<function name="imsub"/>
<function name="imsum"/>
<function name="oct2bin"/>
<function name="oct2dec"/>
<function name="oct2hex"/>
</functions>
</service>
</services>
</plugin>
......@@ -8,8 +8,8 @@
*/
#include <gnumeric-config.h>
#include <gnumeric.h>
#include <gnome.h>
#include <glib.h>
#include <libgnome/gnome-i18n.h>
#include "func.h"
#include "plugin.h"
......
......@@ -13,6 +13,8 @@ plugins/excel/ms-excel-read.c
plugins/excel/ms-excel-write.c
plugins/excel/ms-formula-read.c
plugins/excel/plugin.xml.in
plugins/fn-eng/functions.c
plugins/fn-eng/plugin.xml.in
plugins/gb/plugin.c
plugins/gb/plugin.xml.in
plugins/gda/plugin-gda.c
......@@ -107,7 +109,6 @@ src/dialogs/dialog-row-height.c
src/dialogs/dialog-search-replace.c
src/dialogs/dialog-search.c
src/dialogs/dialog-sheet-order.c
src/dialogs/dialog-simple-input.c
src/dialogs/dialog-solver.c
src/dialogs/dialog-stf-csv-page.c
src/dialogs/dialog-stf-export-format-page.c
......@@ -170,7 +171,6 @@ src/formats.c
src/func.c
src/functions/fn-database.c
src/functions/fn-date.c
src/functions/fn-eng.c
src/functions/fn-financial.c
src/functions/fn-information.c
src/functions/fn-logical.c
......
......@@ -41,7 +41,6 @@ extern void date_functions_init (void);
extern void string_functions_init (void);
extern void stat_functions_init (void);
extern void finance_functions_init (void);
extern void eng_functions_init (void);
extern void lookup_functions_init (void);
extern void logical_functions_init (void);
extern void database_functions_init (void);
......@@ -58,7 +57,6 @@ functions_init (void)
string_functions_init ();
stat_functions_init ();
finance_functions_init ();
eng_functions_init ();
lookup_functions_init ();
logical_functions_init ();
database_functions_init ();
......
......@@ -7,10 +7,9 @@ INCLUDES = \
noinst_LIBRARIES = libfunctions.a
libfunctions_a_SOURCES = \
libfunctions_a_SOURCES = \
fn-database.c \
fn-date.c \
fn-eng.c \
fn-financial.c \
fn-information.c \
fn-logical.c \
......
......@@ -183,8 +183,8 @@ unregister_allocation (void const *data)
#define ERROR -1
/* Bison/Yacc internals */
static int yylex (void);
static int yyerror (const char *s);
static int yylex (void);
static int yyerror (const char *s);
typedef struct {
/* The expression being parsed */
......@@ -233,6 +233,7 @@ build_binop (GnmExpr *l, GnmExprOp op, GnmExpr *r)
unregister_allocation (l);
return register_expr_allocation (gnm_expr_new_binary (l, op, r));
}
static GnmExpr *
build_logical (GnmExpr *l, gboolean is_and, GnmExpr *r)
{
......@@ -248,6 +249,7 @@ build_logical (GnmExpr *l, gboolean is_and, GnmExpr *r)
return register_expr_allocation (gnm_expr_new_funcall (is_and ? and_func : or_func,
g_slist_prepend (g_slist_prepend (NULL, l), r)));
}
static GnmExpr *
build_not (GnmExpr *expr)
{
......@@ -440,13 +442,13 @@ exp: CONSTANT { $$ = $1; }
| exp '^' exp { $$ = build_binop ($1, GNM_EXPR_OP_EXP, $3); }
| exp '&' exp { $$ = build_binop ($1, GNM_EXPR_OP_CAT, $3); }
| exp '=' exp { $$ = build_binop ($1, GNM_EXPR_OP_EQUAL, $3); }
| exp '<' exp { $$ = build_binop ($1, GNM_EXPR_OP_LT, $3); }
| exp '>' exp { $$ = build_binop ($1, GNM_EXPR_OP_GT, $3); }
| exp '<' exp { $$ = build_binop ($1, GNM_EXPR_OP_LT, $3); }
| exp '>' exp { $$ = build_binop ($1, GNM_EXPR_OP_GT, $3); }
| exp GTE exp { $$ = build_binop ($1, GNM_EXPR_OP_GTE, $3); }
| exp NE exp { $$ = build_binop ($1, GNM_EXPR_OP_NOT_EQUAL, $3); }
| exp LTE exp { $$ = build_binop ($1, GNM_EXPR_OP_LTE, $3); }
| exp AND exp { $$ = build_logical ($1, TRUE, $3); }
| exp OR exp { $$ = build_logical ($1, FALSE, $3); }
| exp AND exp { $$ = build_logical ($1, TRUE, $3); }
| exp OR exp { $$ = build_logical ($1, FALSE, $3); }
| '(' exp ')' { $$ = $2; }
| '-' exp %prec NEG { $$ = build_unary_op (GNM_EXPR_OP_UNARY_NEG, $2); }
......
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