summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/elementaryFunctions
diff options
context:
space:
mode:
authorJorawar Singh2017-07-04 15:14:46 +0530
committerJorawar Singh2017-07-04 15:14:46 +0530
commit8889f4a5edad040f47c3fcb717053352ab0d05b8 (patch)
tree749b476d7653774c918af42ebd952d4050ed49b6 /2.3-1/src/c/elementaryFunctions
parentc66867c874436fb37ef54c67b048885ce094e894 (diff)
downloadScilab2C-8889f4a5edad040f47c3fcb717053352ab0d05b8.tar.gz
Scilab2C-8889f4a5edad040f47c3fcb717053352ab0d05b8.tar.bz2
Scilab2C-8889f4a5edad040f47c3fcb717053352ab0d05b8.zip
Fixed standalone conversion errors with RPi files
Diffstat (limited to '2.3-1/src/c/elementaryFunctions')
-rw-r--r--2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c8
-rw-r--r--2.3-1/src/c/elementaryFunctions/discrete_mathematics/lcm/u8lcma.c3
2 files changed, 7 insertions, 4 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c
index 3d586232..121d26ae 100644
--- a/2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c
+++ b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c
@@ -31,7 +31,8 @@ uint8 u8gcdua(uint8* in,int size)
int x=*in;
int y=*(in+1);
int max=(x>y)?x:y;
- for(int i=max;i>=1;i--)
+ int i;
+ for(i=max;i>=1;i--)
{
if(x%i==0 && y%i==0)
{
@@ -39,12 +40,13 @@ uint8 u8gcdua(uint8* in,int size)
break;
}
}
- for(int j=2;j<size;j++)
+ int j;
+ for(j=2;j<size;j++)
{
x=temp;
y=*(in+j);
max=(x>y)?x:y;
- for(int i=max;i>=1;i--)
+ for(i=max;i>=1;i--)
{
if(x%i==0 && y%i==0)
{
diff --git a/2.3-1/src/c/elementaryFunctions/discrete_mathematics/lcm/u8lcma.c b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/lcm/u8lcma.c
index 56856e43..b01c8047 100644
--- a/2.3-1/src/c/elementaryFunctions/discrete_mathematics/lcm/u8lcma.c
+++ b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/lcm/u8lcma.c
@@ -44,7 +44,8 @@ uint8 u8lcma(uint8* in,int size)
else
i+=max;
}
- for(int j=2;j<size;j++)
+ int j;
+ for(j=2;j<size;j++)
{
x1=lcm_temp;
x2=*(in+j);