1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) DIGITEO - 2009-2010 - Allan CORNET
4 // Copyright (C) 2013 - Scilab Enterprises - Adeline CARNIS
6 // Copyright (C) 2012 - 2016 - Scilab Enterprises
8 // This file is hereby licensed under the terms of the GNU GPL v2.0,
9 // pursuant to article 5.3.4 of the CeCILL v.2.1.
10 // This file was originally licensed under the terms of the CeCILL v2.1,
11 // and continues to be available under such terms.
12 // For more information, see the COPYING file which you should have received
13 // along with this program.
15 function path = get_function_path(name)
21 error(msprintf(gettext("%s: Wrong number of input argument: %d expected.\n"), "get_function_path", 1));
24 if type(name) <> 10 then
25 error(msprintf(_("%s: Wrong type for input argument #%d: string expected.\n"),"get_function_path",1));
28 if size(name,"*") <> 1 then
29 error(msprintf(_("%s: Wrong size for input argument #%d: string expected.\n"),"get_function_path",1));
32 libname = whereis(name);
34 if libname <> [] & libname <> "script" & type(evstr(name))==13 then
35 for i = 1:size(libname,"*")
36 [funcnames, pathlib] = libraryinfo(libname(i));
37 path = [path ; fullfile(pathlib, name + ".sci")];
39 path = pathconvert(path,%F);