예제 #1
0
/*
**	menu_test_loop(test-structure, state, control-character)
**
**	This function implements the repeat test function.
*/
static void
menu_test_loop(
	struct test_list *test,
	int *state,
	int *ch)
{
	int nch, p;

	if ((test->flags & MENU_REP_MASK) && (augment_test != test)) {
		/* set the augment variable (first time only) */
		p = (test->flags >> 8) & 15;
		if ((test->flags & MENU_REP_MASK) == MENU_LM1) {
			augment = lines - 1;
		} else
		if ((test->flags & MENU_ONE_MASK) == MENU_ONE) {
			augment = 1;
		} else
		if ((test->flags & MENU_LC_MASK) == MENU_lines) {
			augment = lines * p / 10;
		} else
		if ((test->flags & MENU_LC_MASK) == MENU_columns) {
			augment = columns * p / 10;
		} else {
			augment = 1;
		}
		augment_test = test;
		set_augment_txt();
	}
예제 #2
0
void
control_init(void)
{
	sprintf(txt_longer_test_time, "+) Change test time to %d seconds",
		pad_test_duration + 1);
	sprintf(txt_shorter_test_time, "-) Change test time to %d seconds",
		pad_test_duration - 1);
	set_augment_txt();
}