diff -ur gtypist-2.7/gtypist.c gtypist-2.7-cpmmod/gtypist.c --- gtypist-2.7/gtypist.c 2003-09-29 06:35:22.000000000 +0900 +++ gtypist-2.7-cpmmod/gtypist.c 2007-10-17 14:43:39.000000000 +0900 @@ -453,7 +453,7 @@ static void display_speed( int total_chars, long elapsed_time, int errcount ) { double test_time; /* time in minutes */ double words; /* effective words typed */ - double speed, adjusted_speed; /* speeds in wpm */ + double speed, adjusted_speed; /* speeds in cpm */ char message[MAX_WIN_LINE]; /* buffer */ /* calculate the speeds */ @@ -461,9 +461,10 @@ words = (double)total_chars / (double)5.0; if ( elapsed_time > 0 ) { - speed = words / test_time; + speed = (double)total_chars / test_time; speed = ( speed < 999.99 ) ? speed : 999.99; - adjusted_speed = ( words - errcount ) / test_time; + adjusted_speed = ((double)total_chars - (errcount * 5 )) / test_time; + if( adjusted_speed < 0.00 ) adjusted_speed = 0.00; adjusted_speed = ( adjusted_speed < 999.99 ) ? adjusted_speed : 999.99; } @@ -1620,7 +1621,7 @@ char *help[] = { _("default maximum error percentage (default 3.0); valid values are between 0.0 and 100.0"), - _("turn off WPM timer in drills"), + _("turn off CPM timer in drills"), _("use the terminal's hardware cursor"), _("cursor flash period P*.1 sec (default 10); valid values are between 0 and 512; this is ignored if -t is specified"), _("set initial display colours where available"), @@ -1882,12 +1883,12 @@ Leading whitespace is important because it is displayed in reverse video because it must be aligned with the next two messages (it's best to run gtypist to see this in practice) */ - SPEED_RAW=_(" Raw speed = %6.2f wpm "); + SPEED_RAW=_(" Raw speed = %6.2f cpm "); /* this must be adjusted to the right with one space at the end. Leading whitespace is important because it is displayed in reverse video and because it must be aligned with the previous and next messages (it's best to run gtypist to see this in practice) */ - SPEED_ADJ= _(" Adjusted speed = %6.2f wpm "); + SPEED_ADJ= _(" Adjusted speed = %6.2f cpm "); /* this must be adjusted to the right with one space at the end. Leading whitespace is important because it is displayed in reverse video and because it must be aligned with the next last two messages diff -ur gtypist-2.7/po/cs.po gtypist-2.7-cpmmod/po/cs.po --- gtypist-2.7/po/cs.po 2003-09-29 06:35:56.000000000 +0900 +++ gtypist-2.7-cpmmod/po/cs.po 2007-10-17 14:39:26.000000000 +0900 @@ -88,7 +88,7 @@ "0.0 a 100.0" #: gtypist.c:1623 -msgid "turn off WPM timer in drills" +msgid "turn off CPM timer in drills" msgstr "vypnout sledování rychlosti pøi drilových testech" #: gtypist.c:1624 @@ -318,12 +318,12 @@ #: gtypist.c:1885 #, c-format -msgid " Raw speed = %6.2f wpm " +msgid " Raw speed = %6.2f cpm " msgstr " Hrubá rychlost = %6.2f slov/m " #: gtypist.c:1890 #, c-format -msgid " Adjusted speed = %6.2f wpm " +msgid " Adjusted speed = %6.2f cpm " msgstr " Orientaèní rychlost = %6.2f slov/m " #: gtypist.c:1895 diff -ur gtypist-2.7/po/de.po gtypist-2.7-cpmmod/po/de.po --- gtypist-2.7/po/de.po 2003-09-29 06:35:56.000000000 +0900 +++ gtypist-2.7-cpmmod/po/de.po 2007-10-17 14:39:26.000000000 +0900 @@ -87,8 +87,8 @@ "zwischen 0,0 und 100,0" #: gtypist.c:1623 -msgid "turn off WPM timer in drills" -msgstr "WPM Zeitnehmer abschalten in Übungen" +msgid "turn off CPM timer in drills" +msgstr "CPM Zeitnehmer abschalten in Übungen" #: gtypist.c:1624 msgid "use the terminal's hardware cursor" @@ -333,13 +333,13 @@ #: gtypist.c:1885 #, c-format -msgid " Raw speed = %6.2f wpm " -msgstr " Netto-Geschwindigkeit = %6.2f wpm " +msgid " Raw speed = %6.2f cpm " +msgstr " Netto-Geschwindigkeit = %6.2f cpm " #: gtypist.c:1890 #, c-format -msgid " Adjusted speed = %6.2f wpm " -msgstr " Tatsächliche Geschwindigkeit = %6.2f wpm " +msgid " Adjusted speed = %6.2f cpm " +msgstr " Tatsächliche Geschwindigkeit = %6.2f cpm " #: gtypist.c:1895 #, c-format diff -ur gtypist-2.7/po/es.po gtypist-2.7-cpmmod/po/es.po --- gtypist-2.7/po/es.po 2003-09-29 06:35:56.000000000 +0900 +++ gtypist-2.7-cpmmod/po/es.po 2007-10-17 14:39:26.000000000 +0900 @@ -87,7 +87,7 @@ "entre 0.0 y 100.0" #: gtypist.c:1623 -msgid "turn off WPM timer in drills" +msgid "turn off CPM timer in drills" msgstr "desactivar el contador PPM para las prácticas" #: gtypist.c:1624 @@ -328,13 +328,13 @@ #: gtypist.c:1885 #, c-format -msgid " Raw speed = %6.2f wpm " -msgstr " Velocidad en bruto = %6.2f wpm " +msgid " Raw speed = %6.2f cpm " +msgstr " Velocidad en bruto = %6.2f cpm " #: gtypist.c:1890 #, c-format -msgid " Adjusted speed = %6.2f wpm " -msgstr " Velocidad neta = %6.2f wpm " +msgid " Adjusted speed = %6.2f cpm " +msgstr " Velocidad neta = %6.2f cpm " #: gtypist.c:1895 #, c-format diff -ur gtypist-2.7/po/fi.po gtypist-2.7-cpmmod/po/fi.po --- gtypist-2.7/po/fi.po 2003-09-29 06:35:56.000000000 +0900 +++ gtypist-2.7-cpmmod/po/fi.po 2007-10-17 14:39:26.000000000 +0900 @@ -86,7 +86,7 @@ "arvot ovat 0.0:n ja 100.0:n välissä" #: gtypist.c:1623 -msgid "turn off WPM timer in drills" +msgid "turn off CPM timer in drills" msgstr "kytke sanoja minuutissa -laskuri pois käytöstä harjoituksissa" #: gtypist.c:1624 @@ -324,12 +324,12 @@ #: gtypist.c:1885 #, c-format -msgid " Raw speed = %6.2f wpm " +msgid " Raw speed = %6.2f cpm " msgstr " Raakanopeus = %6.2f s/m " #: gtypist.c:1890 #, c-format -msgid " Adjusted speed = %6.2f wpm " +msgid " Adjusted speed = %6.2f cpm " msgstr " Korjattu nopeus = %6.2f s/m " #: gtypist.c:1895 diff -ur gtypist-2.7/po/fr.po gtypist-2.7-cpmmod/po/fr.po --- gtypist-2.7/po/fr.po 2003-09-29 06:35:56.000000000 +0900 +++ gtypist-2.7-cpmmod/po/fr.po 2007-10-17 14:39:26.000000000 +0900 @@ -87,7 +87,7 @@ "vont de 0 à 100." #: gtypist.c:1623 -msgid "turn off WPM timer in drills" +msgid "turn off CPM timer in drills" msgstr "désactiver le compteur MPM dans les exercices" #: gtypist.c:1624 @@ -328,12 +328,12 @@ #: gtypist.c:1885 #, c-format -msgid " Raw speed = %6.2f wpm " +msgid " Raw speed = %6.2f cpm " msgstr " Vitesse brute = %6.2f mpm " #: gtypist.c:1890 #, c-format -msgid " Adjusted speed = %6.2f wpm " +msgid " Adjusted speed = %6.2f cpm " msgstr " Vitesse corrigée = %6.2f mpm " #: gtypist.c:1895 diff -ur gtypist-2.7/po/ru.po gtypist-2.7-cpmmod/po/ru.po --- gtypist-2.7/po/ru.po 2003-09-29 06:35:56.000000000 +0900 +++ gtypist-2.7-cpmmod/po/ru.po 2007-10-17 14:39:26.000000000 +0900 @@ -86,8 +86,8 @@ "ÕÍÏÌÞÁÎÉÀ); ÄÏÐÕÓÔÉÍÙ ÚÎÁÞÅÎÉÑ ÏÔ 0.0 ÄÏ 100.0" #: gtypist.c:1623 -msgid "turn off WPM timer in drills" -msgstr "×ÙËÌÀÞÉÔØ ÉÚÍÅÒÅÎÉÅ WPM × ÕÐÒÁÖÎÅÎÉÑÈ" +msgid "turn off CPM timer in drills" +msgstr "×ÙËÌÀÞÉÔØ ÉÚÍÅÒÅÎÉÅ CPM × ÕÐÒÁÖÎÅÎÉÑÈ" #: gtypist.c:1624 msgid "use the terminal's hardware cursor" @@ -327,13 +327,13 @@ #: gtypist.c:1885 #, c-format -msgid " Raw speed = %6.2f wpm " -msgstr " óÒÅÄÎÑÑ ÓËÏÒÏÓÔØ %6.2f WPM " +msgid " Raw speed = %6.2f cpm " +msgstr " óÒÅÄÎÑÑ ÓËÏÒÏÓÔØ %6.2f CPM " #: gtypist.c:1890 #, c-format -msgid " Adjusted speed = %6.2f wpm " -msgstr " ó ÕÞ£ÔÏÍ ÏÛÉÂÏË: %6.2f WPM " +msgid " Adjusted speed = %6.2f cpm " +msgstr " ó ÕÞ£ÔÏÍ ÏÛÉÂÏË: %6.2f CPM " #: gtypist.c:1895 #, c-format diff -ur gtypist-2.7/po/zh_TW.po gtypist-2.7-cpmmod/po/zh_TW.po --- gtypist-2.7/po/zh_TW.po 2003-09-29 06:35:56.000000000 +0900 +++ gtypist-2.7-cpmmod/po/zh_TW.po 2007-10-17 14:39:26.000000000 +0900 @@ -88,8 +88,8 @@ msgstr "¹w³]³Ì¤jªº¿ù»~¦Ê¤À¤ñ (¹w³] 3.0); ¦³®Ä­È¤¶©ó 9.0 ©M 100.0" #: gtypist.c:1623 -msgid "turn off WPM timer in drills" -msgstr "Ãö³¬ WPM ­p®É©ó drills" +msgid "turn off CPM timer in drills" +msgstr "Ãö³¬ CPM ­p®É©ó drills" #: gtypist.c:1624 msgid "use the terminal's hardware cursor" @@ -323,13 +323,13 @@ #: gtypist.c:1885 #, c-format -msgid " Raw speed = %6.2f wpm " -msgstr " ­ì©l³t«× = %6.2f wpm " +msgid " Raw speed = %6.2f cpm " +msgstr " ­ì©l³t«× = %6.2f cpm " #: gtypist.c:1890 #, c-format -msgid " Adjusted speed = %6.2f wpm " -msgstr " ¤w½Õ¾ã³t«× = %6.2f wpm " +msgid " Adjusted speed = %6.2f cpm " +msgstr " ¤w½Õ¾ã³t«× = %6.2f cpm " #: gtypist.c:1895 #, c-format