Parent Directory | Revision Log
import upstream from http://encryptio.com/code/jsttyplay
1 | #!/usr/bin/perl |
2 | use warnings; |
3 | use strict; |
4 | |
5 | open my $lf, "<", $ARGV[0] or die "Couldn't open $ARGV[0] for reading: $!"; |
6 | |
7 | while ( read $lf, my($buf), 12 ) { |
8 | my ($time, $ftime, $len) = unpack "VVV", $buf; |
9 | read $lf, my($contents), $len; |
10 | $contents =~ s/((?!\\)[^[:print:] \n])/"\\x{".unpack("H*", $1)."}"/egs; |
11 | $time += $ftime / 1_000_000; |
12 | printf "%.4f: %s\n", $time, $contents; |
13 | } |
14 |
Name | Value |
---|---|
svn:executable |
ViewVC Help | |
Powered by ViewVC 1.1.26 |