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 | |
655 | void |
656 | void |
|
|
657 | win32_proxy_info () |
|
|
658 | PPCODE: |
|
|
659 | { |
|
|
660 | #ifdef _WIN32 |
|
|
661 | INTERNET_PROXY_INFO proxyinfo; |
|
|
662 | char buffer[2048]; |
|
|
663 | DWORD buflen; |
|
|
664 | |
|
|
665 | EXTEND (SP, 3); |
|
|
666 | |
|
|
667 | buflen = sizeof (buffer); |
|
|
668 | if (InternetQueryOption (0, INTERNET_OPTION_PROXY, (void *)buffer, &buflen)) |
|
|
669 | if (((INTERNET_PROXY_INFO *)buffer)->dwAccessType == INTERNET_OPEN_TYPE_PROXY) |
|
|
670 | { |
|
|
671 | PUSHs (newSVpv (((INTERNET_PROXY_INFO *)buffer)->lpszProxy, 0)); |
|
|
672 | |
|
|
673 | buflen = sizeof (buffer); |
|
|
674 | if (InternetQueryOption (0, INTERNET_OPTION_PROXY_USERNAME, (void *)buffer, &buflen)) |
|
|
675 | { |
|
|
676 | PUSHs (newSVpv (buffer, 0)); |
|
|
677 | |
|
|
678 | buflen = sizeof (buffer); |
|
|
679 | if (InternetQueryOption (0, INTERNET_OPTION_PROXY_PASSWORD, (void *)buffer, &buflen)) |
|
|
680 | PUSHs (newSVpv (buffer, 0)); |
|
|
681 | } |
|
|
682 | } |
|
|
683 | #endif |
|
|
684 | } |
|
|
685 | |
|
|
686 | void |
656 | add_font (char *file) |
687 | add_font (char *file) |
657 | CODE: |
688 | CODE: |
658 | FcConfigAppFontAddFile (0, (const FcChar8 *)file); |
689 | FcConfigAppFontAddFile (0, (const FcChar8 *)file); |
659 | |
690 | |
660 | void |
691 | void |
… | |
… | |
1333 | } |
1364 | } |
1334 | while (ext & 0x80); |
1365 | while (ext & 0x80); |
1335 | } |
1366 | } |
1336 | else |
1367 | else |
1337 | cell->darkness = *data++ + 1; |
1368 | cell->darkness = *data++ + 1; |
1338 | |
|
|
1339 | } |
1369 | } |
1340 | |
1370 | |
1341 | if (flags & 4) |
1371 | if (flags & 4) |
1342 | { |
1372 | { |
1343 | cell->face [0] = self->face [(data [0] << 8) + data [1]]; data += 2; |
1373 | cell->face [0] = self->face [(data [0] << 8) + data [1]]; data += 2; |