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.
14 // === LICENSE_END ===
16 function path = get_function_path(name)
22 error(msprintf(gettext("%s: Wrong number of input argument: %d expected.\n"), "get_function_path", 1));
25 if type(name) <> 10 then
26 error(999,msprintf(_("%s: Wrong type for input argument #%d: string expected.\n"),"get_function_path",1));
29 if size(name,"*") <> 1 then
30 error(999,msprintf(_("%s: Wrong size for input argument #%d: string expected.\n"),"get_function_path",1));
33 libname = whereis(name);
36 for i = 1:size(libname,"*")
37 [funcnames, pathlib] = libraryinfo(libname(i));
38 path = [path ; fullfile(pathlib, name + ".sci")];
40 path = pathconvert(path,%F);