summaryrefslogtreecommitdiff
path: root/2.3-1/macros/CCodeGeneration
diff options
context:
space:
mode:
authorsiddhu89902016-01-13 11:15:17 +0530
committersiddhu89902016-01-13 11:15:17 +0530
commit6294db4b43ec07171c2c3a868069b5023d8835a0 (patch)
tree2a0daabb81e9b043e9510dceda3d227ee9d170c2 /2.3-1/macros/CCodeGeneration
parent9bee3723b675d7ab65b757d38cf9c5938a63531a (diff)
downloadScilab2C-6294db4b43ec07171c2c3a868069b5023d8835a0.tar.gz
Scilab2C-6294db4b43ec07171c2c3a868069b5023d8835a0.tar.bz2
Scilab2C-6294db4b43ec07171c2c3a868069b5023d8835a0.zip
Test commit
Diffstat (limited to '2.3-1/macros/CCodeGeneration')
-rw-r--r--2.3-1/macros/CCodeGeneration/C_GenerateFunName.binbin5444 -> 6288 bytes
-rw-r--r--2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci36
2 files changed, 22 insertions, 14 deletions
diff --git a/2.3-1/macros/CCodeGeneration/C_GenerateFunName.bin b/2.3-1/macros/CCodeGeneration/C_GenerateFunName.bin
index 6551c7f7..4f3c5917 100644
--- a/2.3-1/macros/CCodeGeneration/C_GenerateFunName.bin
+++ b/2.3-1/macros/CCodeGeneration/C_GenerateFunName.bin
Binary files differ
diff --git a/2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci b/2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci
index 9d40d2b9..657258a9 100644
--- a/2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci
+++ b/2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci
@@ -23,22 +23,30 @@ function CFunName = C_GenerateFunName(FunctionName,InArg,NInArg,OutArg,NOutArg)
// ------------------------------
SCI2CNInArgCheck(argn(2),5,5);
CFunName = '';
+if(IsAVRSupportFunction(FunctionName))
+//If current function is an AVR function, then function name can be just plain
+//function name without any input/output arguments types
-for tmpcnt = 1:NInArg
- if (InArg(tmpcnt).Dimension == 1)
- CFunName = CFunName+InArg(tmpcnt).Type+'2';
- else
- CFunName = CFunName+InArg(tmpcnt).Type+SCI2Cstring(InArg(tmpcnt).Dimension);
- end
-end
+ CFunName = CFunName+FunctionName;
+
+else
+
+ for tmpcnt = 1:NInArg
+ if (InArg(tmpcnt).Dimension == 1)
+ CFunName = CFunName+InArg(tmpcnt).Type+'2';
+ else
+ CFunName = CFunName+InArg(tmpcnt).Type+SCI2Cstring(InArg(tmpcnt).Dimension);
+ end
+ end
-CFunName = CFunName+FunctionName;
+ CFunName = CFunName+FunctionName;
-for tmpcnt = 1:NOutArg
- if (OutArg(tmpcnt).Dimension == 1)
- CFunName = CFunName+OutArg(tmpcnt).Type+'2';
- else
- CFunName = CFunName+OutArg(tmpcnt).Type+SCI2Cstring(OutArg(tmpcnt).Dimension);
- end
+ for tmpcnt = 1:NOutArg
+ if (OutArg(tmpcnt).Dimension == 1)
+ CFunName = CFunName+OutArg(tmpcnt).Type+'2';
+ else
+ CFunName = CFunName+OutArg(tmpcnt).Type+SCI2Cstring(OutArg(tmpcnt).Dimension);
+ end
+ end
end
endfunction