mode(-1);
// 
// -------------------------------------------------------------------------
// SIP - Scilab Image Processing toolbox
// Copyright (C) 2002  Ricardo Fabbri
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// -------------------------------------------------------------------------
//

// specific part
libname='siplib'
libtitle='SIP - Scilab Image Processing Toolbox';
mess=[libtitle+' loaded';
    'Enter ""sipdemo()"" for a demonstration']

// get the absolute path 
SIPDIR=get_absolute_file_path('loader.sce') + '/'

// load the library macros
execstr(libname+'=lib(""'+SIPDIR+'macros/'+'"")')

// Redefine the "help" macro if in scilab 2.7
//
l=length(SCI)
ver=part(SCI,l-2:l)
if ver == '2.7'
   exec (SIPDIR+'win_util/help.sci');
end

// add the help chapter
write(%io(2),mess)
write(%io(2),'')
%helps = [%helps; SIPDIR+'man', libtitle]
// ADD C routines
DIR=getcwd();

if ~MSDOS then
   chdir(SIPDIR+'src');
   exec loader.sce;
else
   chdir(SIPDIR+'win_bin');
   exec winloader.sce;
end   
chdir(DIR);
clear fd err nams libtitle mess
