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

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.155 by root, Thu Sep 21 00:16:42 2006 UTC vs.
Revision 1.159 by root, Sun Oct 8 21:22:29 2006 UTC

1#ifdef _WIN32 1#ifdef _WIN32
2# define WIN32_LEAN_AND_MEAN 2# define WIN32_LEAN_AND_MEAN
3# define _WIN32_WINNT 0x0500 // needed to get win2000 api calls 3# define _WIN32_WINNT 0x0500 // needed to get win2000 api calls
4# include <malloc.h> 4# include <malloc.h>
5# include <windows.h> 5# include <windows.h>
6# include <wininet.h>
6# pragma warning(disable:4244) 7# pragma warning(disable:4244)
7#endif 8#endif
8 9
9#include "EXTERN.h" 10#include "EXTERN.h"
10#include "perl.h" 11#include "perl.h"
651#ifndef _WIN32 652#ifndef _WIN32
652 setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof (val)); 653 setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof (val));
653#endif 654#endif
654 655
655void 656void
657win32_proxy_info ()
658 PPCODE:
659{
660#ifdef _WIN32
661 char buffer[2048];
662 DWORD buflen;
663
664 EXTEND (SP, 3);
665
666 buflen = sizeof (buffer);
667 if (InternetQueryOption (0, INTERNET_OPTION_PROXY, (void *)buffer, &buflen))
668 if (((INTERNET_PROXY_INFO *)buffer)->dwAccessType == INTERNET_OPEN_TYPE_PROXY)
669 {
670 PUSHs (newSVpv (((INTERNET_PROXY_INFO *)buffer)->lpszProxy, 0));
671
672 buflen = sizeof (buffer);
673 if (InternetQueryOption (0, INTERNET_OPTION_PROXY_USERNAME, (void *)buffer, &buflen))
674 {
675 PUSHs (newSVpv (buffer, 0));
676
677 buflen = sizeof (buffer);
678 if (InternetQueryOption (0, INTERNET_OPTION_PROXY_PASSWORD, (void *)buffer, &buflen))
679 PUSHs (newSVpv (buffer, 0));
680 }
681 }
682#endif
683}
684
685void
656add_font (char *file) 686add_font (char *file)
657 CODE: 687 CODE:
658 FcConfigAppFontAddFile (0, (const FcChar8 *)file); 688 FcConfigAppFontAddFile (0, (const FcChar8 *)file);
659 689
660void 690void
762 MessageBox (0, message, "Crossfire+ Fatal Error", MB_OK | MB_ICONERROR); 792 MessageBox (0, message, "Crossfire+ Fatal Error", MB_OK | MB_ICONERROR);
763#endif 793#endif
764 _exit (1); 794 _exit (1);
765 795
766void 796void
767_exit (int retval) 797_exit (int retval = 0)
768 CODE: 798 CODE:
769 _exit (retval); 799 _exit (retval);
770 800
771MODULE = CFPlus PACKAGE = CFPlus::Font 801MODULE = CFPlus PACKAGE = CFPlus::Font
772 802
1333 } 1363 }
1334 while (ext & 0x80); 1364 while (ext & 0x80);
1335 } 1365 }
1336 else 1366 else
1337 cell->darkness = *data++ + 1; 1367 cell->darkness = *data++ + 1;
1338
1339 } 1368 }
1340 1369
1341 if (flags & 4) 1370 if (flags & 4)
1342 { 1371 {
1343 cell->face [0] = self->face [(data [0] << 8) + data [1]]; data += 2; 1372 cell->face [0] = self->face [(data [0] << 8) + data [1]]; data += 2;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines