/* This function is called by button_sequence_finished to search through the list of callback functions, and call any of them whose count argument matches the current count of button presses. It starts at the beginning of the list and works up to the end. It will refuse to follow a null pointer (which should never happen anyway).  */
static void button_consume_callbacks(int bpcount)
/* This function is called by button_sequence_finished to search through the list of callback functions, and call any of them whose count argument matches the current count of button presses. It starts at the beginning of the list and works up to the end. It will refuse to follow a null pointer (which should never happen anyway).  */
static void button_consume_callbacks(int bpcount)
{
	int lp = 0;
	for (; lp <= 31; lp++) {
		if ((button_callback_list [lp].count) == bpcount) {
			if (button_callback_list [lp].callback) {
				button_callback_list[lp].callback();
			}
		}
	}
}