instead of having it do the actual actions when you press the button you can have it set a variable with the button, then it does a certain routine depending on the button pressed. Example:
Code:
unsigned char test;
if(rc_dig_in01)
test=1;
if(rc_dig_in02)
test=2;
if(rc_dig_in03)
test=3;
if(rc_dig_in04)
test=4;
if(test==1)
(routine a)
etc