Ultrix-3.1/src/cmd/learn/whatnow.c
/**********************************************************************
* Copyright (c) Digital Equipment Corporation 1984, 1985, 1986. *
* All Rights Reserved. *
* Reference "/usr/src/COPYRIGHT" for applicable restrictions. *
**********************************************************************/
static char Sccsid[] = "@(#)whatnow.c 3.0 4/21/86";
#include "stdio.h"
#include "lrnref"
whatnow()
{
if (todo == 0) {
more=0;
return;
}
if (didok) {
strcpy(level,todo);
if (speed<=9) speed++;
}
else {
speed -= 4;
/* the 4 above means that 4 right, one wrong leave
you with the same speed. */
if (speed <0) speed=0;
}
if (wrong) {
speed -= 2;
if (speed <0 ) speed = 0;
}
if (didok && more) {
printf("\nGood. Lesson %s (%d)\n\n",level, speed);
fflush(stdout);
}
}