commit d3b57b18705a20ccce39da5f20b738eaa26ebe93
Author: Fabian Kurz <fabian@fkurz.net>
Date:   Sat Aug 5 15:17:36 2023 +0200

    Option to stop after an error for review (tnx K7MOZ, EI6LA)
    
    Closes #9

diff --git a/ChangeLog b/ChangeLog
index 0a46326..f4e8a5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+0.3.6 / 2023-??-??   Fabian Kurz <fabian@fkurz.net>
+	* Configurable speed step after each call (tnx DF7CB)
+	* Option to stop after an error for review (tnx K7MOZ, EI6LA)
+
 0.3.5 / 2022-01-24   Fabian Kurz <fabian@fkurz.net>
 	* Fix handling of PgUp/PgDown (tnx W4MSL)
 	* In unlimited attempt, actually play *all* items from
diff --git a/src/qrq.c b/src/qrq.c
index 6f131ec..042ac4c 100644
--- a/qrq.c
+++ b/qrq.c
@@ -109,6 +109,7 @@ static int mincharspeed=0;				/* min. char. speed, below: farnsworth*/
 static int speed=200;					/* current speed in cpm */
 static int maxspeed=0;
 static int speedstep=10;				/* speed increase/decrease after attempts */
+static int stoponerror=0;               /* after an error, stop and wait for 2nd enter */
 static int freq=800;					/* current cw sidetone freq */
 static int errornr=0;					/* number of errors in attempt */
 static int p=0;							/* position of cursor, relative to x */
