summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cleaner.sce80
-rw-r--r--jar/.gitignore0
-rw-r--r--loader.sce18
-rw-r--r--macros/blackmannuttall.sci2
-rw-r--r--macros/dutycycle.sci2
-rw-r--r--macros/falltime.sci2
-rw-r--r--macros/fftshift1.sci3
-rw-r--r--macros/hamming.sci2
-rw-r--r--macros/hanning.sci2
-rw-r--r--macros/midcross.sci2
-rw-r--r--macros/nnls.sci2
-rw-r--r--macros/nuttallwin.sci2
-rw-r--r--macros/pulseperiod.sci2
-rw-r--r--macros/pulsesep.sci2
-rw-r--r--macros/pulsewidth.sci2
-rw-r--r--macros/risetime.sci2
-rw-r--r--macros/slewrate.sci2
-rw-r--r--test.sce4
-rw-r--r--unloader.sce23
19 files changed, 99 insertions, 55 deletions
diff --git a/cleaner.sce b/cleaner.sce
index 370c68f..aab2d3e 100644
--- a/cleaner.sce
+++ b/cleaner.sce
@@ -1,38 +1,64 @@
// This file is released under the 3-clause BSD license. See COPYING-BSD.
// Generated by builder.sce: Please, do not edit this file
-try
- getversion("scilab");
-catch
- error("Scilab 5.0 or more is required.");
-end
+oldmode = mode();
+oldlines = lines()(2);
+lines(0);
+
function perform_clean()
- root_tlbx = get_absolute_file_path('cleaner.sce');
+ root_tlbx = get_absolute_file_path('cleaner.sce');
- if isfile(root_tlbx + '/macros/cleanmacros.sce') then
- exec(root_tlbx+'/macros/cleanmacros.sce');
- end
+ if isfile(root_tlbx + '/macros/cleanmacros.sce') then
+ exec(root_tlbx+'/macros/cleanmacros.sce');
+ else
+ if isdir(root_tlbx + "/macros/") then
+ deletefile(root_tlbx + "/macros/lib");
+ binfiles = findfiles(root_tlbx + "/macros/", "*.bin");
+ if ~isempty(binfiles) then
+ deletefile(root_tlbx + "/macros/" + binfiles);
+ end
+ end
+ end
- if isfile(root_tlbx + '/src/cleaner_src.sce') then
- exec(root_tlbx+'/src/cleaner_src.sce');
- end
+ if isfile(root_tlbx + "/src/cleaner_src.sce") then
+ exec(root_tlbx + "/src/cleaner_src.sce");
+ mdelete(root_tlbx + "/src/cleaner_src.sce");
+ end
- if isfile(root_tlbx + "/sci_gateway/cleaner_gateway.sce") then
- exec(root_tlbx + "/sci_gateway/cleaner_gateway.sce");
- mdelete(root_tlbx + "/sci_gateway/cleaner_gateway.sce");
- end
+ if isfile(root_tlbx + "/sci_gateway/cleaner_gateway.sce") then
+ exec(root_tlbx + "/sci_gateway/cleaner_gateway.sce");
+ mdelete(root_tlbx + "/sci_gateway/cleaner_gateway.sce");
+ end
- if isfile(root_tlbx + "/help/cleaner_help.sce") then
- exec(root_tlbx + "/help/cleaner_help.sce");
- end
+ if isfile(root_tlbx + "/help/cleaner_help.sce") then
+ exec(root_tlbx + "/help/cleaner_help.sce");
+ else
+ if isdir(root_tlbx + "/jar/") then
+ rmdir(root_tlbx + "/jar/", "s");
+ end
+ end
- if isfile(root_tlbx + "/loader.sce") then
- mdelete(root_tlbx + "/loader.sce");
- end
+ if isfile(root_tlbx + "/loader.sce") then
+ mdelete(root_tlbx + "/loader.sce");
+ end
- if isfile(root_tlbx + "/unloader.sce") then
- mdelete(root_tlbx + "/unloader.sce");
- end
+ if isfile(root_tlbx + "/unloader.sce") then
+ mdelete(root_tlbx + "/unloader.sce");
+ end
endfunction
-perform_clean();
-clear perform_clean;
+
+try
+ perform_clean();
+catch
+ [errmsg, tmp, nline, func] = lasterror();
+ msg = "%s: error on line #%d: ""%s""\n";
+ msg = msprintf(msg, func, nline, errmsg);
+ lines(oldlines);
+ mode(oldmode);
+ clear perform_clean oldlines oldmode tmp nline func errmsg;
+ error(msg);
+end
+
+lines(oldlines)
+mode(oldmode);
+clear perform_clean oldlines oldmode;
diff --git a/jar/.gitignore b/jar/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/jar/.gitignore
+++ /dev/null
diff --git a/loader.sce b/loader.sce
index 2d835fa..328a320 100644
--- a/loader.sce
+++ b/loader.sce
@@ -1,10 +1,20 @@
// This file is released under the 3-clause BSD license. See COPYING-BSD.
// Generated by builder.sce: Please, do not edit this file
+oldmode = mode(); mode(-1);
+oldlines = lines()(2); lines(0);
try
- getversion("scilab");
+ exec(get_absolute_file_path("loader.sce")+"etc/"+"FOSSEE_Signal_Processing_Toolbox.start");
catch
- error("Scilab 5.0 or more is required.");
-end;
+ [errmsg, tmp, nline, func] = lasterror()
+ msg = "%s: error on line #%d: ""%s""\n"
+ msg = msprintf(msg, func, nline, errmsg)
+ lines(oldlines)
+ mode(oldmode);
+ clear oldlines oldmode tmp nline func
+ error(msg);
+end
+lines(oldlines);
+mode(oldmode);
+clear oldlines oldmode;
-exec(get_absolute_file_path("loader.sce")+"etc/"+"FOSSEE_Signal_Processing_Toolbox.start");
diff --git a/macros/blackmannuttall.sci b/macros/blackmannuttall.sci
index 674afe9..6719fde 100644
--- a/macros/blackmannuttall.sci
+++ b/macros/blackmannuttall.sci
@@ -44,7 +44,7 @@ function w = blackmannuttall (m, opt)
case "symmetric"
N = m-1;
else
- error ('nuttallwin: window type must be either periodic or symmetric");
+ error ("nuttallwin: window type must be either periodic or symmetric");
end
end
diff --git a/macros/dutycycle.sci b/macros/dutycycle.sci
index 1938453..b3d23f3 100644
--- a/macros/dutycycle.sci
+++ b/macros/dutycycle.sci
@@ -140,7 +140,7 @@ if (~isempty(sindex)) then
case {'TOLERANCE'}
if length(varargin) <=sindex(j) then
- error(strcat(['parameter Tolerance required a value"]));
+ error(strcat(["parameter Tolerance required a value"]));
elseif type(varargin(sindex(j)+1))==1 then
tolerance= varargin(sindex(j)+1);
diff --git a/macros/falltime.sci b/macros/falltime.sci
index b2e436a..adcbcdd 100644
--- a/macros/falltime.sci
+++ b/macros/falltime.sci
@@ -193,7 +193,7 @@ if (~isempty(sindex)) then
case {'TOLERANCE'}
if length(varargin) <=sindex(j) then
- error(strcat(['parameter Tolerance required a value"]));
+ error(strcat(["parameter Tolerance required a value"]));
elseif type(varargin(sindex(j)+1))==1 then
tolerance= varargin(sindex(j)+1);
diff --git a/macros/fftshift1.sci b/macros/fftshift1.sci
index 9026025..cdff99a 100644
--- a/macros/fftshift1.sci
+++ b/macros/fftshift1.sci
@@ -18,8 +18,7 @@ function y= fftshift1(X,DIM)
//
//If X is a matrix, the same holds for rows and columns. If X is an array, then the same holds along each dimension.
//
-//The optional DIM argument can be used to limit the dimension along
- which the permutation occurs.
+//The optional DIM argument can be used to limit the dimension along which the permutation occurs.
rhs= argn(2);
if(rhs <1 | rhs >2)
error('Wrong number of Input arguments');
diff --git a/macros/hamming.sci b/macros/hamming.sci
index 79d97fa..2019dbd 100644
--- a/macros/hamming.sci
+++ b/macros/hamming.sci
@@ -19,7 +19,7 @@ function c = hamming (m, opt)
case "symmetric"
//Default option, same as no option specified.
else
- error ('hamming: window type must be either periodic or symmetric");
+ error ("hamming: window type must be either periodic or symmetric");
end
end
diff --git a/macros/hanning.sci b/macros/hanning.sci
index e206eaf..dcedcd4 100644
--- a/macros/hanning.sci
+++ b/macros/hanning.sci
@@ -19,7 +19,7 @@ function c = hanning (m, opt)
case "symmetric"
//Default option, same as no option specified.
else
- error ('hanning: window type must be either periodic or symmetric");
+ error ("hanning: window type must be either periodic or symmetric");
end
end
diff --git a/macros/midcross.sci b/macros/midcross.sci
index 445e5f4..6d174ef 100644
--- a/macros/midcross.sci
+++ b/macros/midcross.sci
@@ -249,7 +249,7 @@ if (~isempty(index)) then
case {'TOLERANCE'}
if length(varargin) <=index(j) then
- error(strcat(['parameter Tolerance required a value"]));
+ error(strcat(["parameter Tolerance required a value"]));
elseif type(varargin(index(j)+1))==1 then
tolerance= varargin(index(j)+1);
diff --git a/macros/nnls.sci b/macros/nnls.sci
index 46554e9..5724c22 100644
--- a/macros/nnls.sci
+++ b/macros/nnls.sci
@@ -43,7 +43,7 @@ function [x,w] = nnls(E,f)
while or(z(P)<=0)
iter = iter+1;
- if iter>iterM`ax then
+ if iter>iterMax then
x = z;
return;
end
diff --git a/macros/nuttallwin.sci b/macros/nuttallwin.sci
index a7090ad..d7dbd39 100644
--- a/macros/nuttallwin.sci
+++ b/macros/nuttallwin.sci
@@ -19,7 +19,7 @@ function w = nuttallwin (m, opt)
case "symmetric"
N = m-1;
else
- error ('nuttallwin: window type must be either periodic or symmetric");
+ error ("nuttallwin: window type must be either periodic or symmetric");
end
end
diff --git a/macros/pulseperiod.sci b/macros/pulseperiod.sci
index 0e986a1..c2b8473 100644
--- a/macros/pulseperiod.sci
+++ b/macros/pulseperiod.sci
@@ -120,7 +120,7 @@ if (~isempty(sindex)) then
if length(varargin) <=sindex(j) then
- error(strcat(['parameter Tolerance required a value"]));
+ error(strcat(["parameter Tolerance required a value"]));
elseif type(varargin(sindex(j)+1))==1 then
tolerance= varargin(sindex(j)+1);
diff --git a/macros/pulsesep.sci b/macros/pulsesep.sci
index df85e80..ca14280 100644
--- a/macros/pulsesep.sci
+++ b/macros/pulsesep.sci
@@ -116,7 +116,7 @@ if (~isempty(sindex)) then
case {'TOLERANCE'}
if length(varargin) <=sindex(j) then
- error(strcat(['parameter Tolerance required a value"]));
+ error(strcat(["parameter Tolerance required a value"]));
elseif type(varargin(sindex(j)+1))==1 then
tolerance= varargin(sindex(j)+1);
diff --git a/macros/pulsewidth.sci b/macros/pulsewidth.sci
index 6e46484..fe033b4 100644
--- a/macros/pulsewidth.sci
+++ b/macros/pulsewidth.sci
@@ -122,7 +122,7 @@ if (~isempty(sindex)) then
case {'TOLERANCE'}
if length(varargin) <=sindex(j) then
- error(strcat(['parameter Tolerance required a value"]));
+ error(strcat(["parameter Tolerance required a value"]));
elseif type(varargin(sindex(j)+1))==1 then
tolerance= varargin(sindex(j)+1);
diff --git a/macros/risetime.sci b/macros/risetime.sci
index e39396f..6c6e90b 100644
--- a/macros/risetime.sci
+++ b/macros/risetime.sci
@@ -194,7 +194,7 @@ if (~isempty(sindex)) then
case {'TOLERANCE'}
//disp('jitend')
if length(varargin) <=sindex(j) then
- error(strcat(['parameter Tolerance required a value"]));
+ error(strcat(["parameter Tolerance required a value"]));
elseif type(varargin(sindex(j)+1))==1 then
tolerance= varargin(sindex(j)+1);
diff --git a/macros/slewrate.sci b/macros/slewrate.sci
index 544bd28..8a5ac04 100644
--- a/macros/slewrate.sci
+++ b/macros/slewrate.sci
@@ -213,7 +213,7 @@ if (~isempty(sindex)) then
case {'TOLERANCE'}
if length(varargin) <=sindex(j) then
- error(strcat(['parameter Tolerance required a value"]));
+ error(strcat(["parameter Tolerance required a value"]));
elseif type(varargin(sindex(j)+1))==1 then
tolerance= varargin(sindex(j)+1);
diff --git a/test.sce b/test.sce
index 5d5b2b6..2ac64ce 100644
--- a/test.sce
+++ b/test.sce
@@ -1,5 +1,5 @@
-exec loader.sce
-exec builder.sce
+//exec loader.sce
+//exec builder.sce
exec('test1.sce',-1)
exec('test2.sce',-1)
diff --git a/unloader.sce b/unloader.sce
index dea8f22..8021197 100644
--- a/unloader.sce
+++ b/unloader.sce
@@ -1,14 +1,23 @@
// This file is released under the 3-clause BSD license. See COPYING-BSD.
// Generated by builder.sce: Please, do not edit this file
+oldmode = mode(); mode(-1);
+oldlines = lines()(2); lines(0);
try
- getversion("scilab");
+ fileQuit = get_absolute_file_path("unloader.sce") + "etc/" + "FOSSEE_Signal_Processing_Toolbox.quit";
+ if isfile(fileQuit) then
+ exec(fileQuit);
+ end
catch
- error("Scilab 5.4 or more is required.");
-end;
-
-fileQuit = get_absolute_file_path("unloader.sce") + "etc/" + "FOSSEE_Signal_Processing_Toolbox.quit";
-if isfile(fileQuit) then
- exec(fileQuit);
+ [errmsg, tmp, nline, func] = lasterror()
+ msg = "%s: error on line #%d: ""%s""\n"
+ msg = msprintf(msg, func, nline, errmsg)
+ lines(oldlines)
+ mode(oldmode);
+ clear oldlines oldmode tmp nline func
+ error(msg);
end
+lines(oldlines);
+mode(oldmode);
+clear oldlines oldmode;