diff options
author | Shashank | 2017-05-29 12:40:26 +0530 |
---|---|---|
committer | Shashank | 2017-05-29 12:40:26 +0530 |
commit | 0345245e860375a32c9a437c4a9d9cae807134e9 (patch) | |
tree | ad51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /modules/symbolic/sci_gateway | |
download | scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.gz scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.bz2 scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.zip |
CMSCOPE changed
Diffstat (limited to 'modules/symbolic/sci_gateway')
37 files changed, 1598 insertions, 0 deletions
diff --git a/modules/symbolic/sci_gateway/c/.deps/.dirstamp b/modules/symbolic/sci_gateway/c/.deps/.dirstamp new file mode 100755 index 000000000..e69de29bb --- /dev/null +++ b/modules/symbolic/sci_gateway/c/.deps/.dirstamp diff --git a/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-gw_symbolic.Plo b/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-gw_symbolic.Plo new file mode 100755 index 000000000..26d105948 --- /dev/null +++ b/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-gw_symbolic.Plo @@ -0,0 +1,295 @@ +sci_gateway/c/libscisymbolic_la-gw_symbolic.lo: \ + sci_gateway/c/gw_symbolic.c /usr/include/stdc-predef.h \ + /usr/include/string.h /usr/include/features.h \ + /usr/include/x86_64-linux-gnu/sys/cdefs.h \ + /usr/include/x86_64-linux-gnu/bits/wordsize.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs.h \ + /usr/include/x86_64-linux-gnu/gnu/stubs-64.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h /usr/include/xlocale.h \ + /usr/include/x86_64-linux-gnu/bits/string.h \ + /usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \ + /usr/include/x86_64-linux-gnu/bits/endian.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap.h \ + /usr/include/x86_64-linux-gnu/bits/types.h \ + /usr/include/x86_64-linux-gnu/bits/typesizes.h \ + /usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \ + /usr/include/x86_64-linux-gnu/bits/string3.h includes/gw_symbolic.h \ + includes/dynlib_symbolic.h \ + ../../modules/api_scilab/includes/api_scilab.h \ + ../../modules/core/includes/stack-c.h \ + ../../modules/core/includes/core_math.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h \ + /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h \ + /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ + /usr/include/x86_64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/x86_64-linux-gnu/bits/posix2_lim.h /usr/include/math.h \ + /usr/include/x86_64-linux-gnu/bits/math-vector.h \ + /usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/x86_64-linux-gnu/bits/huge_val.h \ + /usr/include/x86_64-linux-gnu/bits/huge_valf.h \ + /usr/include/x86_64-linux-gnu/bits/huge_vall.h \ + /usr/include/x86_64-linux-gnu/bits/inf.h \ + /usr/include/x86_64-linux-gnu/bits/nan.h \ + /usr/include/x86_64-linux-gnu/bits/mathdef.h \ + /usr/include/x86_64-linux-gnu/bits/mathcalls.h \ + /usr/include/x86_64-linux-gnu/bits/mathinline.h \ + /usr/include/x86_64-linux-gnu/bits/waitflags.h \ + /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ + /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \ + /usr/include/x86_64-linux-gnu/sys/select.h \ + /usr/include/x86_64-linux-gnu/bits/select.h \ + /usr/include/x86_64-linux-gnu/bits/sigset.h \ + /usr/include/x86_64-linux-gnu/bits/time.h \ + /usr/include/x86_64-linux-gnu/bits/select2.h \ + /usr/include/x86_64-linux-gnu/sys/sysmacros.h \ + /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib-float.h \ + /usr/include/x86_64-linux-gnu/bits/stdlib.h \ + ../../modules/core/includes/stack-def.h \ + ../../modules/core/includes/machine.h \ + ../../modules/core/includes/stackTypeVariable.h \ + ../../modules/core/includes/BOOL.h \ + ../../modules/core/includes/doublecomplex.h \ + ../../modules/core/includes/stack1.h \ + ../../modules/core/includes/scisparse.h \ + ../../modules/core/includes/stack2.h \ + ../../modules/core/includes/stack3.h \ + ../../modules/core/includes/stack-optional.h \ + ../../modules/core/includes/sci_types.h \ + ../../modules/api_scilab/includes/api_common.h \ + ../../modules/api_scilab/includes/api_scilab.h \ + ../../modules/api_scilab/includes/api_double.h \ + ../../modules/core/includes/doublecomplex.h \ + ../../modules/api_scilab/includes/api_string.h /usr/include/wchar.h \ + /usr/include/stdio.h /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \ + /usr/include/x86_64-linux-gnu/bits/wchar.h \ + /usr/include/x86_64-linux-gnu/bits/wchar2.h \ + ../../modules/api_scilab/includes/api_int.h \ + ../../modules/api_scilab/includes/api_poly.h \ + ../../modules/api_scilab/includes/api_sparse.h \ + ../../modules/api_scilab/includes/api_boolean.h \ + ../../modules/api_scilab/includes/api_boolean_sparse.h \ + ../../modules/api_scilab/includes/api_pointer.h \ + ../../modules/api_scilab/includes/api_list.h \ + ../../modules/api_scilab/includes/api_error.h \ + ../../modules/api_scilab/includes/api_handle.h \ + ../../modules/api_scilab/includes/api_optional.h \ + ../../modules/core/includes/stack-optional.h \ + ../../modules/api_scilab/includes/api_hypermat.h \ + ../../modules/core/includes/core_math.h \ + ../../modules/core/includes/sci_types.h \ + ../../modules/core/includes/MALLOC.h \ + ../../modules/core/includes/sci_mem_alloc.h \ + ../../modules/core/includes/callFunctionFromGateway.h \ + ../../modules/output_stream/includes/Scierror.h \ + ../../modules/output_stream/includes/do_error_number.h \ + ../../modules/core/includes/machine.h \ + ../../modules/localization/includes/localization.h \ + /usr/include/libintl.h /usr/include/locale.h \ + /usr/include/x86_64-linux-gnu/bits/locale.h + +/usr/include/stdc-predef.h: + +/usr/include/string.h: + +/usr/include/features.h: + +/usr/include/x86_64-linux-gnu/sys/cdefs.h: + +/usr/include/x86_64-linux-gnu/bits/wordsize.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs.h: + +/usr/include/x86_64-linux-gnu/gnu/stubs-64.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stddef.h: + +/usr/include/xlocale.h: + +/usr/include/x86_64-linux-gnu/bits/string.h: + +/usr/include/x86_64-linux-gnu/bits/string2.h: + +/usr/include/endian.h: + +/usr/include/x86_64-linux-gnu/bits/endian.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap.h: + +/usr/include/x86_64-linux-gnu/bits/types.h: + +/usr/include/x86_64-linux-gnu/bits/typesizes.h: + +/usr/include/x86_64-linux-gnu/bits/byteswap-16.h: + +/usr/include/stdlib.h: + +/usr/include/x86_64-linux-gnu/bits/string3.h: + +includes/gw_symbolic.h: + +includes/dynlib_symbolic.h: + +../../modules/api_scilab/includes/api_scilab.h: + +../../modules/core/includes/stack-c.h: + +../../modules/core/includes/core_math.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h: + +/usr/include/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix1_lim.h: + +/usr/include/x86_64-linux-gnu/bits/local_lim.h: + +/usr/include/linux/limits.h: + +/usr/include/x86_64-linux-gnu/bits/posix2_lim.h: + +/usr/include/math.h: + +/usr/include/x86_64-linux-gnu/bits/math-vector.h: + +/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/usr/include/x86_64-linux-gnu/bits/huge_val.h: + +/usr/include/x86_64-linux-gnu/bits/huge_valf.h: + +/usr/include/x86_64-linux-gnu/bits/huge_vall.h: + +/usr/include/x86_64-linux-gnu/bits/inf.h: + +/usr/include/x86_64-linux-gnu/bits/nan.h: + +/usr/include/x86_64-linux-gnu/bits/mathdef.h: + +/usr/include/x86_64-linux-gnu/bits/mathcalls.h: + +/usr/include/x86_64-linux-gnu/bits/mathinline.h: + +/usr/include/x86_64-linux-gnu/bits/waitflags.h: + +/usr/include/x86_64-linux-gnu/bits/waitstatus.h: + +/usr/include/x86_64-linux-gnu/sys/types.h: + +/usr/include/time.h: + +/usr/include/x86_64-linux-gnu/sys/select.h: + +/usr/include/x86_64-linux-gnu/bits/select.h: + +/usr/include/x86_64-linux-gnu/bits/sigset.h: + +/usr/include/x86_64-linux-gnu/bits/time.h: + +/usr/include/x86_64-linux-gnu/bits/select2.h: + +/usr/include/x86_64-linux-gnu/sys/sysmacros.h: + +/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: + +/usr/include/alloca.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: + +/usr/include/x86_64-linux-gnu/bits/stdlib.h: + +../../modules/core/includes/stack-def.h: + +../../modules/core/includes/machine.h: + +../../modules/core/includes/stackTypeVariable.h: + +../../modules/core/includes/BOOL.h: + +../../modules/core/includes/doublecomplex.h: + +../../modules/core/includes/stack1.h: + +../../modules/core/includes/scisparse.h: + +../../modules/core/includes/stack2.h: + +../../modules/core/includes/stack3.h: + +../../modules/core/includes/stack-optional.h: + +../../modules/core/includes/sci_types.h: + +../../modules/api_scilab/includes/api_common.h: + +../../modules/api_scilab/includes/api_scilab.h: + +../../modules/api_scilab/includes/api_double.h: + +../../modules/core/includes/doublecomplex.h: + +../../modules/api_scilab/includes/api_string.h: + +/usr/include/wchar.h: + +/usr/include/stdio.h: + +/usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h: + +/usr/include/x86_64-linux-gnu/bits/wchar.h: + +/usr/include/x86_64-linux-gnu/bits/wchar2.h: + +../../modules/api_scilab/includes/api_int.h: + +../../modules/api_scilab/includes/api_poly.h: + +../../modules/api_scilab/includes/api_sparse.h: + +../../modules/api_scilab/includes/api_boolean.h: + +../../modules/api_scilab/includes/api_boolean_sparse.h: + +../../modules/api_scilab/includes/api_pointer.h: + +../../modules/api_scilab/includes/api_list.h: + +../../modules/api_scilab/includes/api_error.h: + +../../modules/api_scilab/includes/api_handle.h: + +../../modules/api_scilab/includes/api_optional.h: + +../../modules/core/includes/stack-optional.h: + +../../modules/api_scilab/includes/api_hypermat.h: + +../../modules/core/includes/core_math.h: + +../../modules/core/includes/sci_types.h: + +../../modules/core/includes/MALLOC.h: + +../../modules/core/includes/sci_mem_alloc.h: + +../../modules/core/includes/callFunctionFromGateway.h: + +../../modules/output_stream/includes/Scierror.h: + +../../modules/output_stream/includes/do_error_number.h: + +../../modules/core/includes/machine.h: + +../../modules/localization/includes/localization.h: + +/usr/include/libintl.h: + +/usr/include/locale.h: + +/usr/include/x86_64-linux-gnu/bits/locale.h: diff --git a/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-sci_addsubf.Plo b/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-sci_addsubf.Plo new file mode 100755 index 000000000..dfee51d1a --- /dev/null +++ b/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-sci_addsubf.Plo @@ -0,0 +1,12 @@ +sci_gateway/c/libscisymbolic_la-sci_addsubf.lo: \ + sci_gateway/c/sci_addsubf.c /usr/include/stdc-predef.h \ + includes/gw_symbolic.h includes/dynlib_symbolic.h \ + ../../modules/core/includes/machine.h + +/usr/include/stdc-predef.h: + +includes/gw_symbolic.h: + +includes/dynlib_symbolic.h: + +../../modules/core/includes/machine.h: diff --git a/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-sci_ldivf.Plo b/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-sci_ldivf.Plo new file mode 100755 index 000000000..29a2ca60d --- /dev/null +++ b/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-sci_ldivf.Plo @@ -0,0 +1,11 @@ +sci_gateway/c/libscisymbolic_la-sci_ldivf.lo: sci_gateway/c/sci_ldivf.c \ + /usr/include/stdc-predef.h includes/gw_symbolic.h \ + includes/dynlib_symbolic.h ../../modules/core/includes/machine.h + +/usr/include/stdc-predef.h: + +includes/gw_symbolic.h: + +includes/dynlib_symbolic.h: + +../../modules/core/includes/machine.h: diff --git a/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-sci_mulf.Plo b/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-sci_mulf.Plo new file mode 100755 index 000000000..c2e40139f --- /dev/null +++ b/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-sci_mulf.Plo @@ -0,0 +1,11 @@ +sci_gateway/c/libscisymbolic_la-sci_mulf.lo: sci_gateway/c/sci_mulf.c \ + /usr/include/stdc-predef.h includes/gw_symbolic.h \ + includes/dynlib_symbolic.h ../../modules/core/includes/machine.h + +/usr/include/stdc-predef.h: + +includes/gw_symbolic.h: + +includes/dynlib_symbolic.h: + +../../modules/core/includes/machine.h: diff --git a/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-sci_rdivf.Plo b/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-sci_rdivf.Plo new file mode 100755 index 000000000..e9c8a1a98 --- /dev/null +++ b/modules/symbolic/sci_gateway/c/.deps/libscisymbolic_la-sci_rdivf.Plo @@ -0,0 +1,11 @@ +sci_gateway/c/libscisymbolic_la-sci_rdivf.lo: sci_gateway/c/sci_rdivf.c \ + /usr/include/stdc-predef.h includes/gw_symbolic.h \ + includes/dynlib_symbolic.h ../../modules/core/includes/machine.h + +/usr/include/stdc-predef.h: + +includes/gw_symbolic.h: + +includes/dynlib_symbolic.h: + +../../modules/core/includes/machine.h: diff --git a/modules/symbolic/sci_gateway/c/.dirstamp b/modules/symbolic/sci_gateway/c/.dirstamp new file mode 100755 index 000000000..e69de29bb --- /dev/null +++ b/modules/symbolic/sci_gateway/c/.dirstamp diff --git a/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-gw_symbolic.o b/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-gw_symbolic.o Binary files differnew file mode 100755 index 000000000..188e67b36 --- /dev/null +++ b/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-gw_symbolic.o diff --git a/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-sci_addsubf.o b/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-sci_addsubf.o Binary files differnew file mode 100755 index 000000000..6fd870c11 --- /dev/null +++ b/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-sci_addsubf.o diff --git a/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-sci_ldivf.o b/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-sci_ldivf.o Binary files differnew file mode 100755 index 000000000..276f501c4 --- /dev/null +++ b/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-sci_ldivf.o diff --git a/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-sci_mulf.o b/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-sci_mulf.o Binary files differnew file mode 100755 index 000000000..b36d66fc6 --- /dev/null +++ b/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-sci_mulf.o diff --git a/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-sci_rdivf.o b/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-sci_rdivf.o Binary files differnew file mode 100755 index 000000000..1a1d9b624 --- /dev/null +++ b/modules/symbolic/sci_gateway/c/.libs/libscisymbolic_la-sci_rdivf.o diff --git a/modules/symbolic/sci_gateway/c/gw_symbolic.c b/modules/symbolic/sci_gateway/c/gw_symbolic.c new file mode 100755 index 000000000..e3627bc1f --- /dev/null +++ b/modules/symbolic/sci_gateway/c/gw_symbolic.c @@ -0,0 +1,46 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006 - INRIA - Allan CORNET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ +#include <string.h> +#include "gw_symbolic.h" +#include "api_scilab.h" +#include "MALLOC.h" +#include "callFunctionFromGateway.h" +#include "Scierror.h" +#include "localization.h" +/*--------------------------------------------------------------------------*/ +static gw_generic_table Tab[] = +{ + {sci_addf, "addf"}, + {sci_subf, "subf"}, + {sci_mulf, "mulf"}, + {sci_ldivf, "ldivf"}, + {sci_rdivf, "rdivf"} +}; +/*--------------------------------------------------------------------------*/ +int gw_symbolic(void) +{ + if (Rhs != 2) + { + Scierror(39, _("%s: Wrong number of input arguments: %d expected.\n"), Tab[Fin - 1].name, 2); + return 0; + } + + if (pvApiCtx == NULL) + { + pvApiCtx = (StrCtx*)MALLOC(sizeof(StrCtx)); + } + + pvApiCtx->pstName = (char*)Tab[Fin - 1].name; + callFunctionFromGateway(Tab, SIZE_CURRENT_GENERIC_TABLE(Tab)); + return 0; +} +/*--------------------------------------------------------------------------*/ diff --git a/modules/symbolic/sci_gateway/c/libscisymbolic_la-gw_symbolic.lo b/modules/symbolic/sci_gateway/c/libscisymbolic_la-gw_symbolic.lo new file mode 100755 index 000000000..33b21bc61 --- /dev/null +++ b/modules/symbolic/sci_gateway/c/libscisymbolic_la-gw_symbolic.lo @@ -0,0 +1,12 @@ +# sci_gateway/c/libscisymbolic_la-gw_symbolic.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscisymbolic_la-gw_symbolic.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/symbolic/sci_gateway/c/libscisymbolic_la-sci_addsubf.lo b/modules/symbolic/sci_gateway/c/libscisymbolic_la-sci_addsubf.lo new file mode 100755 index 000000000..a0e4ac428 --- /dev/null +++ b/modules/symbolic/sci_gateway/c/libscisymbolic_la-sci_addsubf.lo @@ -0,0 +1,12 @@ +# sci_gateway/c/libscisymbolic_la-sci_addsubf.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscisymbolic_la-sci_addsubf.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/symbolic/sci_gateway/c/libscisymbolic_la-sci_ldivf.lo b/modules/symbolic/sci_gateway/c/libscisymbolic_la-sci_ldivf.lo new file mode 100755 index 000000000..d8cc5ed49 --- /dev/null +++ b/modules/symbolic/sci_gateway/c/libscisymbolic_la-sci_ldivf.lo @@ -0,0 +1,12 @@ +# sci_gateway/c/libscisymbolic_la-sci_ldivf.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscisymbolic_la-sci_ldivf.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/symbolic/sci_gateway/c/libscisymbolic_la-sci_mulf.lo b/modules/symbolic/sci_gateway/c/libscisymbolic_la-sci_mulf.lo new file mode 100755 index 000000000..b7b807797 --- /dev/null +++ b/modules/symbolic/sci_gateway/c/libscisymbolic_la-sci_mulf.lo @@ -0,0 +1,12 @@ +# sci_gateway/c/libscisymbolic_la-sci_mulf.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscisymbolic_la-sci_mulf.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/symbolic/sci_gateway/c/libscisymbolic_la-sci_rdivf.lo b/modules/symbolic/sci_gateway/c/libscisymbolic_la-sci_rdivf.lo new file mode 100755 index 000000000..ff639bd49 --- /dev/null +++ b/modules/symbolic/sci_gateway/c/libscisymbolic_la-sci_rdivf.lo @@ -0,0 +1,12 @@ +# sci_gateway/c/libscisymbolic_la-sci_rdivf.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/libscisymbolic_la-sci_rdivf.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/symbolic/sci_gateway/c/sci_addsubf.c b/modules/symbolic/sci_gateway/c/sci_addsubf.c new file mode 100755 index 000000000..c839f3669 --- /dev/null +++ b/modules/symbolic/sci_gateway/c/sci_addsubf.c @@ -0,0 +1,28 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006 - INRIA - Allan CORNET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ +#include "gw_symbolic.h" +#include "machine.h" +/*--------------------------------------------------------------------------*/ +extern int C2F(sciaddfsubf)(char *fname, unsigned long fname_len); +/*--------------------------------------------------------------------------*/ +int sci_addf(char *fname, unsigned long fname_len) +{ + C2F(sciaddfsubf)(fname, fname_len); + return 0; +} +/*--------------------------------------------------------------------------*/ +int sci_subf(char *fname, unsigned long fname_len) +{ + C2F(sciaddfsubf)(fname, fname_len); + return 0; +} +/*--------------------------------------------------------------------------*/ diff --git a/modules/symbolic/sci_gateway/c/sci_ldivf.c b/modules/symbolic/sci_gateway/c/sci_ldivf.c new file mode 100755 index 000000000..d0c7aa35e --- /dev/null +++ b/modules/symbolic/sci_gateway/c/sci_ldivf.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006 - INRIA - Allan CORNET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ +#include "gw_symbolic.h" +#include "machine.h" +/*--------------------------------------------------------------------------*/ +extern int C2F(scildivf)(char *fname, unsigned long fname_len); +/*--------------------------------------------------------------------------*/ +int sci_ldivf(char *fname, unsigned long fname_len) +{ + C2F(scildivf)(fname, fname_len); + return 0; +} +/*--------------------------------------------------------------------------*/ diff --git a/modules/symbolic/sci_gateway/c/sci_mulf.c b/modules/symbolic/sci_gateway/c/sci_mulf.c new file mode 100755 index 000000000..1a8fafaf5 --- /dev/null +++ b/modules/symbolic/sci_gateway/c/sci_mulf.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006 - INRIA - Allan CORNET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ +#include "gw_symbolic.h" +#include "machine.h" +/*--------------------------------------------------------------------------*/ +extern int C2F(scimulf)(char *fname, unsigned long fname_len); +/*--------------------------------------------------------------------------*/ +int sci_mulf(char *fname, unsigned long fname_len) +{ + C2F(scimulf)(fname, fname_len); + return 0; +} +/*--------------------------------------------------------------------------*/ diff --git a/modules/symbolic/sci_gateway/c/sci_rdivf.c b/modules/symbolic/sci_gateway/c/sci_rdivf.c new file mode 100755 index 000000000..0048ce8bc --- /dev/null +++ b/modules/symbolic/sci_gateway/c/sci_rdivf.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006 - INRIA - Allan CORNET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ +#include "gw_symbolic.h" +#include "machine.h" +/*--------------------------------------------------------------------------*/ +extern int C2F(scirdivf)(char *fname, unsigned long fname_len); +/*--------------------------------------------------------------------------*/ +int sci_rdivf(char *fname, unsigned long fname_len) +{ + C2F(scirdivf)(fname, fname_len); + return 0; +} +/*--------------------------------------------------------------------------*/ diff --git a/modules/symbolic/sci_gateway/fortran/.deps/.dirstamp b/modules/symbolic/sci_gateway/fortran/.deps/.dirstamp new file mode 100755 index 000000000..e69de29bb --- /dev/null +++ b/modules/symbolic/sci_gateway/fortran/.deps/.dirstamp diff --git a/modules/symbolic/sci_gateway/fortran/.dirstamp b/modules/symbolic/sci_gateway/fortran/.dirstamp new file mode 100755 index 000000000..e69de29bb --- /dev/null +++ b/modules/symbolic/sci_gateway/fortran/.dirstamp diff --git a/modules/symbolic/sci_gateway/fortran/.libs/sci_f_addsubf.o b/modules/symbolic/sci_gateway/fortran/.libs/sci_f_addsubf.o Binary files differnew file mode 100755 index 000000000..1b3ea5ebe --- /dev/null +++ b/modules/symbolic/sci_gateway/fortran/.libs/sci_f_addsubf.o diff --git a/modules/symbolic/sci_gateway/fortran/.libs/sci_f_ldivf.o b/modules/symbolic/sci_gateway/fortran/.libs/sci_f_ldivf.o Binary files differnew file mode 100755 index 000000000..e16ee6f9d --- /dev/null +++ b/modules/symbolic/sci_gateway/fortran/.libs/sci_f_ldivf.o diff --git a/modules/symbolic/sci_gateway/fortran/.libs/sci_f_mulf.o b/modules/symbolic/sci_gateway/fortran/.libs/sci_f_mulf.o Binary files differnew file mode 100755 index 000000000..7f6120c71 --- /dev/null +++ b/modules/symbolic/sci_gateway/fortran/.libs/sci_f_mulf.o diff --git a/modules/symbolic/sci_gateway/fortran/.libs/sci_f_rdivf.o b/modules/symbolic/sci_gateway/fortran/.libs/sci_f_rdivf.o Binary files differnew file mode 100755 index 000000000..8cf5d9abd --- /dev/null +++ b/modules/symbolic/sci_gateway/fortran/.libs/sci_f_rdivf.o diff --git a/modules/symbolic/sci_gateway/fortran/sci_f_addsubf.f b/modules/symbolic/sci_gateway/fortran/sci_f_addsubf.f new file mode 100755 index 000000000..288abb47a --- /dev/null +++ b/modules/symbolic/sci_gateway/fortran/sci_f_addsubf.f @@ -0,0 +1,171 @@ +c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +c Copyright (C) INRIA +c +c This file must be used under the terms of the CeCILL. +c This source file is licensed as described in the file COPYING, which +c you should have received as part of this distribution. The terms +c are also available at +c http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +c + subroutine sciaddfsubf(fname) +c ---------------------------- + character*(*) fname + include 'stack.h' + + logical isnum + integer plus,minus + integer iadr,sadr + data plus/45/,minus/46/ + + + iadr(l)=l+l-1 + sadr(l)=(l/2)+1 + + isg=1 + if(fin.eq.2) isg=-1 + ilptr1=iadr(lstk(top+1))+1 +c le "+1" est du a expsum qui peut renvoyer une chaine 1 carac plus long +c que la chaine donnee + il1=iadr(lstk(top-1)) + il=il1 + if(istk(il1).ne.10) then + err=1 + call error(55) + return + endif + il2=iadr(lstk(top)) + if(istk(il2).ne.10) then + err=2 + call error(55) + return + endif + is=plus +c + if(istk(il1+1)*istk(il1+2).ne.1) then + err=1 + call error(36) + return + endif + n1=istk(il1+5)-1 + il1=il1+6 + il0=il1 + maxnp=iadr(lstk(bot))-ilptr1 + call expsum(1,istk(il1),n1,istk(ilptr1),np1,maxnp,err) + if(err.gt.0) then + call error(17) + return + endif +c + ilptr2=ilptr1+np1+1 + if(istk(il2+1)*istk(il2+2).ne.1) then + err=2 + call error(36) + return + endif + n2=istk(il2+5)-1 + il2=il2+6 + top=top-1 + maxnp=iadr(lstk(bot))-ilptr2 + call expsum(isg,istk(il2),n2,istk(ilptr2),np2,maxnp,err) + if(err.gt.0) then + call error(17) + return + endif +c + inum=0 + do 1005 i1=1,np1 + it1=il1-1+istk(ilptr1-1+i1) + nt1=istk(ilptr1+i1)-istk(ilptr1-1+i1) + if(istk(it1+1).eq.0.and.n1.eq.2) then + call icopy(n2,istk(il2),1,istk(il1),1) + il1=il1+n2 + goto 1010 + endif + if(isnum(istk(it1+1),nt1-1,inum1)) then + if(istk(it1).eq.minus) inum1=-inum1 + inum=inum+inum1 + istk(it1)=0 + endif + i2=0 + 1004 i2=i2+1 + if(i2.gt.np2) goto 1005 + it2=il2-1+istk(ilptr2-1+i2) + if(istk(it2).eq.0) goto 1004 + nt2=istk(ilptr2+i2)-istk(ilptr2-1+i2) + if(istk(it2+1).eq.0.and.n2.eq.2) then + if (istk(it1).ne.0) then + il1=il1+n1 + goto 1010 + else + ilw=il1 + goto 1008 + endif + endif + if(isnum(istk(it2+1),nt2-1,inum2)) then + if(istk(it2).eq.minus) inum2=-inum2 + inum=inum+inum2 + istk(it2)=0 + goto 1004 + endif + if (istk(it1).ne.istk(it2).and.nt1.eq.nt2) then +c on regarde si les termes sont egaux + do 1002 k=2,nt1 + if(istk(it1-1+k).ne.istk(it2-1+k)) goto 1004 + 1002 continue + istk(it2)=0 + istk(it1)=0 + goto 1005 + endif + goto 1004 + 1005 continue +c + ilw=il1 + do 1006 i1=1,np1 + it1=il1-1+istk(ilptr1-1+i1) + nt1=istk(ilptr1+i1)-istk(ilptr1-1+i1) + if(istk(it1).ne.0) then + call icopy(nt1,istk(it1),1,istk(ilw),1) + ilw=ilw+nt1 + endif + 1006 continue + do 1007 i2=1,np2 + it2=il2-1+istk(ilptr2-1+i2) + nt2=istk(ilptr2+i2)-istk(ilptr2-1+i2) + if(istk(it2).ne.0) then + call icopy(nt2,istk(it2),1,istk(ilw),1) + ilw=ilw+nt2 + endif + 1007 continue +c + 1008 if(inum.ne.0) then + if(inum.lt.0) then + istk(ilw)=minus + ilw=ilw+1 + inum=-inum + elseif(ilw.ne.il0) then + istk(ilw)=plus + ilw=ilw+1 + endif + call intstr(inum,istk(ilw),ni,0) + ilw=ilw+ni + endif +c + il1=ilw + if(il1.eq.il0) then + istk(il1)=0 + il1=il1+1 + endif +c + 1010 n1=il1-il0 + if(istk(il0).eq.plus) then + call icopy(n1-1,istk(il0+1),1,istk(il0),1) + n1=n1-1 + il1=il1-1 + endif + istk(il+5)=n1+1 + lstk(top+1)=sadr(il1+1) + goto 9999 + + 9999 return + end + diff --git a/modules/symbolic/sci_gateway/fortran/sci_f_addsubf.lo b/modules/symbolic/sci_gateway/fortran/sci_f_addsubf.lo new file mode 100755 index 000000000..ff6ddc625 --- /dev/null +++ b/modules/symbolic/sci_gateway/fortran/sci_f_addsubf.lo @@ -0,0 +1,12 @@ +# sci_gateway/fortran/sci_f_addsubf.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/sci_f_addsubf.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/symbolic/sci_gateway/fortran/sci_f_ldivf.f b/modules/symbolic/sci_gateway/fortran/sci_f_ldivf.f new file mode 100755 index 000000000..e4f4960bf --- /dev/null +++ b/modules/symbolic/sci_gateway/fortran/sci_f_ldivf.f @@ -0,0 +1,266 @@ +c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +c Copyright (C) INRIA +c +c This file must be used under the terms of the CeCILL. +c This source file is licensed as described in the file COPYING, which +c you should have received as part of this distribution. The terms +c are also available at +c http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +c + subroutine scildivf(fname) +c ---------------------------- + character*(*) fname + include 'stack.h' + + logical iseye,isnum + integer lparen,rparen,star,minus,blanc,slash,bslash,symb + integer iadr,sadr + data lparen/41/,rparen/42/,star/47/,minus/46/,blanc/40/ + data slash/48/ ,bslash/49/ + + iadr(l)=l+l-1 + sadr(l)=(l/2)+1 + + symb=bslash + + il1=iadr(lstk(top-1)) + il=il1 + if(istk(il1).ne.10) then + err=1 + call error(55) + return + endif + if(istk(il1+1)*istk(il1+2).ne.1) then + err=1 + call error(36) + return + endif + n1=istk(il1+5)-1 + il1=il1+6 + il0=il1 + call atome(istk(il1),n1,it1,is1) + if(symb.ne.bslash) call termf(istk(il1),n1,it1) +c + il2=iadr(lstk(top)) + if(istk(il2).ne.10) then + err=2 + call error(55) + return + endif + if(istk(il2+1)*istk(il2+2).ne.1) then + err=2 + call error(36) + return + endif + n2=istk(il2+5)-1 + il2=il2+6 + top=top-1 +c + call atome(istk(il2),n2,it2,is2) + if(symb.ne.slash) call termf(istk(il2),n2,it2) + if (it2.ne.0) call factf(istk(il2),n2,it2) + +c + goto (2010,2020,2030,2040) it1+2*it2+1 +c +c 2 expressions + 2010 continue + idec=0 + if(is1.ne.1) then + call icopy(n1,istk(il1),-1,istk(il1+1),-1) + idec=1 + endif + il0=il1 + istk(il1)=lparen + istk(il1+n1+idec)=rparen + il1=il1+n1+idec+1 + istk(il1)=symb + il1=il1+1 + istk(il1)=lparen + il1=il1+1 + if(is2.eq.1) then + il2=il2+1 + n2=n2-1 + endif + call icopy(n2,istk(il2),1,istk(il1),1) + il1=il1+n2 + istk(il1)=rparen + il1=il1+1 + istk(il+5)=il1-il0+1 + lstk(top+1)=sadr(il1) + goto 9999 + 2020 continue +c un atome et une expression + idec=abs(is1) + ipar=0 + if(n1-idec.eq.1 .and.istk(il1+idec).eq.0) then + if(symb.eq.bslash) then + call error(27) + return + endif + goto 9999 + endif + if(symb.ne.slash.and. + & ((n1-idec.eq.1 .and. istk(il1+idec).eq.1).or. + & (n1-idec.eq.5.and.iseye(istk(il1+idec))))) then +c n1=n1-1 + n1=idec + if(is1.eq.-1) then + istk(il1+n1)=lparen + n1=n1+1 + ipar=1 + endif + goto 2021 + else + istk(il1+n1)=symb + istk(il1+n1+1)=lparen + n1=n1+2 + ipar=1 + endif + 2021 if(is2.eq.1) then + il2=il2+1 + n2=n2-1 + endif + call icopy(n2,istk(il2),1,istk(il1+n1),1) + n1=n1+n2 + if(ipar.eq.1) then + istk(il1+n1)=rparen + n1=n1+1 + endif + istk(il+5)=1+n1 + lstk(top+1)=sadr(il1+n1) + goto 9999 +c expr et atome + 2030 continue + idec=abs(is2) + if(n2-idec.eq.1.and.istk(il2+idec).eq.0) then + if(symb.eq.slash) then + call error(27) + return + endif + istk(il1)=0 + istk(il+5)=2 + lstk(top+1)=sadr(il1+1) + goto 9999 + endif + if(symb.ne.bslash.and.is2.ge.0 + & .and.((n2-idec.eq.1.and.istk(il2+idec).eq.1) + & .or.(n2-idec.eq.5.and.iseye(istk(il2+idec))))) then + istk(il+5)=n1+1 + lstk(top+1)=sadr(il1+n1) + goto 9999 + endif + idec=0 + if(is1.ne.1) idec=idec+1 + if(is2.lt.0) idec=idec+1 + call icopy(n1,istk(il1),-1,istk(il1+idec),-1) + il0=il1 + ill=il1 + if(is2.lt.0) then + istk(ill)=minus + ill=ill+1 + endif + istk(ill)=lparen + istk(il1+n1+idec)=rparen + il1=il1+n1+idec+1 + if(symb.ne.bslash.and.is2.eq.-1.and. + & ((n2.eq.2.and.istk(il2+1).eq.1).or. + & (n2.eq.6.and.iseye(istk(il2+1))))) goto 2031 + istk(il1)=symb + il1=il1+1 + if(is2.ne.0) then + il2=il2+1 + n2=n2-1 + endif + call icopy(n2,istk(il2),1,istk(il1),1) + il1=il1+n2 + 2031 istk(il+5)=il1-il0+1 + lstk(top+1)=sadr(il1) + goto 9999 +c atome et atome + 2040 continue + + idec1=abs(is1) + if(n1-idec1.eq.1.and.istk(il1+idec1).eq.0) then + if(symb.eq.bslash) then + call error(27) + return + endif + goto 9999 + endif + idec2=abs(is2) + if(n2-idec2.eq.1.and.istk(il2+idec2).eq.0) then + if(symb.eq.slash) then + call error(27) + return + endif + istk(il1)=0 + istk(il+5)=2 + lstk(top+1)=sadr(il1+1) + goto 9999 + endif + if(symb.eq.star) then + if(isnum(istk(il1+idec1),n1-idec1,inum1).and. + & isnum(istk(il2+idec2),n2-idec2,inum2)) then + if(is1.eq.-1) inum1=-inum1 + if(is2.eq.-1) inum2=-inum2 + inum=inum1*inum2 + call intstr(inum,istk(il1),ni,0) + il1=il1+ni + istk(il+5)=ni+1 + lstk(top+1)=sadr(il1) + goto 9999 + endif + endif + is=blanc + if(is1.eq.-1.and.is2.ge.0 .or. + + is2.eq.-1.and.is1.ge.0) is=minus + if(symb.ne.slash.and. + & ((n1-abs(is1).eq.1.and.istk(il1+abs(is1)).eq.1).or. + & (n1-abs(is1).eq.5.and.iseye(istk(il1+abs(is1))))) ) then + if(is.eq.minus) then + istk(il1)=is + il1=il1+1 + endif + call icopy(n2-abs(is2),istk(il2+abs(is2)),1,istk(il1),1) + il1=il1+n2-abs(is2) + istk(il+5)=il1-il0+1 + lstk(top+1)=sadr(il1+1) + goto 9999 + endif + idec1=0 + idec=0 + if(is1.eq.-1.and.is2.eq.-1) idec1=1 + if(is.eq.minus.and.is1.eq.0) then + idec=1 + call icopy(n1,istk(il1),-1,istk(il1+idec),-1) + n1=n1+1 + endif + if(idec1.ne.0) then + call icopy(n1-1,istk(il1+idec+1),1,istk(il1+idec),1) + n1=n1-1 + endif + il0=il1 + ill=il1 + if(is.eq.minus) then + istk(ill)=minus + ill=ill+1 + endif + il1=il1+n1 + if(symb.ne.bslash.and. + & ((n2-abs(is2).eq.1.and.istk(il2+abs(is2)).eq.1).or. + & (n2-abs(is2).eq.5.and.iseye(istk(il2+abs(is2)))))) goto 2041 + istk(il1)=symb + il1=il1+1 + if(is2.ne.0) then + il2=il2+1 + n2=n2-1 + endif + call icopy(n2,istk(il2),1,istk(il1),1) + il1=il1+n2 + 2041 istk(il+5)=il1-il0+1 + lstk(top+1)=sadr(il1) + goto 9999 +c + 9999 return + end diff --git a/modules/symbolic/sci_gateway/fortran/sci_f_ldivf.lo b/modules/symbolic/sci_gateway/fortran/sci_f_ldivf.lo new file mode 100755 index 000000000..016def93e --- /dev/null +++ b/modules/symbolic/sci_gateway/fortran/sci_f_ldivf.lo @@ -0,0 +1,12 @@ +# sci_gateway/fortran/sci_f_ldivf.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/sci_f_ldivf.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/symbolic/sci_gateway/fortran/sci_f_mulf.f b/modules/symbolic/sci_gateway/fortran/sci_f_mulf.f new file mode 100755 index 000000000..7c2cce716 --- /dev/null +++ b/modules/symbolic/sci_gateway/fortran/sci_f_mulf.f @@ -0,0 +1,268 @@ +c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +c Copyright (C) INRIA +c +c This file must be used under the terms of the CeCILL. +c This source file is licensed as described in the file COPYING, which +c you should have received as part of this distribution. The terms +c are also available at +c http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +c + + subroutine scimulf(fname) +c ---------------------------- + character*(*) fname + include 'stack.h' + + logical iseye,isnum + integer lparen,rparen,star,minus,blanc,slash,bslash,symb + integer iadr,sadr + data lparen/41/,rparen/42/,star/47/,minus/46/,blanc/40/ + data slash/48/ ,bslash/49/ + + iadr(l)=l+l-1 + sadr(l)=(l/2)+1 + + symb=star + + il1=iadr(lstk(top-1)) + il=il1 + if(istk(il1).ne.10) then + err=1 + call error(55) + return + endif + if(istk(il1+1)*istk(il1+2).ne.1) then + err=1 + call error(36) + return + endif + n1=istk(il1+5)-1 + il1=il1+6 + il0=il1 + call atome(istk(il1),n1,it1,is1) + if(symb.ne.bslash) call termf(istk(il1),n1,it1) +c + il2=iadr(lstk(top)) + if(istk(il2).ne.10) then + err=2 + call error(55) + return + endif + if(istk(il2+1)*istk(il2+2).ne.1) then + err=2 + call error(36) + return + endif + n2=istk(il2+5)-1 + il2=il2+6 + top=top-1 +c + call atome(istk(il2),n2,it2,is2) + if(symb.ne.slash) call termf(istk(il2),n2,it2) + if (it2.ne.0) call factf(istk(il2),n2,it2) + +c + goto (2010,2020,2030,2040) it1+2*it2+1 +c +c 2 expressions + 2010 continue + idec=0 + if(is1.ne.1) then + call icopy(n1,istk(il1),-1,istk(il1+1),-1) + idec=1 + endif + il0=il1 + istk(il1)=lparen + istk(il1+n1+idec)=rparen + il1=il1+n1+idec+1 + istk(il1)=symb + il1=il1+1 + istk(il1)=lparen + il1=il1+1 + if(is2.eq.1) then + il2=il2+1 + n2=n2-1 + endif + call icopy(n2,istk(il2),1,istk(il1),1) + il1=il1+n2 + istk(il1)=rparen + il1=il1+1 + istk(il+5)=il1-il0+1 + lstk(top+1)=sadr(il1) + goto 9999 + 2020 continue +c un atome et une expression + idec=abs(is1) + ipar=0 + if(n1-idec.eq.1 .and.istk(il1+idec).eq.0) then + if(symb.eq.bslash) then + call error(27) + return + endif + goto 9999 + endif + if(symb.ne.slash.and. + & ((n1-idec.eq.1 .and. istk(il1+idec).eq.1).or. + & (n1-idec.eq.5.and.iseye(istk(il1+idec))))) then +c n1=n1-1 + n1=idec + if(is1.eq.-1) then + istk(il1+n1)=lparen + n1=n1+1 + ipar=1 + endif + goto 2021 + else + istk(il1+n1)=symb + istk(il1+n1+1)=lparen + n1=n1+2 + ipar=1 + endif + 2021 if(is2.eq.1) then + il2=il2+1 + n2=n2-1 + endif + call icopy(n2,istk(il2),1,istk(il1+n1),1) + n1=n1+n2 + if(ipar.eq.1) then + istk(il1+n1)=rparen + n1=n1+1 + endif + istk(il+5)=1+n1 + lstk(top+1)=sadr(il1+n1) + goto 9999 +c expr et atome + 2030 continue + idec=abs(is2) + if(n2-idec.eq.1.and.istk(il2+idec).eq.0) then + if(symb.eq.slash) then + call error(27) + return + endif + istk(il1)=0 + istk(il+5)=2 + lstk(top+1)=sadr(il1+1) + goto 9999 + endif + if(symb.ne.bslash.and.is2.ge.0 + & .and.((n2-idec.eq.1.and.istk(il2+idec).eq.1) + & .or.(n2-idec.eq.5.and.iseye(istk(il2+idec))))) then + istk(il+5)=n1+1 + lstk(top+1)=sadr(il1+n1) + goto 9999 + endif + idec=0 + if(is1.ne.1) idec=idec+1 + if(is2.lt.0) idec=idec+1 + call icopy(n1,istk(il1),-1,istk(il1+idec),-1) + il0=il1 + ill=il1 + if(is2.lt.0) then + istk(ill)=minus + ill=ill+1 + endif + istk(ill)=lparen + istk(il1+n1+idec)=rparen + il1=il1+n1+idec+1 + if(symb.ne.bslash.and.is2.eq.-1.and. + & ((n2.eq.2.and.istk(il2+1).eq.1).or. + & (n2.eq.6.and.iseye(istk(il2+1))))) goto 2031 + istk(il1)=symb + il1=il1+1 + if(is2.ne.0) then + il2=il2+1 + n2=n2-1 + endif + call icopy(n2,istk(il2),1,istk(il1),1) + il1=il1+n2 + 2031 istk(il+5)=il1-il0+1 + lstk(top+1)=sadr(il1) + goto 9999 +c atome et atome + 2040 continue + + idec1=abs(is1) + if(n1-idec1.eq.1.and.istk(il1+idec1).eq.0) then + if(symb.eq.bslash) then + call error(27) + return + endif + goto 9999 + endif + idec2=abs(is2) + if(n2-idec2.eq.1.and.istk(il2+idec2).eq.0) then + if(symb.eq.slash) then + call error(27) + return + endif + istk(il1)=0 + istk(il+5)=2 + lstk(top+1)=sadr(il1+1) + goto 9999 + endif + if(symb.eq.star) then + if(isnum(istk(il1+idec1),n1-idec1,inum1).and. + & isnum(istk(il2+idec2),n2-idec2,inum2)) then + if(is1.eq.-1) inum1=-inum1 + if(is2.eq.-1) inum2=-inum2 + inum=inum1*inum2 + call intstr(inum,istk(il1),ni,0) + il1=il1+ni + istk(il+5)=ni+1 + lstk(top+1)=sadr(il1) + goto 9999 + endif + endif + is=blanc + if(is1.eq.-1.and.is2.ge.0 .or. + + is2.eq.-1.and.is1.ge.0) is=minus + if(symb.ne.slash.and. + & ((n1-abs(is1).eq.1.and.istk(il1+abs(is1)).eq.1).or. + & (n1-abs(is1).eq.5.and.iseye(istk(il1+abs(is1))))) ) then + if(is.eq.minus) then + istk(il1)=is + il1=il1+1 + endif + call icopy(n2-abs(is2),istk(il2+abs(is2)),1,istk(il1),1) + il1=il1+n2-abs(is2) + istk(il+5)=il1-il0+1 + lstk(top+1)=sadr(il1+1) + goto 9999 + endif + idec1=0 + idec=0 + if(is1.eq.-1.and.is2.eq.-1) idec1=1 + if(is.eq.minus.and.is1.eq.0) then + idec=1 + call icopy(n1,istk(il1),-1,istk(il1+idec),-1) + n1=n1+1 + endif + if(idec1.ne.0) then + call icopy(n1-1,istk(il1+idec+1),1,istk(il1+idec),1) + n1=n1-1 + endif + il0=il1 + ill=il1 + if(is.eq.minus) then + istk(ill)=minus + ill=ill+1 + endif + il1=il1+n1 + if(symb.ne.bslash.and. + & ((n2-abs(is2).eq.1.and.istk(il2+abs(is2)).eq.1).or. + & (n2-abs(is2).eq.5.and.iseye(istk(il2+abs(is2)))))) goto 2041 + istk(il1)=symb + il1=il1+1 + if(is2.ne.0) then + il2=il2+1 + n2=n2-1 + endif + call icopy(n2,istk(il2),1,istk(il1),1) + il1=il1+n2 + 2041 istk(il+5)=il1-il0+1 + lstk(top+1)=sadr(il1) + goto 9999 +c + 9999 return + end + diff --git a/modules/symbolic/sci_gateway/fortran/sci_f_mulf.lo b/modules/symbolic/sci_gateway/fortran/sci_f_mulf.lo new file mode 100755 index 000000000..3be61eb26 --- /dev/null +++ b/modules/symbolic/sci_gateway/fortran/sci_f_mulf.lo @@ -0,0 +1,12 @@ +# sci_gateway/fortran/sci_f_mulf.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/sci_f_mulf.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/symbolic/sci_gateway/fortran/sci_f_rdivf.f b/modules/symbolic/sci_gateway/fortran/sci_f_rdivf.f new file mode 100755 index 000000000..9cc3b6614 --- /dev/null +++ b/modules/symbolic/sci_gateway/fortran/sci_f_rdivf.f @@ -0,0 +1,266 @@ +c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +c Copyright (C) INRIA +c +c This file must be used under the terms of the CeCILL. +c This source file is licensed as described in the file COPYING, which +c you should have received as part of this distribution. The terms +c are also available at +c http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +c + subroutine scirdivf(fname) +c ---------------------------- + character*(*) fname + include 'stack.h' + + logical iseye,isnum + integer lparen,rparen,star,minus,blanc,slash,bslash,symb + integer iadr,sadr + data lparen/41/,rparen/42/,star/47/,minus/46/,blanc/40/ + data slash/48/ ,bslash/49/ + + iadr(l)=l+l-1 + sadr(l)=(l/2)+1 + + symb=slash + + il1=iadr(lstk(top-1)) + il=il1 + if(istk(il1).ne.10) then + err=1 + call error(55) + return + endif + if(istk(il1+1)*istk(il1+2).ne.1) then + err=1 + call error(36) + return + endif + n1=istk(il1+5)-1 + il1=il1+6 + il0=il1 + call atome(istk(il1),n1,it1,is1) + if(symb.ne.bslash) call termf(istk(il1),n1,it1) +c + il2=iadr(lstk(top)) + if(istk(il2).ne.10) then + err=2 + call error(55) + return + endif + if(istk(il2+1)*istk(il2+2).ne.1) then + err=2 + call error(36) + return + endif + n2=istk(il2+5)-1 + il2=il2+6 + top=top-1 +c + call atome(istk(il2),n2,it2,is2) + if(symb.ne.slash) call termf(istk(il2),n2,it2) + if (it2.ne.0) call factf(istk(il2),n2,it2) + +c + goto (2010,2020,2030,2040) it1+2*it2+1 +c +c 2 expressions + 2010 continue + idec=0 + if(is1.ne.1) then + call icopy(n1,istk(il1),-1,istk(il1+1),-1) + idec=1 + endif + il0=il1 + istk(il1)=lparen + istk(il1+n1+idec)=rparen + il1=il1+n1+idec+1 + istk(il1)=symb + il1=il1+1 + istk(il1)=lparen + il1=il1+1 + if(is2.eq.1) then + il2=il2+1 + n2=n2-1 + endif + call icopy(n2,istk(il2),1,istk(il1),1) + il1=il1+n2 + istk(il1)=rparen + il1=il1+1 + istk(il+5)=il1-il0+1 + lstk(top+1)=sadr(il1) + goto 9999 + 2020 continue +c un atome et une expression + idec=abs(is1) + ipar=0 + if(n1-idec.eq.1 .and.istk(il1+idec).eq.0) then + if(symb.eq.bslash) then + call error(27) + return + endif + goto 9999 + endif + if(symb.ne.slash.and. + & ((n1-idec.eq.1 .and. istk(il1+idec).eq.1).or. + & (n1-idec.eq.5.and.iseye(istk(il1+idec))))) then +c n1=n1-1 + n1=idec + if(is1.eq.-1) then + istk(il1+n1)=lparen + n1=n1+1 + ipar=1 + endif + goto 2021 + else + istk(il1+n1)=symb + istk(il1+n1+1)=lparen + n1=n1+2 + ipar=1 + endif + 2021 if(is2.eq.1) then + il2=il2+1 + n2=n2-1 + endif + call icopy(n2,istk(il2),1,istk(il1+n1),1) + n1=n1+n2 + if(ipar.eq.1) then + istk(il1+n1)=rparen + n1=n1+1 + endif + istk(il+5)=1+n1 + lstk(top+1)=sadr(il1+n1) + goto 9999 +c expr et atome + 2030 continue + idec=abs(is2) + if(n2-idec.eq.1.and.istk(il2+idec).eq.0) then + if(symb.eq.slash) then + call error(27) + return + endif + istk(il1)=0 + istk(il+5)=2 + lstk(top+1)=sadr(il1+1) + goto 9999 + endif + if(symb.ne.bslash.and.is2.ge.0 + & .and.((n2-idec.eq.1.and.istk(il2+idec).eq.1) + & .or.(n2-idec.eq.5.and.iseye(istk(il2+idec))))) then + istk(il+5)=n1+1 + lstk(top+1)=sadr(il1+n1) + goto 9999 + endif + idec=0 + if(is1.ne.1) idec=idec+1 + if(is2.lt.0) idec=idec+1 + call icopy(n1,istk(il1),-1,istk(il1+idec),-1) + il0=il1 + ill=il1 + if(is2.lt.0) then + istk(ill)=minus + ill=ill+1 + endif + istk(ill)=lparen + istk(il1+n1+idec)=rparen + il1=il1+n1+idec+1 + if(symb.ne.bslash.and.is2.eq.-1.and. + & ((n2.eq.2.and.istk(il2+1).eq.1).or. + & (n2.eq.6.and.iseye(istk(il2+1))))) goto 2031 + istk(il1)=symb + il1=il1+1 + if(is2.ne.0) then + il2=il2+1 + n2=n2-1 + endif + call icopy(n2,istk(il2),1,istk(il1),1) + il1=il1+n2 + 2031 istk(il+5)=il1-il0+1 + lstk(top+1)=sadr(il1) + goto 9999 +c atome et atome + 2040 continue + + idec1=abs(is1) + if(n1-idec1.eq.1.and.istk(il1+idec1).eq.0) then + if(symb.eq.bslash) then + call error(27) + return + endif + goto 9999 + endif + idec2=abs(is2) + if(n2-idec2.eq.1.and.istk(il2+idec2).eq.0) then + if(symb.eq.slash) then + call error(27) + return + endif + istk(il1)=0 + istk(il+5)=2 + lstk(top+1)=sadr(il1+1) + goto 9999 + endif + if(symb.eq.star) then + if(isnum(istk(il1+idec1),n1-idec1,inum1).and. + & isnum(istk(il2+idec2),n2-idec2,inum2)) then + if(is1.eq.-1) inum1=-inum1 + if(is2.eq.-1) inum2=-inum2 + inum=inum1*inum2 + call intstr(inum,istk(il1),ni,0) + il1=il1+ni + istk(il+5)=ni+1 + lstk(top+1)=sadr(il1) + goto 9999 + endif + endif + is=blanc + if(is1.eq.-1.and.is2.ge.0 .or. + + is2.eq.-1.and.is1.ge.0) is=minus + if(symb.ne.slash.and. + & ((n1-abs(is1).eq.1.and.istk(il1+abs(is1)).eq.1).or. + & (n1-abs(is1).eq.5.and.iseye(istk(il1+abs(is1))))) ) then + if(is.eq.minus) then + istk(il1)=is + il1=il1+1 + endif + call icopy(n2-abs(is2),istk(il2+abs(is2)),1,istk(il1),1) + il1=il1+n2-abs(is2) + istk(il+5)=il1-il0+1 + lstk(top+1)=sadr(il1+1) + goto 9999 + endif + idec1=0 + idec=0 + if(is1.eq.-1.and.is2.eq.-1) idec1=1 + if(is.eq.minus.and.is1.eq.0) then + idec=1 + call icopy(n1,istk(il1),-1,istk(il1+idec),-1) + n1=n1+1 + endif + if(idec1.ne.0) then + call icopy(n1-1,istk(il1+idec+1),1,istk(il1+idec),1) + n1=n1-1 + endif + il0=il1 + ill=il1 + if(is.eq.minus) then + istk(ill)=minus + ill=ill+1 + endif + il1=il1+n1 + if(symb.ne.bslash.and. + & ((n2-abs(is2).eq.1.and.istk(il2+abs(is2)).eq.1).or. + & (n2-abs(is2).eq.5.and.iseye(istk(il2+abs(is2)))))) goto 2041 + istk(il1)=symb + il1=il1+1 + if(is2.ne.0) then + il2=il2+1 + n2=n2-1 + endif + call icopy(n2,istk(il2),1,istk(il1),1) + il1=il1+n2 + 2041 istk(il+5)=il1-il0+1 + lstk(top+1)=sadr(il1) + goto 9999 +c + 9999 return + end diff --git a/modules/symbolic/sci_gateway/fortran/sci_f_rdivf.lo b/modules/symbolic/sci_gateway/fortran/sci_f_rdivf.lo new file mode 100755 index 000000000..bac1b7f15 --- /dev/null +++ b/modules/symbolic/sci_gateway/fortran/sci_f_rdivf.lo @@ -0,0 +1,12 @@ +# sci_gateway/fortran/sci_f_rdivf.lo - a libtool object file +# Generated by libtool (GNU libtool) 2.4.2 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# Name of the PIC object. +pic_object='.libs/sci_f_rdivf.o' + +# Name of the non-PIC object +non_pic_object=none + diff --git a/modules/symbolic/sci_gateway/symbolic_gateway.xml b/modules/symbolic/sci_gateway/symbolic_gateway.xml new file mode 100755 index 000000000..3edce782d --- /dev/null +++ b/modules/symbolic/sci_gateway/symbolic_gateway.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007 - INRIA Allan CORNET + * Copyright (C) 2007 - INRIA Sylvestre LEDRU + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + --> + +<!DOCTYPE GATEWAY SYSTEM "../../functions/xml/gateway.dtd"> +<GATEWAY name="symbolic"> + <!-- + Scilab + Interface description. In this file, we define the list of the function which + will be available into Scilab and the link to the "native" function. + + gatewayId is the position in the hashtable 'Interfaces' defined in the + file SCI/modules/core/src/c/callinterf.h + + primitiveId is the position in the hashtable '<module>Table Tab[]' defined + in the file modules/<module>/sci_gateway/c/gw_<module>.c + + primitiveName is the name of the Scilab function + + + Don't touch if you do not know what you are doing +--> + + <PRIMITIVE gatewayId="22" primitiveId="1" primitiveName="addf" /> + <PRIMITIVE gatewayId="22" primitiveId="2" primitiveName="subf" /> + <PRIMITIVE gatewayId="22" primitiveId="3" primitiveName="mulf" /> + <PRIMITIVE gatewayId="22" primitiveId="4" primitiveName="ldivf" /> + <PRIMITIVE gatewayId="22" primitiveId="5" primitiveName="rdivf" /> +</GATEWAY> |