1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
function [CFuncList,NElements] = FL_ExtractFuncList(FunctionDir,ClassDir,SCI2CClassSpecifier,ExtFLCls,ReportFileName)
// function [CFuncList,NElements] = FL_ExtractFuncList(FunctionDir,ClassDir,SCI2CClassSpecifier,ExtFLCls,ReportFileName)
// -----------------------------------------------------------------
// #RNU_RES_B
// Extracts the list of the C functions available. To do that
// this function enters in the directories where the .clst and
// .lst files are stored.
// #RNU_RES_E
//
// Input data:
// //NUT: add description here
//
// Output data:
// //NUT: add description here
//
// Status:
// 05-Jan-2008 -- Nutricato Raffaele: Author.
//
// Copyright 2008 Raffaele Nutricato.
// Contact: raffaele.nutricato@tiscali.it
// -----------------------------------------------------------------
// ------------------------------
// --- Check input arguments. ---
// ------------------------------
SCI2CNInArgCheck(argn(2),5,5);
// #RNU_RES_B
// ---------------------------------------------------------
// --- Extract the list of files in Functions directory. ---
// ---------------------------------------------------------
// #RNU_RES_E
tmppwd = pwd();
cd(FunctionDir);
// funfiles = ls();
funfiles = listfiles();
cd(tmppwd);
NFunFiles = size(funfiles,1);
// #RNU_RES_B
// -----------------------------------------------------------
// --- Extract the C function list from Classes directory. ---
// -----------------------------------------------------------
// #RNU_RES_E
CFuncList = '';
NElements = 0;
for cntfun = 1:NFunFiles
FunFileName = fullfile(FunctionDir,funfiles(cntfun));
ClassName = FL_GetFunctionClass(FunFileName,SCI2CClassSpecifier,ReportFileName);
ClassFileName = fullfile(ClassDir,ClassName);
[tmpfunlist,tmpnelem] = File2StringArray(ClassFileName+ExtFLCls);
[tmppath,tmpfunname,tmpext] = fileparts(FunFileName);
tmpfunlist = FL_InOutArgs2CFunNames(tmpfunname,tmpfunlist,tmpnelem);
for cnttmpfun = 1:tmpnelem
NElements = NElements + 1;
CFuncList(NElements) = tmpfunlist(cnttmpfun);
end
end
endfunction
|