1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) 2009 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
4 // This file must be used under the terms of the CeCILL.
5 // This source file is licensed as described in the file COPYING, which
6 // you should have received as part of this distribution. The terms
7 // are also available at
8 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10 // Return the mlist associated with the wanted toolbox
12 function details = atomsToolboxDetails(name,version)
16 // Check number of input arguments
17 // =========================================================================
19 if rhs < 1 | rhs > 3 then
20 error(msprintf(gettext("%s: Wrong number of input argument: %d to %d expected.\n"),"atomsToolboxDetails",2,3));
23 // Check input parameters type
24 // =========================================================================
26 if type(name) <> 10 then
27 error(msprintf(gettext("%s: Wrong type for input argument #%d: A single string expected.\n"),"atomsToolboxDetails",1));
30 if type(version)<>10 then
31 error(msprintf(gettext("%s: Wrong type for input argument #%d: A single string expected.\n"),"atomsToolboxDetails",2));
34 // Check input parameters dimensions
35 // =========================================================================
37 if size(name,"*") <> 1 then
38 error(msprintf(gettext("%s: Wrong size for input argument #%d: A single string expected.\n"),"atomsToolboxDetails",1));
41 if size(version,"*")<>1 then
42 error(msprintf(gettext("%s: Wrong size for input argument #%d: A single string expected.\n"),"atomsToolboxDetails",2));
45 // Get the list of installed packages
46 // =========================================================================
47 packages = atomsGetTOOLBOXES();
49 if ~ isfield(packages,name) then
50 error(msprintf(gettext("%s: the package %s doesn''t exist.\n"),"atomsToolboxDetails",name));
53 package_versions = packages(name);
54 details = package_versions(version);