… | |
… | |
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 | # include <wininet.h> |
7 | # pragma warning(disable:4244) |
7 | # pragma warning(disable:4244) |
|
|
8 | # pragma warning(disable:4761) |
8 | #endif |
9 | #endif |
9 | |
10 | |
10 | #include "EXTERN.h" |
11 | #include "EXTERN.h" |
11 | #include "perl.h" |
12 | #include "perl.h" |
12 | #include "XSUB.h" |
13 | #include "XSUB.h" |
… | |
… | |
37 | # include <sys/types.h> |
38 | # include <sys/types.h> |
38 | # include <sys/socket.h> |
39 | # include <sys/socket.h> |
39 | # include <netinet/in.h> |
40 | # include <netinet/in.h> |
40 | # include <netinet/tcp.h> |
41 | # include <netinet/tcp.h> |
41 | # include <inttypes.h> |
42 | # include <inttypes.h> |
42 | #else |
|
|
43 | typedef unsigned char uint8_t; |
|
|
44 | typedef unsigned short uint16_t; |
|
|
45 | typedef unsigned int uint32_t; |
|
|
46 | typedef signed char int8_t; |
|
|
47 | typedef signed short int16_t; |
|
|
48 | typedef signed int int32_t; |
|
|
49 | #endif |
43 | #endif |
50 | |
44 | |
51 | #define OBJ_STR "\xef\xbf\xbc" /* U+FFFC, objetc replacement character */ |
45 | #define OBJ_STR "\xef\xbf\xbc" /* U+FFFC, object replacement character */ |
52 | |
46 | |
53 | #define FOW_DARKNESS 32 |
47 | #define FOW_DARKNESS 32 |
54 | |
48 | |
55 | #define MAP_EXTEND_X 32 |
49 | #define MAP_EXTEND_X 32 |
56 | #define MAP_EXTEND_Y 512 |
50 | #define MAP_EXTEND_Y 512 |
… | |
… | |
656 | void |
650 | void |
657 | win32_proxy_info () |
651 | win32_proxy_info () |
658 | PPCODE: |
652 | PPCODE: |
659 | { |
653 | { |
660 | #ifdef _WIN32 |
654 | #ifdef _WIN32 |
661 | INTERNET_PROXY_INFO proxyinfo; |
|
|
662 | char buffer[2048]; |
655 | char buffer[2048]; |
663 | DWORD buflen; |
656 | DWORD buflen; |
664 | |
657 | |
665 | EXTEND (SP, 3); |
658 | EXTEND (SP, 3); |
666 | |
659 | |
… | |
… | |
793 | MessageBox (0, message, "Crossfire+ Fatal Error", MB_OK | MB_ICONERROR); |
786 | MessageBox (0, message, "Crossfire+ Fatal Error", MB_OK | MB_ICONERROR); |
794 | #endif |
787 | #endif |
795 | _exit (1); |
788 | _exit (1); |
796 | |
789 | |
797 | void |
790 | void |
798 | _exit (int retval) |
791 | _exit (int retval = 0) |
799 | CODE: |
792 | CODE: |
|
|
793 | #ifdef WIN32 |
|
|
794 | ExitThread (retval); // unclean, please beam me up |
|
|
795 | #else |
800 | _exit (retval); |
796 | _exit (retval); |
|
|
797 | #endif |
801 | |
798 | |
802 | MODULE = CFPlus PACKAGE = CFPlus::Font |
799 | MODULE = CFPlus PACKAGE = CFPlus::Font |
803 | |
800 | |
804 | CFPlus::Font |
801 | CFPlus::Font |
805 | new_from_file (SV *class, char *path, int id = 0) |
802 | new_from_file (SV *class, char *path, int id = 0) |