Reproduction steps:
1. Run "script -t 2>timing".
2. When the prompt comes up, hit return.
3. New prompt. Wait several seconds, then type "true" and hit return.
4. Repeat (3) as desired, then exit scripted shell.
5. Run "scriptreplay timing".
You'll find on the replay that, rather than waiting several seconds
between the prompt and true, the wait will actually occur after the
first "t" of true.
Reported-by: Micah Cowan <micah@cowan.name>
Signed-off-by: Karel Zak <kzak@redhat.com>
double divi;
int c;
unsigned long line;
+ size_t oldblk = 0;
/* Because we use space as a separator, we can't afford to use any
* locale which tolerates a space in a number. In any case, script.c
if (delay > SCRIPT_MIN_DELAY)
delay_for(delay);
- emit(sfile, sname, blk);
+ if (oldblk)
+ emit(sfile, sname, oldblk);
+ oldblk = blk;
}
fclose(sfile);