@@ -539,6 +540,8 @@ while (status == 1) {
 		update_score();
 		if (strcmp(tmp, "-")) {			/* made an error */
 				show_error(calls[i], tmp);
+                if (stoponerror)
+                    getch();
 		}
 		input[0]='\0';
 		strncpy(previouscall, calls[i], CALL_MAX);
@@ -645,6 +648,9 @@ while ((j = getch()) != 0) {
 		case 's':
 				fixspeed = (fixspeed ? 0 : 1);
 			break;
+		case 't':
+				stoponerror = (stoponerror ? 0 : 1);
+			break;
 		case 'u':
 				unlimitedattempt = (unlimitedattempt ? 0 : 1);
 			break;
@@ -699,7 +705,7 @@ while ((j = getch()) != 0) {
 			break;
 		case KEY_F(2):
 			save_config();	
-			mvwprintw(conf_w,15,39, "Config saved!");
+			mvwprintw(conf_w,15,23, "  Config saved!");
 			wrefresh(conf_w);
 #ifdef WIN32
 			Sleep(1000);
@@ -769,8 +775,7 @@ void update_parameter_dialog () {
 	curs_set(0);
 	wattron(conf_w,A_BOLD);
 	mvwaddstr(conf_w,1,1, "Configuration:          Value                Change");
-	mvwprintw(conf_w,14,2, "      F6                    F10            ");
-	mvwprintw(conf_w,15,2, "      F2");
+	mvwprintw(conf_w,15,2, "F6                   F2                F10");
 	wattroff(conf_w, A_BOLD);
 	mvwprintw(conf_w,2,2, "Initial Speed:         %3d CpM / %3d WpM" 
 					"    up/down", initialspeed, initialspeed/5);
@@ -796,15 +801,15 @@ void update_parameter_dialog () {
 		mvwprintw(conf_w,12,2, "Callsign database:     %-15s"
 					"      d (%ld)", basename(cbfilename),nrofcalls);
 	}
+	mvwprintw(conf_w,13,2, "Stop on error:         %-3s"
+                    "                  t", (stoponerror ? "yes" : "no"));
 #ifdef OSS
-	mvwprintw(conf_w,13,2, "DSP device:            %-15s"
+	mvwprintw(conf_w,14,2, "DSP device:            %-15s"
 					"      e", dspdevice);
 #endif
-	mvwprintw(conf_w,14,2, "Press");
-	mvwprintw(conf_w,14,11, "to play sample CW,");
-	mvwprintw(conf_w,14,34, "to go back.");
-	mvwprintw(conf_w,15,2, "Press");
-	mvwprintw(conf_w,15,11, "to save config permanently.");
+	mvwprintw(conf_w,15,4, ": Play CW sample");
+	mvwprintw(conf_w,15,25, ": Save config");
+	mvwprintw(conf_w,15,44, ": Exit");
 	mvwprintw(inf_w,1,1, "          * Makes scores ineligible for toplist");
 	wrefresh(conf_w);
 	wrefresh(inf_w);
@@ -904,8 +909,7 @@ static int readline(WINDOW *win, int y, int x, char *line, int capitals, int len
 				line[i] =  line[i+1];
 			}
 			p--;
-		}
-		else if (c == KEY_DC && strlen(line) != 0) {		/* DELETE */ 
+
 			p++;
 			for (i=p-1;i < strlen(line); i++) {
 				line[i] =  line[i+1];
@@ -1461,6 +1465,13 @@ static int read_config () {
 				fixspeed = 1;
 			}
 			printw("  line  %2d: fixed speed:  %s\n", line, (fixspeed ? "yes":"no"));
+        }
+		else if (tmp == strstr(tmp, "stoponerror=")) {
+			stoponerror = 0;
+			if (tmp[12] == '1') {
+				stoponerror = 1;
+			}
+			printw("  line  %2d: stoponerror:  %s\n", line, (stoponerror ? "yes":"no"));
         }
 		else if (tmp == strstr(tmp, "unlimitedattempt=")) {
 			unlimitedattempt=0;
@@ -1709,6 +1720,7 @@ static int save_config () {
 		"\nf6=", 
 		"\nrisetime=", 
 		"\nspeedstep=" 
+		"\nstoponerror=" 
 	};
 	char *conf1;
 	char *conf2;
@@ -1784,6 +1796,9 @@ static int save_config () {
 			case 12:
 				sprintf(tmp, "%s%d ", confopts[i], speedstep);
 				break;
+			case 13:
+				sprintf(tmp, "%s%d ", confopts[i], stoponerror);
+				break;
 		}	
 
 		/* Conf option already in rc-file? */
diff --git a/src/qrqrc b/src/qrqrc
index 39973d0..e31ff42 100644
--- a/qrqrc
+++ b/qrqrc
@@ -1,11 +1,11 @@
-# Configuration file for qrq by DJ1YFK. Change values as needed. 
+# Configuration file for qrq by DJ5CW. Change values as needed. 
 # NOTE: Don't leave any spaces between the = and the assigned value.
 # for example: dspdevice = /dev/dsp won't work!
 # The settings can be changed and saved from within the
 # program, so there is usually no need to manually change anything here.
 
 callsign=MYCALL       # your callsign
-initialspeed=100      # initial speed in LpM (5 LpM = 1 WPM)
+initialspeed=100      # initial speed in Letters per Minute / LpM (5 LpM = 1 WpM)
 mincharspeed=100      # minimum character speed. below, Farnsworth is used
 speedstep=10          # speed increase/decrease after each attempt in LpM
 dspdevice=/dev/dsp    # your DSP device, usually /dev/dsp (for OSS only)
@@ -31,13 +31,24 @@ constanttone=0
 ctonefreq=600     
 
 # allow unlimited usage of F6
+# values: 0 = no, 1 = yes
 f6=0   
 
 # use fixed speed in the attempts, regardless of errors
+# values: 0 = no, 1 = yes
 fixspeed=0 
+
 # allow unlimited attempts (instead of just 50 calls)
+# values: 0 = no, 1 = yes
 unlimitedattempt=0   
 
+# speed step between calls in LpM
+speedstep=10
+
+# pause/stop after a call was copied wrong (must press enter again to resume)
+# values: 0 = no, 1 = yes
+stoponerror=0
+
 # Callbase - specify a different file here, if desired.
 # callbase=/tmp/test
 # callbase=callbase.qcb 
