1 | #ifdef _WIN32 |
1 | #ifdef _WIN32 |
2 | long _ftol (double); /* defined by VC6 C libs */ |
|
|
3 | long _ftol2 (double dblSource) { return _ftol (dblSource); } |
|
|
4 | # define WIN32_LEAN_AND_MEAN |
2 | # define WIN32_LEAN_AND_MEAN |
5 | # define _WIN32_WINNT 0x0500 // needed to get win2000 api calls |
3 | # define _WIN32_WINNT 0x0500 // needed to get win2000 api calls |
6 | # include <malloc.h> |
4 | # include <malloc.h> |
7 | # include <windows.h> |
5 | # include <windows.h> |
8 | # include <wininet.h> |
6 | # include <wininet.h> |
9 | # pragma warning(disable:4244) |
7 | # pragma warning(disable:4244) |
|
|
8 | # pragma warning(disable:4761) |
10 | #endif |
9 | #endif |
11 | |
10 | |
12 | #include "EXTERN.h" |
11 | #include "EXTERN.h" |
13 | #include "perl.h" |
12 | #include "perl.h" |
14 | #include "XSUB.h" |
13 | #include "XSUB.h" |
… | |
… | |
39 | # include <sys/types.h> |
38 | # include <sys/types.h> |
40 | # include <sys/socket.h> |
39 | # include <sys/socket.h> |
41 | # include <netinet/in.h> |
40 | # include <netinet/in.h> |
42 | # include <netinet/tcp.h> |
41 | # include <netinet/tcp.h> |
43 | # include <inttypes.h> |
42 | # include <inttypes.h> |
44 | #else |
|
|
45 | typedef unsigned char uint8_t; |
|
|
46 | typedef unsigned short uint16_t; |
|
|
47 | typedef unsigned int uint32_t; |
|
|
48 | typedef signed char int8_t; |
|
|
49 | typedef signed short int16_t; |
|
|
50 | typedef signed int int32_t; |
|
|
51 | #endif |
43 | #endif |
52 | |
44 | |
53 | #define OBJ_STR "\xef\xbf\xbc" /* U+FFFC, objetc replacement character */ |
45 | #define OBJ_STR "\xef\xbf\xbc" /* U+FFFC, object replacement character */ |
54 | |
46 | |
55 | #define FOW_DARKNESS 32 |
47 | #define FOW_DARKNESS 32 |
56 | |
48 | |
57 | #define MAP_EXTEND_X 32 |
49 | #define MAP_EXTEND_X 32 |
58 | #define MAP_EXTEND_Y 512 |
50 | #define MAP_EXTEND_Y 512 |
… | |
… | |
796 | _exit (1); |
788 | _exit (1); |
797 | |
789 | |
798 | void |
790 | void |
799 | _exit (int retval = 0) |
791 | _exit (int retval = 0) |
800 | CODE: |
792 | CODE: |
|
|
793 | #ifdef WIN32 |
|
|
794 | ExitThread (retval); // unclean, please beam me up |
|
|
795 | #else |
801 | _exit (retval); |
796 | _exit (retval); |
|
|
797 | #endif |
802 | |
798 | |
803 | MODULE = CFPlus PACKAGE = CFPlus::Font |
799 | MODULE = CFPlus PACKAGE = CFPlus::Font |
804 | |
800 | |
805 | CFPlus::Font |
801 | CFPlus::Font |
806 | new_from_file (SV *class, char *path, int id = 0) |
802 | new_from_file (SV *class, char *path, int id = 0) |