scilab: test: example contract, source renamed
This commit is contained in:
parent
648315ef16
commit
bf2a71ec7d
2 changed files with 1 additions and 24 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
TOP = ../..
|
TOP = ../..
|
||||||
SWIG = $(TOP)/../preinst-swig
|
SWIG = $(TOP)/../preinst-swig
|
||||||
SRCS = example.c
|
SRCS = example1.c
|
||||||
TARGET = example_wrap.c
|
TARGET = example_wrap.c
|
||||||
INTERFACE = example.i
|
INTERFACE = example.i
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
/* File : example.c */
|
|
||||||
|
|
||||||
/* A global variable */
|
|
||||||
double Foo = 3.0;
|
|
||||||
|
|
||||||
/* Compute the greatest common divisor of positive integers */
|
|
||||||
int gcd(int x, int y) {
|
|
||||||
int g;
|
|
||||||
g = y;
|
|
||||||
while (x > 0) {
|
|
||||||
g = x;
|
|
||||||
x = y % x;
|
|
||||||
y = g;
|
|
||||||
}
|
|
||||||
return g;
|
|
||||||
}
|
|
||||||
|
|
||||||
int fact(int n) {
|
|
||||||
if (n <= 0) return 1;
|
|
||||||
return n*fact(n-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue