1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
Index: kdrill/game.c
===================================================================
--- kdrill.orig/game.c 2005-01-08 07:49:05.000000000 +0100
+++ kdrill/game.c 2010-04-18 23:03:42.749660787 +0200
@@ -379,7 +379,8 @@
{
TRANSLATION kanjiP;
- kanjiP = values[guess];/* for setting "incorrect" flag */
+ if (guess != -1)
+ kanjiP = values[guess];/* for setting "incorrect" flag */
totalguessed+=1;
@@ -412,13 +413,15 @@
* once for the quiz meaning you missed,
* and once for the incorrect kanji you thought it was
*/
- Beep();
- setstatus("Incorrect.");
-
- /* Note that markasmissed also increments numberincorrect,
- * *IFF* needed
- */
+
if(guess != -1){
+ /* Timeout already handles message */
+ Beep();
+ setstatus("Incorrect.");
+
+ /* Note that markasmissed also increments numberincorrect,
+ * *IFF* needed
+ */
markasmissed(kanjiP);
}
Index: kdrill/mainwindow.c
===================================================================
--- kdrill.orig/mainwindow.c 2010-04-18 23:03:42.659656827 +0200
+++ kdrill/mainwindow.c 2010-04-18 23:03:42.762989932 +0200
@@ -122,7 +122,6 @@
* NOTE:
* we get passed the value (key-1)
*/
-/* note that "-1" means "default due to time" */
void Guessvalue(Widget w,XEvent *event,String *params,Cardinal *num_parags)
{
int value;
Index: kdrill/timeout.c
===================================================================
--- kdrill.orig/timeout.c 2001-08-31 01:26:20.000000000 +0200
+++ kdrill/timeout.c 2010-04-18 23:03:42.762989932 +0200
@@ -149,6 +149,7 @@
void handletimeout(XtPointer closure, XtIntervalId *timerid){
Beep();
setstatus("TIME IS UP!");
+ guessvalue(-1);
cheatcallback(NULL, (XtPointer)1, NULL);
in_use=0;
|