function out=overide(module,rev,ext,fn)

% revision history:
% 03/22/03 Mark D. Shattuck <mds> overide.m

if(~exist('module','var') || isempty(module))
	module='default';
end
if(~exist('rev','var') || isempty(rev))
	rev='';
end
if(~exist('ext','var') || isempty(ext))
	ext='';
end
if(~exist('fn','var') || isempty(fn))
	fn='';
end

out=0;
orfn=sprintf('%s%s%s',module,rev,ext);  % Filename overide default behavior
if(exist(orfn,'file'))
  fprintf(1,'Loading overides from %s.\n',orfn);
  evalin('caller',orfn);                            % Run code to override default behavior
  out=out+1;
end

orfn=sprintf('%s%s',fn,ext);            % Filename for file specific overide default behavior
if(exist(orfn,'file'))
  fprintf(1,'Loading overides from %s.\n',orfn);
  evalin('caller',orfn);                            % Run code to override default behavior
  out=out+2;
end

