/[ttyrec]/jsttyplay/ttydump.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /jsttyplay/ttydump.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations)
Tue Feb 17 18:12:32 2009 UTC (15 years, 2 months ago) by dpavlin
File MIME type: text/plain
File size: 396 byte(s)
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

Properties

Name Value
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.26