diff options
author | Karel Zak | 2006-12-07 00:26:16 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:26:16 +0100 |
commit | c129767e063c5c9839cc9d94c34fd88dac3fb9a6 (patch) | |
tree | 13dd85577b43ec1be3cf51a8d913282c2a92259c /misc-utils | |
parent | Imported from util-linux-2.12a tarball. (diff) | |
download | kernel-qcow2-util-linux-c129767e063c5c9839cc9d94c34fd88dac3fb9a6.tar.gz kernel-qcow2-util-linux-c129767e063c5c9839cc9d94c34fd88dac3fb9a6.tar.xz kernel-qcow2-util-linux-c129767e063c5c9839cc9d94c34fd88dac3fb9a6.zip |
Imported from util-linux-2.12b tarball.
Diffstat (limited to 'misc-utils')
-rw-r--r-- | misc-utils/Makefile | 2 | ||||
-rw-r--r-- | misc-utils/rename.1 | 1 | ||||
-rw-r--r-- | misc-utils/script.1 | 2 | ||||
-rw-r--r-- | misc-utils/script.c | 10 | ||||
-rw-r--r-- | misc-utils/scriptreplay.1 (renamed from misc-utils/replay.1) | 6 | ||||
-rwxr-xr-x | misc-utils/scriptreplay.pl (renamed from misc-utils/replay.pl) | 14 |
6 files changed, 23 insertions, 12 deletions
diff --git a/misc-utils/Makefile b/misc-utils/Makefile index 73e03a60e..6fb38c72b 100644 --- a/misc-utils/Makefile +++ b/misc-utils/Makefile @@ -7,7 +7,7 @@ include ../make_include include ../MCONFIG -# replay not added yet +# scriptreplay not added yet # Where to put man pages? diff --git a/misc-utils/rename.1 b/misc-utils/rename.1 index 9c1a5d9f0..cbd7e974c 100644 --- a/misc-utils/rename.1 +++ b/misc-utils/rename.1 @@ -37,4 +37,5 @@ rename .htm .html *.htm will fix the extension of your html files. .SH "SEE ALSO" +.BR mmv (1), .BR mv (1) diff --git a/misc-utils/script.1 b/misc-utils/script.1 index b8e543773..cdd6af0ec 100644 --- a/misc-utils/script.1 +++ b/misc-utils/script.1 @@ -130,7 +130,7 @@ is assumed. (Most shells set this variable automatically). (for the .Em history mechanism), -.Xr replay 1 . +.Xr scriptreplay 1 . .Sh HISTORY The .Nm script diff --git a/misc-utils/script.c b/misc-utils/script.c index fc913f431..81747a619 100644 --- a/misc-utils/script.c +++ b/misc-utils/script.c @@ -113,6 +113,15 @@ die_if_link(char *fn) { } } +/* + * script -t prints time delays as floating point numbers + * The example program (scriptreplay) that we provide to handle this + * timing output is a perl script, and does not handle numbers in + * locale format (not even when "use locale;" is added). + * So, since these numbers are not for human consumption, it seems + * easiest to set LC_NUMERIC here. + */ + int main(int argc, char **argv) { extern int optind; @@ -125,6 +134,7 @@ main(int argc, char **argv) { setlocale(LC_ALL, ""); + setlocale(LC_NUMERIC, "C"); /* see comment above */ bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); diff --git a/misc-utils/replay.1 b/misc-utils/scriptreplay.1 index 52d82c250..7a4953909 100644 --- a/misc-utils/replay.1 +++ b/misc-utils/scriptreplay.1 @@ -141,10 +141,10 @@ .TH REPLAY 1 "perl v5.6.0" "2001-09-03" "User Contributed Perl Documentation" .UC .SH "NAME" -replay \- play back typescripts, using timing information +scriptreplay \- play back typescripts, using timing information .SH "SYNOPSIS" .IX Header "SYNOPSIS" -replay timingfile [typescript [divisor]] +scriptreplay timingfile [typescript [divisor]] .SH "DESCRIPTION" .IX Header "DESCRIPTION" This program replays a typescript, using timing information to ensure that @@ -169,7 +169,7 @@ specifying a divisor of 2 makes the script be replayed twice as fast. \& <etc, etc> \& % exit \& Script done, file is typescript -\& % replay timingfile +\& % scriptreplay timingfile .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" diff --git a/misc-utils/replay.pl b/misc-utils/scriptreplay.pl index 416dc6019..ea72b1f3e 100755 --- a/misc-utils/replay.pl +++ b/misc-utils/scriptreplay.pl @@ -1,16 +1,16 @@ #!/usr/bin/perl -w # "script -t" will output a typescript with timings -# this script "replay" replays it +# this script "scriptreplay" replays it # run pod2man on it to get a man page =head1 NAME -replay - play back typescripts, using timing information +scriptreplay - play back typescripts, using timing information =head1 SYNOPSIS -replay timingfile [typescript [divisor]] +scriptreplay timingfile [typescript [divisor]] =head1 DESCRIPTION @@ -36,7 +36,7 @@ specifying a divisor of 2 makes the script be replayed twice as fast. <etc, etc> % exit Script done, file is typescript - % replay timingfile + % scriptreplay timingfile =cut @@ -45,7 +45,7 @@ $|=1; open (TIMING, shift) or die "cannot read timing info: $!"; open (TYPESCRIPT, shift || 'typescript') - or die "cannot read typescriot: $!"; + or die "cannot read typescript: $!"; my $divisor=shift || 1; # Read starting timestamp line and ignore. @@ -55,7 +55,7 @@ my $block; my $oldblock=''; while (<TIMING>) { my ($delay, $blocksize)=split ' ', $_, 2; - # Sleep, unless the delay is really tiny. Realy tiny delays cannot + # Sleep, unless the delay is really tiny. Really tiny delays cannot # be accurately done, because the system calls in this loop will # have more overhead. The 0.0001 is arbitrary, but works fairly well. if ($delay / $divisor > 0.0001) { @@ -63,7 +63,7 @@ while (<TIMING>) { } read(TYPESCRIPT, $block, $blocksize) - or die "read filure on typescript: $!"; + or die "read failure on typescript: $!"; print $oldblock; $oldblock=$block; } |