diff options
author | Sunil Shetye | 2019-05-16 12:18:48 +0530 |
---|---|---|
committer | Sunil Shetye | 2019-05-29 11:08:01 +0530 |
commit | 26b77d7593b5ee0792b6b556f5569ea4227c2b02 (patch) | |
tree | 8f92052234b01bf39b9c3a6e3cb12b3962d96b1b /macros/FunctionList/FL_UpdateToBeConv.sci | |
parent | 5a73e6bec4a12db7afae9de300e39256f754d8d3 (diff) | |
download | scilab2c-26b77d7593b5ee0792b6b556f5569ea4227c2b02.tar.gz scilab2c-26b77d7593b5ee0792b6b556f5569ea4227c2b02.tar.bz2 scilab2c-26b77d7593b5ee0792b6b556f5569ea4227c2b02.zip |
convert to unix format
Diffstat (limited to 'macros/FunctionList/FL_UpdateToBeConv.sci')
-rw-r--r-- | macros/FunctionList/FL_UpdateToBeConv.sci | 228 |
1 files changed, 114 insertions, 114 deletions
diff --git a/macros/FunctionList/FL_UpdateToBeConv.sci b/macros/FunctionList/FL_UpdateToBeConv.sci index 1ee2e15d..169f1a36 100644 --- a/macros/FunctionList/FL_UpdateToBeConv.sci +++ b/macros/FunctionList/FL_UpdateToBeConv.sci @@ -1,114 +1,114 @@ -function SharedInfo = FL_UpdateToBeConv(ASTFunName,CFunName,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,InArg,NInArg,OutArg,NOutArg,FileInfo,SharedInfo)
-// function SharedInfo = FL_UpdateToBeConv(ASTFunName,CFunName,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,InArg,NInArg,OutArg,NOutArg,FileInfo,SharedInfo)
-// -----------------------------------------------------------------
-// //NUT: add description here
-//
-// Input data:
-// //NUT: add description here
-//
-// Output data:
-// //NUT: add description here
-//
-// Status:
-// 27-Oct-2007 -- Raffaele Nutricato: Author.
-//
-// Copyright 2007 Raffaele Nutricato.
-// Contact: raffaele.nutricato@tiscali.it
-// -----------------------------------------------------------------
-
-// ------------------------------
-// --- Check input arguments. ---
-// ------------------------------
-SCI2CNInArgCheck(argn(2),11,11);
-
-// -----------------------
-// --- Initialization. ---
-// -----------------------
-nxtscifunname = SharedInfo.NextSCIFunName;
-nxtscifunnumber = SharedInfo.NextSCIFunNumber;
-
-ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
-SCI2CAvailableCDat = FileInfo.FunctionList.SCI2CAvailableCDat;
-USER2CAvailableCDat = FileInfo.FunctionList.USER2CAvailableCDat;
-ConvertedDat = FileInfo.FunctionList.ConvertedDat;
-ToBeConvertedDat = FileInfo.FunctionList.ToBeConvertedDat;
-FunInfoDatDir = FileInfo.FunctionList.FunInfoDatDir;
-
-// #RNU_RES_B
-PrintStringInfo(' ',ReportFileName,'file','y');
-PrintStringInfo('***Updating C Function List***',ReportFileName,'file','y');
-PrintStringInfo(' C Function Name: '+CFunName,ReportFileName,'file','y');
-// #RNU_RES_E
-// ---------------------------
-// --- End Initialization. ---
-// ---------------------------
-
-// #RNU_RES_B
-// --------------------------------------------------
-// --- Manage anticipated exit from the function. ---
-// --------------------------------------------------
-//NUT: questo codice e' identico quasi a quello della CFunCall, si pu0 pensare di
-//NUT: di fare un'unica funzione.
-// #RNU_RES_E
-
-if (SharedInfo.SkipNextFun > 0)
- // #RNU_RES_B
- PrintStringInfo(' Current function will not be inserted in the Function List.',ReportFileName,'file','y');
- // #RNU_RES_E
- return;
-end
-
-// #RNU_RES_B
-// Exit if the function is a precision specifier and the corresponding flag is 1.
-// #RNU_RES_E
-if ((sum(mtlb_strcmp(ASTFunName,SharedInfo.Annotations.DataPrec)) > 0) & ...
- (SharedInfo.SkipNextPrec == 1))
- // #RNU_RES_B
- PrintStringInfo(' Current function will not be inserted in the Function List.',ReportFileName,'file','y');
- // #RNU_RES_E
- return;
-end
-
-// #RNU_RES_B
-// Exit if the function is OpEqual and the corresponding skip flag is enabled.
-// #RNU_RES_E
-if ((mtlb_strcmp(ASTFunName,'OpEqual')) & ...
- (SharedInfo.SkipNextEqual == 1))
- // #RNU_RES_B
- PrintStringInfo(' Current function will not be inserted in the Function List.',ReportFileName,'file','y');
- // #RNU_RES_E
- return;
-end
-
-// #RNU_RES_B
-// ---------------------------------------
-// --- If the function is not skipped. ---
-// ---------------------------------------
-// --- Check existence of the C function. ---
-// #RNU_RES_E
-flagexist = FL_ExistCFunction(CFunName,USER2CAvailableCDat,SCI2CAvailableCDat,ConvertedDat,ToBeConvertedDat,ReportFileName);
-
-// #RNU_RES_B
-// --- Update C function list and dat files. ---
-// #RNU_RES_E
-if (flagexist == %F)
-
- // #RNU_RES_B
- // --- Add C function to the "ToBeConverted" function list. ---
- // #RNU_RES_E
- load(ToBeConvertedDat,'ToBeConverted');
-
- NToConvP1 = size(ToBeConverted,1)+1;
- ToBeConverted(NToConvP1).SCIFunctionName = ASTFunName;
- ToBeConverted(NToConvP1).CFunctionName = CFunName;
-
- save(ToBeConvertedDat, "ToBeConverted");
- SharedInfo.NFilesToTranslate = SharedInfo.NFilesToTranslate + 1;
-
- // #RNU_RES_B
- // --- Generate C Function dat file. ---
- PrintStringInfo(' Add C Function ""'+CFunName+'"" to: '+ToBeConvertedDat,ReportFileName,'file','y');
- // #RNU_RES_E
-end
-
-endfunction
+function SharedInfo = FL_UpdateToBeConv(ASTFunName,CFunName,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,InArg,NInArg,OutArg,NOutArg,FileInfo,SharedInfo) +// function SharedInfo = FL_UpdateToBeConv(ASTFunName,CFunName,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,InArg,NInArg,OutArg,NOutArg,FileInfo,SharedInfo) +// ----------------------------------------------------------------- +// //NUT: add description here +// +// Input data: +// //NUT: add description here +// +// Output data: +// //NUT: add description here +// +// Status: +// 27-Oct-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ +SCI2CNInArgCheck(argn(2),11,11); + +// ----------------------- +// --- Initialization. --- +// ----------------------- +nxtscifunname = SharedInfo.NextSCIFunName; +nxtscifunnumber = SharedInfo.NextSCIFunNumber; + +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; +SCI2CAvailableCDat = FileInfo.FunctionList.SCI2CAvailableCDat; +USER2CAvailableCDat = FileInfo.FunctionList.USER2CAvailableCDat; +ConvertedDat = FileInfo.FunctionList.ConvertedDat; +ToBeConvertedDat = FileInfo.FunctionList.ToBeConvertedDat; +FunInfoDatDir = FileInfo.FunctionList.FunInfoDatDir; + +// #RNU_RES_B +PrintStringInfo(' ',ReportFileName,'file','y'); +PrintStringInfo('***Updating C Function List***',ReportFileName,'file','y'); +PrintStringInfo(' C Function Name: '+CFunName,ReportFileName,'file','y'); +// #RNU_RES_E +// --------------------------- +// --- End Initialization. --- +// --------------------------- + +// #RNU_RES_B +// -------------------------------------------------- +// --- Manage anticipated exit from the function. --- +// -------------------------------------------------- +//NUT: questo codice e' identico quasi a quello della CFunCall, si pu0 pensare di +//NUT: di fare un'unica funzione. +// #RNU_RES_E + +if (SharedInfo.SkipNextFun > 0) + // #RNU_RES_B + PrintStringInfo(' Current function will not be inserted in the Function List.',ReportFileName,'file','y'); + // #RNU_RES_E + return; +end + +// #RNU_RES_B +// Exit if the function is a precision specifier and the corresponding flag is 1. +// #RNU_RES_E +if ((sum(mtlb_strcmp(ASTFunName,SharedInfo.Annotations.DataPrec)) > 0) & ... + (SharedInfo.SkipNextPrec == 1)) + // #RNU_RES_B + PrintStringInfo(' Current function will not be inserted in the Function List.',ReportFileName,'file','y'); + // #RNU_RES_E + return; +end + +// #RNU_RES_B +// Exit if the function is OpEqual and the corresponding skip flag is enabled. +// #RNU_RES_E +if ((mtlb_strcmp(ASTFunName,'OpEqual')) & ... + (SharedInfo.SkipNextEqual == 1)) + // #RNU_RES_B + PrintStringInfo(' Current function will not be inserted in the Function List.',ReportFileName,'file','y'); + // #RNU_RES_E + return; +end + +// #RNU_RES_B +// --------------------------------------- +// --- If the function is not skipped. --- +// --------------------------------------- +// --- Check existence of the C function. --- +// #RNU_RES_E +flagexist = FL_ExistCFunction(CFunName,USER2CAvailableCDat,SCI2CAvailableCDat,ConvertedDat,ToBeConvertedDat,ReportFileName); + +// #RNU_RES_B +// --- Update C function list and dat files. --- +// #RNU_RES_E +if (flagexist == %F) + + // #RNU_RES_B + // --- Add C function to the "ToBeConverted" function list. --- + // #RNU_RES_E + load(ToBeConvertedDat,'ToBeConverted'); + + NToConvP1 = size(ToBeConverted,1)+1; + ToBeConverted(NToConvP1).SCIFunctionName = ASTFunName; + ToBeConverted(NToConvP1).CFunctionName = CFunName; + + save(ToBeConvertedDat, "ToBeConverted"); + SharedInfo.NFilesToTranslate = SharedInfo.NFilesToTranslate + 1; + + // #RNU_RES_B + // --- Generate C Function dat file. --- + PrintStringInfo(' Add C Function ""'+CFunName+'"" to: '+ToBeConvertedDat,ReportFileName,'file','y'); + // #RNU_RES_E +end + +endfunction |