write_addinter_line - return addinter line for builder script of the toolbox
txt = write_addinter_line(u,libname,path,intname,scifunc)
- u : integer. a file descriptor
- libname : string. the name of the library
- path : string. the path of the library
- intname : string. the name of the interfacing routine
- scifunc : vector of strings. the names of the scilab functions
- txt : vector of strings. the text of the addinter line
//write_addinter_line
//Entrée : u : file descriptor
// libname : nom de la libraire (sans extension)
// path : chemin de la libraire dans MODNUM ex /routines/mod_num_lib/
// intname : nom de la routine d'interface
// scifunc : liste des noms de fonctions scilab
function txt=write_addinter_line(u,libname,path,intname,scifunc)
if MSDOS then
mylibname=libname+'.dll';
else
mylibname=libname+'.so';
end
tt_loader=['//Link of interfaced modnum functions';]
myvar_tt="modnum_sci_func=[";
for i=1:size(scifunc,'*')
myvar_tt=myvar_tt+""""+scifunc(i)+""";";
end
myvar_tt=myvar_tt+"];";
tt_loader=[tt_loader;myvar_tt;
'addinter(MODNUM+"""+path+"/"+mylibname+""","""+intname+""",modnum_sci_func);';'';];
//execstr(tt_loader(2:3));
txt=tt_loader(2:3);
fprintf(u,"%s\n",tt_loader);
endfunction
IRCOM Group
Alan Layec