diff --git a/Changelog b/Changelog index 6c25283..a656c48 100644 --- a/Changelog +++ b/Changelog @@ -38,6 +38,9 @@ time option - see README for details. * A giant code cleanup that centralizes necessary globals, removes unnecessary variables and #defines... + * Improved stripgfx feature to allow in-session graphic strip + toggling. Still a bit unreliable though, but works better than + before. 1.3.10 (2003/10/22) * Added a mode flag to the open call for inprogress lock files. diff --git a/config.l b/config.l index 4da5e22..fedf2bb 100644 --- a/config.l +++ b/config.l @@ -43,7 +43,6 @@ COMMENT ^#.* {MALSTRING} { yytext[yyleng - 1] = '\0'; /* remove trailing newline */ - /* yytext already contains a newline, no need for one here */ fprintf(stderr, "%s:%d:%d: unterminated string constant: %s\n", config, line, col - yyleng + 1, yytext); return TYPE_MALSTRING; } diff --git a/dgamelaunch.c b/dgamelaunch.c index 5e96776..98ce648 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -489,9 +489,9 @@ inprogressmenu () clear (); drawbanner (1, 1); mvprintw (3, 1, - "During playback, hit 'q' to return here, 'm' to send mail (requires login)"); + "During playback, hit 'q' to return here, 'm' to send mail (requires login),"); mvaddstr (4, 1, - "(Use capital letter of selection to strip DEC graphics, VERY experimental!)"); + "'s' to toggle graphic-set stripping for DEC, IBM, and none."); mvaddstr (5, 1, "The following games are in progress:"); /* clean old games and list good ones */ @@ -551,7 +551,7 @@ inprogressmenu () clear (); refresh (); endwin (); - ttyplay_main (ttyrecname, 1, 0); + ttyplay_main (ttyrecname, 1); initcurses (); } } diff --git a/ttyplay.c b/ttyplay.c index 29a7b20..b07cdc4 100644 --- a/ttyplay.c +++ b/ttyplay.c @@ -50,7 +50,7 @@ #include "stripgfx.h" off_t seek_offset_clrscr; -int bstripgfx; +int stripped = NO_GRAPHICS; struct timeval timeval_diff (struct timeval tv1, struct timeval tv2) @@ -161,7 +161,6 @@ ttypread (FILE * fp, Header * h, char **buf, int pread) int counter = 0; fd_set readfs; struct timeval zerotime; - static int stripped = NO_GRAPHICS; zerotime.tv_sec = 0; zerotime.tv_usec = 0; @@ -233,7 +232,8 @@ ttywrite (char *buf, int len) for (i = 0; i < len; i++) { - buf[i] = strip_gfx (buf[i]); + if (stripped != NO_GRAPHICS) + buf[i] = strip_gfx (buf[i]); } fwrite (buf, 1, len, stdout); @@ -390,7 +390,7 @@ ttypeek (FILE * fp, double speed) int -ttyplay_main (char *ttyfile, int mode, int rstripgfx) +ttyplay_main (char *ttyfile, int mode) { double speed = 1.0; ReadFunc read_func = ttyread; diff --git a/ttyplay.h b/ttyplay.h index 042f58a..1dd36e8 100644 --- a/ttyplay.h +++ b/ttyplay.h @@ -4,7 +4,7 @@ #include #include "ttyrec.h" -int ttyplay_main (char *ttyfile, int mode, int rstripgfx); +int ttyplay_main (char *ttyfile, int mode); typedef double (*WaitFunc) (struct timeval prev, struct timeval cur, double speed);