* bug 7617 fixed - Editvar did not have any menu bar.
+* bug 7619 fixed - get_function_path did not return all available paths.
+
* bug 7622 fixed - When opening an Xcos diagram done on 5.2.2, an exception
could be thrown.
* bug 7644 fixed - The last user palette could not be removed from the palette
tree.
-* bug 7693 fixed - With a corrupted palettes.xml file, the error message is not
+* bug 7693 fixed - With a corrupted palettes.xml file, the error message is not
coherent with the recovering action.
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) INRIA
-// Copyright (C) DIGITEO - 2009 - Allan CORNET
+// Copyright (C) DIGITEO - 2009-2010 - Allan CORNET
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
function path = get_function_path(name)
- if type(name) <> 10 then
- error(999,msprintf(_("%s: Wrong type for input argument #%d: A string expected.\n"),'get_function_path',1));
+ path = [];
+
+ if type(name) <> 10 then
+ error(999,msprintf(_("%s: Wrong type for input argument #%d: A string expected.\n"),"get_function_path",1));
end
- if size(name,'*') <> 1 then
- error(999,msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),'get_function_path',1));
+ if size(name,"*") <> 1 then
+ error(999,msprintf(_("%s: Wrong size for input argument #%d: A string expected.\n"),"get_function_path",1));
end
libname = whereis(name);
- if libname == [] then
- warning(" """+ name +'"" is not a library function');
- path = [];
- else
- execstr('t=string(' + libname + ')');
- path = t(1) + name + '.sci';
-
- if strindex(path,['SCI/','SCI\']) == 1 then
- path = SCI + part(path,4:length(path));
- end
- if fileinfo(path) == [] then
- warning(msprintf(gettext("%s: There is no file named %s.sci in the library directory %s.\n"),"get_function_path",name,t(1)));
- path = [];
- else
- path = pathconvert(path, %f);
+ if libname <> [] then
+ for i = 1:size(libname,"*")
+ [funcnames, pathlib] = libraryinfo(libname(i));
+ path = [path ; pathlib + name + ".sci"];
end
-
+ path = pathconvert(path,%F);
end
-endfunction
+endfunction
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- JVM NOT MANDATORY -->
+//
+// <-- Non-regression test for bug 7619 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7619
+//
+// <-- Short Description -->
+// get_function_path did not return all available paths.
+//
+cd TMPDIR;
+mkdir("bug_7619");
+cd("bug_7619");
+mputl("function r = factorial(), endfunction", TMPDIR + "/bug_7619/factorial.sci");
+genlib("bug_7916lib", TMPDIR + "/bug_7619", %f ,%f);
+bug_7916lib = lib(TMPDIR + "/bug_7619");
+p = get_function_path("factorial");
+if size(p, "*") <> 2 then bugmes();quit;end;
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010 - DIGITEO - Allan CORNET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- JVM NOT MANDATORY -->
+//
+// <-- Non-regression test for bug 7619 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7619
+//
+// <-- Short Description -->
+// get_function_path did not return all available paths.
+//
+
+cd TMPDIR;
+mkdir("bug_7619");
+cd("bug_7619");
+mputl("function r = factorial(), endfunction", TMPDIR + "/bug_7619/factorial.sci");
+genlib("bug_7916lib", TMPDIR + "/bug_7619", %f ,%f);
+bug_7916lib = lib(TMPDIR + "/bug_7619");
+p = get_function_path("factorial");
+if size(p, "*") <> 2 then pause, end;