ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/remote-clipboard
(Generate patch)

Comparing rxvt-unicode/src/perl/remote-clipboard (file contents):
Revision 1.4 by root, Wed Jan 25 21:20:49 2006 UTC vs.
Revision 1.5 by root, Sun Nov 11 04:08:00 2007 UTC

38 if (my $pid = open my $fh, "|-:utf8", $self->{store_cmd}) { 38 if (my $pid = open my $fh, "|-:utf8", $self->{store_cmd}) {
39 fcntl $fh, &Fcntl::F_SETFL, &Fcntl::O_NONBLOCK; 39 fcntl $fh, &Fcntl::F_SETFL, &Fcntl::O_NONBLOCK;
40 $self->{iow} = urxvt::iow 40 $self->{iow} = urxvt::iow
41 ->new 41 ->new
42 ->fd (fileno $fh) 42 ->fd (fileno $fh)
43 ->events (urxvt::EVENT_WRITE) 43 ->events (urxvt::EV_WRITE)
44 ->start 44 ->start
45 ->cb (sub { 45 ->cb (sub {
46 if (my $len = syswrite $fh, $txt) { 46 if (my $len = syswrite $fh, $txt) {
47 substr $txt, 0, $len, ""; 47 substr $txt, 0, $len, "";
48 $self->msg ((length $txt) . " chars to go..."); 48 $self->msg ((length $txt) . " chars to go...");
63 if (my $pid = open my $fh, "-|:utf8", $self->{fetch_cmd}) { 63 if (my $pid = open my $fh, "-|:utf8", $self->{fetch_cmd}) {
64 fcntl $fh, &Fcntl::F_SETFL, &Fcntl::O_NONBLOCK; 64 fcntl $fh, &Fcntl::F_SETFL, &Fcntl::O_NONBLOCK;
65 $self->{iow} = urxvt::iow 65 $self->{iow} = urxvt::iow
66 ->new 66 ->new
67 ->fd (fileno $fh) 67 ->fd (fileno $fh)
68 ->events (urxvt::EVENT_READ) 68 ->events (urxvt::EV_READ)
69 ->start 69 ->start
70 ->cb (sub { 70 ->cb (sub {
71 if (my $len = sysread $fh, $txt, 8192, length $txt) { 71 if (my $len = sysread $fh, $txt, 8192, length $txt) {
72 $self->msg ((length $txt) . " chars read..."); 72 $self->msg ((length $txt) . " chars read...");
73 } else { 73 } else {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines