* bug 8608 - dec2hex, hex2dec, dec2oct and oct2dec code have been simplified
and optimized.
+* bug 8608 - dec2hex, hex2dec, dec2oct, oct2dec, code have been simplified and optimized.
+
Removed functions (previously declared as obsolete):
====================================================
<varlistentry>
<term>files</term>
<listitem>
- <para>string matrix giving source files needed for shared library creation. Since Scilab 5.3.1, object files are deprecated.</para>
+ <para>string matrix giving source files needed for shared library creation.</para>
</listitem>
</varlistentry>
<varlistentry>
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) ENPC/INRIA
-// Copyright (C) DIGITEO - 2009-2010 - Allan CORNET
+// Copyright (C) DIGITEO - 2009-2011 - 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
end
if ~isempty(files) & (or(fileext(files)==".o") | or(fileext(files)==".obj")) then
- warnobsolete(msprintf(_("A managed file extension for input argument #%d"), 3), "5.4.0");
+ error(999, msprintf(_("%s: A managed file extension for input argument #%d expected."), "ilib_build", 3));
end
if rhs > 4 then
end
end
+ if ~isempty(files) & ~and(isfile(files)) then
+ error(999, msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), "ilib_build", 3));
+ end
+
+
if rhs <= 5 then ldflags = ""; end
if rhs <= 6 then cflags = ""; end
if rhs <= 7 then fflags = ""; end
// Copyright (C) INRIA
// Copyright (C) ENPC
// Copyright (C) DIGITEO - 2009
-// Copyright (C) DIGITEO - 2010 - Allan CORNET
+// Copyright (C) DIGITEO - 2010-2011 - 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
files = [];
else
if ~isempty(files) & (or(fileext(files)==".o") | or(fileext(files)==".obj")) then
- warnobsolete(msprintf(_("A managed file extension for input argument #%d"), 3), "5.4.0");
+ error(999, msprintf(_("%s: A managed file extension for input argument #%d expected."), "ilib_compile", 3));
end
end
-
if typeof(lib_name)<>"string" then
error(msprintf(gettext("%s: Wrong type for input argument #%d: A string expected.\n"),"ilib_compile",1));
return ;
oldpath = pwd();
files = files(:)';
- managed_ext = [".obj",".o"];
- for i=1:size(files,"*") // compatibility scilab 4.x
- [path_f, file_f, ext_f] = fileparts(files(i));
- if or(managed_ext == ext_f) then
- files1(i) = path_f + file_f;
- else
- files1(i) = path_f + file_f + ext_f;
- end
- end
-
[make_command, lib_name_make, lib_name, path, makename, files]= ...
ilib_compile_get_names(lib_name, makename, files);
for i=1:nf
if ( ilib_verbose() <> 0 ) then
- mprintf(_(" Compilation of ") + string(files1(i)) +"\n");
+ mprintf(_(" Compilation of ") + string(files(i)) +"\n");
end
end
ilib_compile_get_names(lib_name, makename, files)
if getos() <> "Windows" then
- managed_ext = ".o";
- for i=1:size(files,"*") // compatibility scilab 4.x
- [path_f, file_f, ext_f] = fileparts(files(i));
- if or(managed_ext == ext_f) then
- files(i) = path_f + file_f;
- else
- files(i) = path_f + file_f + ext_f;
- end
- end
k = strindex(makename,["/","\"]);
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) INRIA/ENPC
-// Copyright (C) DIGITEO - 2009-2010 - Allan CORNET
+// Copyright (C) DIGITEO - 2009-2011 - 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
if rhs <= 8 then cflags = ""; end
if rhs <= 9 then fflags = ""; end
if rhs <= 10 then cc = ""; end
+
+ if isempty(files) | ~and(isfile(files)) then
+ error(999, msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), "ilib_for_link", 2));
+ end
if ~isempty(files) & (or(fileext(files)==".o") | or(fileext(files)==".obj")) then
- warnobsolete(msprintf(_("A managed file extension for input argument #%d"), 2), "5.4.0");
+ error(999, msprintf(_("%s: A managed file extension for input argument #%d expected.\n"), "ilib_for_link", 2));
end
if getos() == "Windows" then
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) ENPC
-// Copyright (C) DIGITEO - 2009-2010 - Allan CORNET
+// Copyright (C) DIGITEO - 2009-2011 - 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
fflags = '';
cc = '';
end
-
+
+ if ~isempty(files) & ~and(isfile(files)) then
+ error(999, msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), "ilib_gen_Make", 3));
+ end
+
if getos() <> 'Windows' then
- for i=1:size(files,'*') // compatibility scilab 4.x
- [path_f, file_f, ext_f] = fileparts(files(i));
- if or(ext_f == ['.o','.obj']) then
- files(i) = path_f + file_f;
- else
- files(i) = path_f + file_f + ext_f;
- end
- end
// change table if necessary
if typeof(tables)<>'list' then
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) INRIA
// Copyright (C) 2008 - INRIA - Sylvestre LEDRU (add cc options)
-// Copyright (C) 2010 - DIGITEO - Allan CORNET
+// Copyright (C) 2010-2011 - DIGITEO - 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
end
if ~isempty(files) & (or(fileext(files)==".o") | or(fileext(files)==".obj")) then
- warnobsolete(msprintf(_("A managed file extension for input argument #%d"), 3), "5.4.0");
+ error(999, msprintf(_("%s: A managed file extension for input argument #%d expected."), "ilib_mex_build", 3));
end
+ if ~isempty(files) & ~and(isfile(files)) then
+ error(999, msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), "ilib_mex_build", 3));
+ end
+
if rhs <= 5 then ldflags = ""; end
if rhs <= 6 then cflags = ""; end
if rhs <= 7 then fflags = ""; end
endfunction
//=============================================================================
-
-
-// Copyright (C) DIGITEO - 2010 - Allan CORNET
+// Copyright (C) DIGITEO - 2010-2011 - 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
makename = '';
end
- for i=1:size(files,'*') // compatibility scilab 4.x
- [path_f, file_f, ext_f] = fileparts(files(i));
- if or(ext_f == ['.o','.obj']) then
- files(i) = path_f + file_f;
- else
- files(i) = path_f + file_f + ext_f;
- end
- end
-
// change table if necessary
if tables <> [] then
if typeof(tables)<>'list' then
fflags)
managed_ext = ['.cxx', '.cpp', '.c', '.f90', '.f'];
- obj_ext = ['.o', '.obj', ''];
SCIDIR = SCI;
SCIDIR1 = pathconvert(SCI,%f,%f,'w');
for i=1:size(files,'*')
[path_f, file_f, ext_f] = fileparts(files(i));
-
- if or(obj_ext == ext_f) then
- FILENAME = [];
- FILE_FOUNDED = %f;
- for y = managed_ext(:)'
- if (FILE_FOUNDED == %f) then
- if (fileinfo(path_f + file_f + y) <> []) | (fileinfo(path_Make + file_f + y) <> []) then
- FILENAME = path_f + file_f + y;
- FILE_FOUNDED = %t;
- end
+ FILENAME = [];
+ FILE_FOUNDED = %f;
+ for y = managed_ext(:)'
+ if (FILE_FOUNDED == %f) then
+ if (fileinfo(path_f + file_f + y) <> []) | (fileinfo(path_Make + file_f + y) <> []) then
+ FILENAME = path_f + file_f + y;
+ FILE_FOUNDED = %t;
end
end
- else
- FILENAME = files(i);
end
FILES_SRC_MATRIX = [FILES_SRC_MATRIX , FILENAME];
end
end
end
- if ~and(isfile(FILES_SRC_MATRIX)) then
- error(999, msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), "ilib_gen_Make", 3));
- end
+ if isempty(FILES_SRC_MATRIX) | ~and(isfile(FILES_SRC_MATRIX)) then
+ error(999, msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), "ilib_gen_Make", 3));
+ end
FILES_SRC = strcat(FILES_SRC_MATRIX,' ');
-
OBJ_DEST_PATH = '';
if (getenv("DEBUG_SCILAB_DYNAMIC_LINK","NO") == "NO") then
OBJ_DEST_PATH = "Release/";
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) DIGITEO - 2010 - Allan CORNET
+// Copyright (C) DIGITEO - 2010-2011 - 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 [make_command, lib_name_make, lib_name, path, makename, files] = ..
dlwGetParamsIlibCompil(lib_name, makename, files)
- managed_ext = ['.obj', '.o'];
- for i=1:size(files,'*') // compatibility scilab 4.x
- [path_f, file_f, ext_f] = fileparts(files(i));
- if or(managed_ext == ext_f) then
- files(i) = path_f + file_f;
- else
- files(i) = path_f + file_f + ext_f;
- end
- end
-
k = strindex(makename,['/','\']);
if k~=[] then
lib_name = lib_name+getdynlibext();
lib_name_make = lib_name;
- FILES = [];
- for x = files(:)'
- [ptmp,ftmp,fext] = fileparts(x);
- FILES = [FILES,ptmp+ftmp];
- end
-
if (makename <> [] & makename <> '') then
makename = makename + dlwGetMakefileExt() ;
else
make_command = 'nmake /Y /nologo /f ';
- if FILES <> [] then
- files = FILES + '.obj' ;
- end
-
endfunction
//=============================================================================
-#--- see examples/addinter-tutorial-so ----------
DUMPEXTS="$(SCIDIR1)\bin\dumpexts"
SCIIMPLIB="$(SCIDIR)/bin/LibScilab.lib"
-del $(LIBRARY).lib
distclean:: clean
-
-tests : $(LIBRARY).dll $(LIBRARY).tst
- @"$(SCIDIR1)\bin\scilex.exe" -nwni -e scitest('$(LIBRARY).tst',%t);quit;
-
-# @"$(SCIDIR1)\bin\scilex.exe" -f $(LIBRARY).tst
-
// ilib_build, ilib_for_link, ... did not check 'files' input argument.
//
//
-ilib_verbose(0);
-cd(TMPDIR);
-mputl("void sci_fun1(){}", TMPDIR + "/fun1.c");
-files = "fun1.o";
-ilib_build("build_c", ["fun1", "sci_fun1"],files,[]);
-WARNING: Function ilib_build is obsolete.
-WARNING: Please use a managed file extension for input argument #3 instead.
-WARNING: This function will be permanently removed in Scilab 5.3.1
-
-WARNING: Function ilib_compile is obsolete.
-WARNING: Please use a managed file extension for input argument #3 instead.
-WARNING: This function will be permanently removed in Scilab 5.3.1
-
-mdelete(TMPDIR + "/fun1.c");
if getos() <> "Windows" then
fnameref = "ilib_gen_Make_unix";
idargref = 2;
fnameref = "ilib_gen_Make";
idargref = 3;
end
-files = ['fun1.c','fun2.c','sci_fun1.c'];
+ilib_verbose(0);
+cd(TMPDIR);
+// check with old extension (file fun1.c exists) (no more managed)
+mputl("void sci_fun1(){}", TMPDIR + "/fun1.c");
+files = "fun1.o";
if execstr("ilib_build(""build_c"", [""fun1"", ""sci_fun1""],files,[]);", "errcatch") <> 999 then bugmes();quit;end
-if lasterror() <> msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), fnameref, idargref) then bugmes();quit;end
-if execstr("ilib_for_link(""ext1c"", ""fun1.c"", [], ""c"");", "errcatch") <> 999 then bugmes();quit;end
-if lasterror() <> msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), fnameref, idargref) then bugmes();quit;end
+if lasterror() <> msprintf(gettext("%s: A managed file extension for input argument #%d expected."), "ilib_build", 3) then bugmes();quit;end
+mdelete(TMPDIR + "/fun1.c");
+// check with old extension (file fun2.c does not exist)
+files = "fun2.o";
+if execstr("ilib_build(""build_c"", [""fun2"", ""sci_fun2""],files,[]);", "errcatch") <> 999 then bugmes();quit;end
+if lasterror() <> msprintf(gettext("%s: A managed file extension for input argument #%d expected."), "ilib_build", 3) then bugmes();quit;end
if execstr("ilib_for_link(""ext1c"", ""fun1.c"", [], ""c"");", "errcatch") <> 999 then bugmes();quit;end
-if lasterror() <> msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), fnameref, idargref) then bugmes();quit;end
+if lasterror() <> msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), "ilib_for_link", 2) then bugmes();quit;end
if execstr("ilib_mex_build(""libmex"", [""mexf16"", ""mexfunction16"", ""cmex""],[""fun1.c""],[],[],"""","""","""");", "errcatch") <> 999 then bugmes();quit;end
-if lasterror() <> msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), fnameref, idargref) then bugmes();quit;end
+if lasterror() <> msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), "ilib_mex_build", 3) then bugmes();quit;end
// =============================================================================
ilib_verbose(0);
cd(TMPDIR);
-// check with old extension (file fun1.c exists)
+// check with old extension (file fun1.c exists) (no more managed)
mputl("void sci_fun1(){}", TMPDIR + "/fun1.c");
files = "fun1.o";
-if execstr("ilib_build(""build_c"", [""fun1"", ""sci_fun1""],files,[]);", "errcatch") <> 0 then pause,end
+if execstr("ilib_build(""build_c"", [""fun1"", ""sci_fun1""],files,[]);", "errcatch") <> 999 then pause,end
+if lasterror() <> msprintf(gettext("%s: A managed file extension for input argument #%d expected."), "ilib_build", 3) then pause, end
mdelete(TMPDIR + "/fun1.c");
// check with old extension (file fun2.c does not exist)
files = "fun2.o";
if execstr("ilib_build(""build_c"", [""fun2"", ""sci_fun2""],files,[]);", "errcatch") <> 999 then pause,end
-if lasterror() <> msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), fnameref, idargref) then pause, end
-
-files = ['fun1.c','fun2.c','sci_fun1.c'];
-if execstr("ilib_build(""build_c"", [""fun1"", ""sci_fun1""],files,[]);", "errcatch") <> 999 then pause,end
-if lasterror() <> msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), fnameref, idargref) then pause, end
+if lasterror() <> msprintf(gettext("%s: A managed file extension for input argument #%d expected."), "ilib_build", 3) then pause, end
if execstr("ilib_for_link(""ext1c"", ""fun1.c"", [], ""c"");", "errcatch") <> 999 then pause, end
-if lasterror() <> msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), fnameref, idargref) then pause, end
-
-if execstr("ilib_for_link(""ext1c"", ""fun1.c"", [], ""c"");", "errcatch") <> 999 then pause, end
-if lasterror() <> msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), fnameref, idargref) then pause, end
+if lasterror() <> msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), "ilib_for_link", 2) then pause, end
if execstr("ilib_mex_build(""libmex"", [""mexf16"", ""mexfunction16"", ""cmex""],[""fun1.c""],[],[],"""","""","""");", "errcatch") <> 999 then pause, end
-if lasterror() <> msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), fnameref, idargref) then pause, end
-
+if lasterror() <> msprintf(_("%s: Wrong value for input argument #%d: existing file(s) expected.\n"), "ilib_mex_build", 3) then pause, end
// =============================================================================