ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/bin/igsueme
(Generate patch)

Comparing kgsueme/bin/igsueme (file contents):
Revision 1.3 by root, Tue Jun 21 10:36:47 2005 UTC vs.
Revision 1.4 by root, Sun Jul 3 19:35:15 2005 UTC

113my %games; 113my %games;
114 114
115my @timers; 115my @timers;
116 116
117my %alphmap = ( 117my %alphmap = (
118 A => 1, 118 A => 1, B => 2, C => 3, D => 4,
119 B => 2, 119 E => 5, F => 6, G => 7, H => 8,
120 C => 3, 120
121 D => 4, 121 J => 9, K => 10, L => 11, M => 12,
122 E => 5, 122 N => 13, O => 14, P => 15, Q => 16,
123 F => 6, 123 R => 17, S => 18, T => 19, U => 20,
124 G => 7,
125 H => 8,
126 J => 9,
127 K => 10,
128 L => 11,
129 M => 12,
130 N => 13,
131 O => 14,
132 P => 15,
133 Q => 16,
134 R => 17,
135 S => 18,
136 T => 19,
137 U => 20,
138 V => 21, 124 V => 21, W => 22,
139 W => 22,
140); 125);
141 126
142sub dump($) { 127sub dump($) {
143 print Data::Dumper::Dumper ([$_[0]]); 128 print Data::Dumper::Dumper ([$_[0]]);
144} 129}
338}); 323});
339 324
340Gtk2::Helper->add_watch (fileno($sck), 'in', sub { 325Gtk2::Helper->add_watch (fileno($sck), 'in', sub {
341 my $data; 326 my $data;
342 327
343 my $r = $sck->sysread ($data, 4096); 328 my $r = $sck->sysread (my $data, 4096);
344 329
345 if (not $r) { 330 if (not $r) {
346 # check $r == 0 or undef # FIXME 331 # check $r == 0 or undef # FIXME
347 die "eof from server"; 332 die "eof from server";
348 } 333 }
349 334
350 $buffer .= $data;
351 $igs->feed_data (\$buffer); 335 $igs->feed_data ($data);
352 336
353 1; 337 1;
354}); 338});
355 339
356build_ui ($igs); 340build_ui ($igs);
357 341
358Gtk2->main; 342Gtk2->main;
343

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines