summaryrefslogtreecommitdiffstats
path: root/scilab/modules
diff options
context:
space:
mode:
authorPierre MARECHAL <pierre.marechal@scilab.org>2009-07-10 15:13:06 +0200
committerPierre MARECHAL <pierre.marechal@scilab.org>2009-07-10 15:13:06 +0200
commit39e73b6a8e7e63e2e57e6626a0baeb12c9418d11 (patch)
tree13454896918dbd6f6c66aba6def11bf7ac7ed851 /scilab/modules
parenta9911a2cea4a7859105da38d8ce2dc464f6d16cc (diff)
downloadscilab-39e73b6a8e7e63e2e57e6626a0baeb12c9418d11.zip
scilab-39e73b6a8e7e63e2e57e6626a0baeb12c9418d11.tar.gz
+ Some problems fixed
+ genlib updated
Diffstat (limited to 'scilab/modules')
-rw-r--r--scilab/modules/atoms/etc/atoms.start3
-rw-r--r--scilab/modules/atoms/macros/atomsLoad.sci2
-rw-r--r--scilab/modules/functions/macros/genlib.sci18
3 files changed, 17 insertions, 6 deletions
diff --git a/scilab/modules/atoms/etc/atoms.start b/scilab/modules/atoms/etc/atoms.start
index 5c3fdb9..14b0e46 100644
--- a/scilab/modules/atoms/etc/atoms.start
+++ b/scilab/modules/atoms/etc/atoms.start
@@ -15,6 +15,3 @@ load('SCI/modules/atoms/macros/atoms_internals/lib');
15// ==================================================================== 15// ====================================================================
16//add help chapter 16//add help chapter
17add_module_help_chapter('atoms'); 17add_module_help_chapter('atoms');
18// ====================================================================
19// Create user's toolboxes directory
20mkdir(atomsToolboxDirectory());
diff --git a/scilab/modules/atoms/macros/atomsLoad.sci b/scilab/modules/atoms/macros/atomsLoad.sci
index cb9b139..b94d17f 100644
--- a/scilab/modules/atoms/macros/atomsLoad.sci
+++ b/scilab/modules/atoms/macros/atomsLoad.sci
@@ -126,7 +126,7 @@ function result = atomsLoad(name,version)
126 // ===================================================================== 126 // =====================================================================
127 [is_loaded,loaded_version] = atomsIsLoaded(name(i)); 127 [is_loaded,loaded_version] = atomsIsLoaded(name(i));
128 if is_loaded then 128 if is_loaded then
129 error(msprintf(gettext("%s: Another version of the package %s is already loaded : %s\n","atomsLoad",name(i),loaded_version))); 129 error(msprintf(gettext("%s: Another version of the package %s is already loaded : %s\n"),"atomsLoad",name(i),loaded_version));
130 continue; 130 continue;
131 end 131 end
132 132
diff --git a/scilab/modules/functions/macros/genlib.sci b/scilab/modules/functions/macros/genlib.sci
index 8ef7944..92cd71c 100644
--- a/scilab/modules/functions/macros/genlib.sci
+++ b/scilab/modules/functions/macros/genlib.sci
@@ -8,7 +8,7 @@
8// are also available at 8// are also available at
9// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt 9// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10 10
11function genlib(nam,path,force,verbose,names) 11function [success,funcs,success_files,failed_files] = genlib(nam,path,force,verbose,names)
12 12
13// get all .sci files in the specified directory 13// get all .sci files in the specified directory
14 14
@@ -18,6 +18,11 @@ function genlib(nam,path,force,verbose,names)
18 W = who('get'); 18 W = who('get');
19 np = predef(); 19 np = predef();
20 predefined = or(W($-np+1:$)==nam); 20 predefined = or(W($-np+1:$)==nam);
21
22 success = %t;
23 funcs = [];
24 success_files = [];
25 failed_files = [];
21 26
22 if verbose then 27 if verbose then
23 mprintf(gettext("-- Creation of [%s] (Macros) --\n"),nam); 28 mprintf(gettext("-- Creation of [%s] (Macros) --\n"),nam);
@@ -121,8 +126,15 @@ function genlib(nam,path,force,verbose,names)
121 end 126 end
122 127
123 // getf sci file and save functions it defines as a .bin file 128 // getf sci file and save functions it defines as a .bin file
124 getsave(scif); 129 result = getsave(scif);
125 modified = %t; 130 modified = %t;
131 if result <> [] then
132 success_files($+1) = scif
133 funcs = [funcs result]
134 else
135 failed_files($+1) = scif
136 success = %f
137 end
126 end 138 end
127 end 139 end
128 end 140 end
@@ -142,6 +154,7 @@ function genlib(nam,path,force,verbose,names)
142 //save it 154 //save it
143 155
144 if execstr('save('''+path1+'lib'''+','+nam+')','errcatch')<>0 then 156 if execstr('save('''+path1+'lib'''+','+nam+')','errcatch')<>0 then
157 success = %f;
145 error(msprintf(gettext("%s: %s file cannot be created\n"),"genlib",path+'lib')); 158 error(msprintf(gettext("%s: %s file cannot be created\n"),"genlib",path+'lib'));
146 end 159 end
147 else 160 else
@@ -201,6 +214,7 @@ function result = getsave(scifile)
201 clear ierr 214 clear ierr
202 215
203 if new<>[] then 216 if new<>[] then
217 result = new($:-1:1)';
204 execstr('save(u,'+strcat(new($:-1:1),',')+')'); 218 execstr('save(u,'+strcat(new($:-1:1),',')+')');
205 else 219 else
206 msprintf(gettext("%s: File %s does not contain any function.\n"),"genlib",binfile) 220 msprintf(gettext("%s: File %s does not contain any function.\n"),"genlib",binfile)