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

Comparing deliantra/Deliantra-Client/DC.pm (file contents):
Revision 1.140 by root, Fri Apr 6 07:45:33 2007 UTC vs.
Revision 1.154 by root, Sun Oct 14 20:08:38 2007 UTC

15package CFPlus; 15package CFPlus;
16 16
17use Carp (); 17use Carp ();
18 18
19BEGIN { 19BEGIN {
20 $VERSION = '0.97'; 20 $VERSION = '0.993';
21 21
22 use XSLoader; 22 use XSLoader;
23 XSLoader::load "CFPlus", $VERSION; 23 XSLoader::load "CFPlus", $VERSION;
24} 24}
25 25
27 27
28use AnyEvent (); 28use AnyEvent ();
29use Pod::POM (); 29use Pod::POM ();
30use File::Path (); 30use File::Path ();
31use Storable (); # finally 31use Storable (); # finally
32 32use Fcntl ();
33BEGIN { 33use JSON::XS qw(to_json from_json);
34 use Crossfire::Protocol::Base ();
35 *to_json = \&Crossfire::Protocol::Base::to_json;
36 *from_json = \&Crossfire::Protocol::Base::from_json;
37}
38 34
39=item guard { BLOCK } 35=item guard { BLOCK }
40 36
41Returns an object that executes the given block as soon as it is destroyed. 37Returns an object that executes the given block as soon as it is destroyed.
42 38
226 and die $res->status_line; 222 and die $res->status_line;
227 223
228 $res 224 $res
229} 225}
230 226
227sub fh_nonblocking($$) {
228 my ($fh, $nb) = @_;
229
230 if ($^O eq "MSWin32") {
231 $nb = (! ! $nb) + 0;
232 ioctl $fh, 0x8004667e, \$nb; # FIONBIO
233 } else {
234 fcntl $fh, &Fcntl::F_SETFL, $nb ? &Fcntl::O_NONBLOCK : 0;
235 }
236
237}
238
231package CFPlus::Layout; 239package CFPlus::Layout;
232 240
233$CFPlus::OpenGL::SHUTDOWN_HOOK{"CFPlus::Layout"} = sub { 241$CFPlus::OpenGL::SHUTDOWN_HOOK{"CFPlus::Layout"} = sub {
234 reset_glyph_cache; 242 reset_glyph_cache;
235}; 243};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines