function dspblkzpad2(action, varargin)
% DSPBLKZPAD2 DSP Blockset Zero Pad block helper function

% Copyright 1995-2000 The MathWorks, Inc.
% $Revision: 1.3 $ $Date: 2000/01/24 15:50:30 $

% Cache current block
curBlk = gcb;

% Cache current block mask enables
cachedEnables    = get_param(curBlk,'maskenables');
newEnables       = cachedEnables;
zpadAlongWhatDim = get_param(curBlk,'zpadAlong');
    
if ( strcmp(zpadAlongWhatDim, 'Columns') )
    numOutRowsEnabled = 'on';
    numOutColsEnabled = 'off';
elseif ( strcmp(get_param(curBlk,'zpadAlong'), 'Rows') )
    numOutRowsEnabled = 'off';
    numOutColsEnabled = 'on';
elseif ( strcmp(get_param(curBlk,'zpadAlong'), 'Columns and rows') )
    numOutRowsEnabled = 'on';
    numOutColsEnabled = 'on';    
else
    % 'None' or unrecognized case
    numOutRowsEnabled = 'off';
    numOutColsEnabled = 'off';
end

newEnables{2} = numOutRowsEnabled;
newEnables{3} = numOutColsEnabled;

% Only update the block mask enables if they have changed
if ~(isequal(cachedEnables, newEnables))
    set_param(curBlk, 'maskenables', newEnables);
end

% [EOF] dspblkzpad2.m
