summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrupak192020-04-10 14:39:58 +0530
committerrupak192020-04-10 14:39:58 +0530
commitd81f45d6e4783c4915382390f480442995710546 (patch)
tree83a3415e8b43761cd1cabf3402430e50a413ae5d
parentf00676384365fdea0b739ed3107552aa79e49c4b (diff)
downloadScilab6-Test-Toolbox-d81f45d6e4783c4915382390f480442995710546.tar.gz
Scilab6-Test-Toolbox-d81f45d6e4783c4915382390f480442995710546.tar.bz2
Scilab6-Test-Toolbox-d81f45d6e4783c4915382390f480442995710546.zip
corrected function namesHEADmaster
-rw-r--r--jar/scilab_en_US_help.jarbin15496 -> 15496 bytes
-rw-r--r--macros/add.binbin1983 -> 1983 bytes
-rw-r--r--macros/multiply.binbin1785 -> 1785 bytes
-rwxr-xr-xsci_gateway/cpp/builder_gateway_cpp.sce2
-rwxr-xr-xsci_gateway/cpp/libtest_toolbox.sobin16712 -> 16712 bytes
-rwxr-xr-xsci_gateway/cpp/sci_multiply.cpp4
-rwxr-xr-xsrc/Makefile8
-rwxr-xr-xsrc/add.h1
-rwxr-xr-xsrc/libmul.so (renamed from thirdparty/linux/lib/x64/libadd.so)bin15640 -> 15640 bytes
-rwxr-xr-xsrc/main.c4
-rwxr-xr-xsrc/mul.c (renamed from src/add.c)4
-rwxr-xr-xsrc/mul.h1
-rw-r--r--src/mul.o (renamed from src/add.o)bin1400 -> 1400 bytes
-rwxr-xr-xsrc/run.sh8
-rwxr-xr-xsrc/testmul (renamed from src/testadd)bin19344 -> 19344 bytes
-rwxr-xr-xthirdparty/linux/include/add.h1
-rwxr-xr-xthirdparty/linux/include/mul.h1
-rwxr-xr-xthirdparty/linux/lib/x64/libmul.so (renamed from src/libadd.so)bin15640 -> 15640 bytes
18 files changed, 17 insertions, 17 deletions
diff --git a/jar/scilab_en_US_help.jar b/jar/scilab_en_US_help.jar
index 3c9feee..4ab4a7d 100644
--- a/jar/scilab_en_US_help.jar
+++ b/jar/scilab_en_US_help.jar
Binary files differ
diff --git a/macros/add.bin b/macros/add.bin
index 23b5bbb..60b6406 100644
--- a/macros/add.bin
+++ b/macros/add.bin
Binary files differ
diff --git a/macros/multiply.bin b/macros/multiply.bin
index 20905f1..1f2876a 100644
--- a/macros/multiply.bin
+++ b/macros/multiply.bin
Binary files differ
diff --git a/sci_gateway/cpp/builder_gateway_cpp.sce b/sci_gateway/cpp/builder_gateway_cpp.sce
index 32d8db9..44c8410 100755
--- a/sci_gateway/cpp/builder_gateway_cpp.sce
+++ b/sci_gateway/cpp/builder_gateway_cpp.sce
@@ -56,7 +56,7 @@ else//LINUX
C_Flags = ["-I"+inc_base_dir];
- Linker_Flag = ["-L" + lib_base_dir + " -ladd -Wl,-rpath="+lib_base_dir]
+ Linker_Flag = ["-L" + lib_base_dir + " -lmul -Wl,-rpath="+lib_base_dir]
end
diff --git a/sci_gateway/cpp/libtest_toolbox.so b/sci_gateway/cpp/libtest_toolbox.so
index 582de0f..d92bb2b 100755
--- a/sci_gateway/cpp/libtest_toolbox.so
+++ b/sci_gateway/cpp/libtest_toolbox.so
Binary files differ
diff --git a/sci_gateway/cpp/sci_multiply.cpp b/sci_gateway/cpp/sci_multiply.cpp
index 4aece25..5447dc7 100755
--- a/sci_gateway/cpp/sci_multiply.cpp
+++ b/sci_gateway/cpp/sci_multiply.cpp
@@ -14,7 +14,7 @@ extern "C"
#include<api_scilab.h>
#include <stdio.h>
#include "localization.h"
-#include "add.h"
+#include "mul.h"
@@ -43,7 +43,7 @@ if (nout != 1)
scilab_getDoubleArray(env, in[0], &in1);
scilab_getDoubleArray(env, in[1], &in2);
- add(ar, in1[0],in2[0]);
+ mul(ar, in1[0],in2[0]);
out[0] = scilab_createDoubleMatrix2d(env, 1, 1, 0);
scilab_getDoubleArray(env, out[0], &out1);
diff --git a/src/Makefile b/src/Makefile
index d4719ac..430a48d 100755
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,4 +1,4 @@
-LIBNAME = add
+LIBNAME = mul
all: lib$(LIBNAME).so test$(LIBNAME)
@@ -8,12 +8,12 @@ $(LIBNAME).o: $(LIBNAME).h $(LIBNAME).c
lib$(LIBNAME).so: $(LIBNAME).o
gcc -shared -o lib$(LIBNAME).so $(LIBNAME).o
-test$(LIBNAME): lib$(LIBNAME).so main.c add.h
+test$(LIBNAME): lib$(LIBNAME).so main.c mul.h
gcc -Wall -L$(PWD) -Wl,-rpath=$(PWD) -o $@ main.c -l$(LIBNAME) -g
install:
- cp add.h ../thirdparty/linux/include/
- cp libadd.so ../thirdparty/linux/lib/x64/
+ cp mul.h ../thirdparty/linux/include/
+ cp libmul.so ../thirdparty/linux/lib/x64/
.PHONY: clean
clean:
diff --git a/src/add.h b/src/add.h
deleted file mode 100755
index db62457..0000000
--- a/src/add.h
+++ /dev/null
@@ -1 +0,0 @@
-int add(double* answ, double num1, double num2);
diff --git a/thirdparty/linux/lib/x64/libadd.so b/src/libmul.so
index 003d417..ccaf3ba 100755
--- a/thirdparty/linux/lib/x64/libadd.so
+++ b/src/libmul.so
Binary files differ
diff --git a/src/main.c b/src/main.c
index 6c95040..da08200 100755
--- a/src/main.c
+++ b/src/main.c
@@ -1,9 +1,9 @@
#include<stdio.h>
-#include "add.h"
+#include "mul.h"
int main(void)
{
double ar[1];
- add(ar, 2,5);
+ mul(ar, 2,5);
printf("Inside main %f \n", ar[0]);
return 0;
}
diff --git a/src/add.c b/src/mul.c
index 0fddbac..237da4b 100755
--- a/src/add.c
+++ b/src/mul.c
@@ -1,8 +1,8 @@
/*This c program multiplies two variable values*/
#include<stdio.h>
#include <stdlib.h>
-#include "add.h"
-int add(double* answ, double num1, double num2)
+#include "mul.h"
+int mul(double* answ, double num1, double num2)
{
answ[0] = num1*num2;
//printf("Inside add %f \n", answ[0]);
diff --git a/src/mul.h b/src/mul.h
new file mode 100755
index 0000000..8c29db3
--- /dev/null
+++ b/src/mul.h
@@ -0,0 +1 @@
+int mul(double* answ, double num1, double num2);
diff --git a/src/add.o b/src/mul.o
index 8ddb9e5..e08a1cb 100644
--- a/src/add.o
+++ b/src/mul.o
Binary files differ
diff --git a/src/run.sh b/src/run.sh
index 729b991..1ac4b33 100755
--- a/src/run.sh
+++ b/src/run.sh
@@ -1,8 +1,8 @@
rm *.o *.so *.lib test
-gcc -fPIC -c add.c
-gcc -shared -o libadd.so add.o
+gcc -fPIC -c mul.c
+gcc -shared -o libadd.so mul.o
gcc -L$(pwd) -Wl,-rpath=$(pwd) -o test main.c -ladd -g
-cp add.h ../thirdparty/linux/include/
-cp libadd.so ../thirdparty/linux/lib/x64/
+cp mul.h ../thirdparty/linux/include/
+cp libmul.so ../thirdparty/linux/lib/x64/
diff --git a/src/testadd b/src/testmul
index 8990420..af34920 100755
--- a/src/testadd
+++ b/src/testmul
Binary files differ
diff --git a/thirdparty/linux/include/add.h b/thirdparty/linux/include/add.h
deleted file mode 100755
index db62457..0000000
--- a/thirdparty/linux/include/add.h
+++ /dev/null
@@ -1 +0,0 @@
-int add(double* answ, double num1, double num2);
diff --git a/thirdparty/linux/include/mul.h b/thirdparty/linux/include/mul.h
new file mode 100755
index 0000000..8c29db3
--- /dev/null
+++ b/thirdparty/linux/include/mul.h
@@ -0,0 +1 @@
+int mul(double* answ, double num1, double num2);
diff --git a/src/libadd.so b/thirdparty/linux/lib/x64/libmul.so
index 003d417..ccaf3ba 100755
--- a/src/libadd.so
+++ b/thirdparty/linux/lib/x64/libmul.so
Binary files differ