function [s,w]=system(arg);
%function [s,w]=system(arg);
%
% System call independend of architecture

% ---------------------------------
% Copyright (c) 2003 Serge Dumoulin
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License version 2
% as published by the Free Software Foundation.
% ---------------------------------


if isunix,
   [s,w]=unix(arg);
elseif isvms,
   [s,w]=vms(arg);
%elseif isppc,
%   % ?
else,
   [s,w]=dos(arg, '-echo');
end;

if(s~=0),
   disp(sprintf('[%s] Error encountered:\n%s',mfilename,deblank(w)));
end;

