diff options
author | imushir | 2016-01-18 14:10:56 +0530 |
---|---|---|
committer | imushir | 2016-01-18 14:10:56 +0530 |
commit | 2803a0bccff2ca4f4b5b81d3ef7f7cf3c75e0ec9 (patch) | |
tree | 80d03589495b3a109013e267c42c7d6235c2c9e8 /2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci | |
parent | bcb2bf1c014a1078f4306cd0111f4e596fe934ce (diff) | |
parent | 1e87b6e62cfe8e0889cd677b8406ab89809f53da (diff) | |
download | Scilab2C-2803a0bccff2ca4f4b5b81d3ef7f7cf3c75e0ec9.tar.gz Scilab2C-2803a0bccff2ca4f4b5b81d3ef7f7cf3c75e0ec9.tar.bz2 Scilab2C-2803a0bccff2ca4f4b5b81d3ef7f7cf3c75e0ec9.zip |
merged pulled
Diffstat (limited to '2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci')
-rw-r--r-- | 2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci | 36 |
1 files changed, 22 insertions, 14 deletions
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 |