ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/MapWidget.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/MapWidget.pm (file contents):
Revision 1.87 by root, Sun Oct 8 21:57:54 2006 UTC vs.
Revision 1.88 by root, Mon Oct 9 01:06:36 2006 UTC

80 80
81sub editor_invoke { 81sub editor_invoke {
82 my $editsup = $::CONN && $::CONN->{editor_support} 82 my $editsup = $::CONN && $::CONN->{editor_support}
83 or return; 83 or return;
84 84
85 my ($pid, $fh); 85 CFPlus::background {
86 unless ($pid = open $fh, "-|:utf8", "-") {
87 $SIG{__DIE__} = sub {
88 my $msg = $_[0];
89 $msg =~ s/\n+/\n/;
90 warn "FATAL: $msg";
91 CFPlus::_exit 99;
92 };
93
94 open STDERR, ">&STDOUT";
95 binmode STDOUT, ":utf8";
96 binmode STDERR, ":utf8";
97 close $fh;
98
99 $| = 1;
100 print "preparing editor startup...\n"; 86 print "preparing editor startup...\n";
101 CFPlus::set_proxy; 87 CFPlus::set_proxy;
102 88
103 my $server = $editsup->{gameserver} || "default"; 89 my $server = $editsup->{gameserver} || "default";
104 $server =~ s/([^a-zA-Z0-9_\-])/sprintf "=%x=", ord $1/ge; 90 $server =~ s/([^a-zA-Z0-9_\-])/sprintf "=%x=", ord $1/ge;
197# } 183# }
198 } else { 184 } else {
199 die "viewvc parse error, unable to detect revision\n"; 185 die "viewvc parse error, unable to detect revision\n";
200 } 186 }
201 } 187 }
202
203 CFPlus::_exit;
204 }
205
206 my $buffer;
207
208 Event->io (fd => $fh, poll => 'r', cb => sub {
209 unless (sysread $fh, $buffer, 4096, length $buffer) {
210 $_[0]->w->cancel;
211 $buffer .= "done\n";
212 }
213
214 while ($buffer =~ s/^(.*)\n//) {
215 ::message ({
216 markup => "editor($pid): " . CFPlus::asxml $1,
217 });
218 }
219 }); 188 }
220} 189}
221 190
222sub invoke_button_down { 191sub invoke_button_down {
223 my ($self, $ev, $x, $y) = @_; 192 my ($self, $ev, $x, $y) = @_;
224 193

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines