introduce dec function

master
Colin Watson 16 years ago
parent 44b842cbf5
commit b1d8197468

@ -100,7 +100,7 @@ clip.size pop 800 eq {
{
bo.pos 0 eq { exit } if
bo.buf bo.pos 1 sub get ' ' le { exit } if
/bo.pos bo.pos 1 sub def
/bo.pos dec
} loop
/bo.buf bo.buf bo.pos add def
@ -388,7 +388,7 @@ clip.size pop 800 eq {
%
/help.prevlink {
help.hist.index 0 gt {
/help.hist.index help.hist.index 1 sub def
/help.hist.index dec
help.hist.page help.hist.index get
help.hist.startrow help.hist.index get
help.hist.selectedlink help.hist.index get
@ -534,7 +534,7 @@ clip.size pop 800 eq {
% scroll up
help.startrow 0 gt {
/help.startrow help.startrow 1 sub def
/help.startrow dec
help.updatepage
} if
} def

@ -172,9 +172,9 @@
menu.entry 0 gt {
menu.entry false MenuSelect
menu.entry menu.shift eq {
/menu.shift menu.shift 1 sub def redrawmenu
/menu.shift dec redrawmenu
} if
/menu.entry menu.entry 1 sub def
/menu.entry dec
menu.entry true MenuSelect
} if
pop 0

@ -294,6 +294,16 @@ def
} def
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Decrement variable.
%
% ( dict_ref ) ==> ( )
%
/dec {
dup exec 1 sub def
} def
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Copy src to dst.
%

@ -223,7 +223,7 @@
%
/window.pop {
window.list.index 0 eq { .undef return } if
/window.list.index window.list.index 1 sub def
/window.list.index dec
window.list window.list.index get
window.list window.list.index .undef put
/window.current

Loading…
Cancel
Save