d082ac49 |
1 | /* |
2 | * macstuff.h -- Mac-specific definitions visible to the rest of PuTTY. |
3 | */ |
4 | |
5 | typedef void *Context; /* FIXME */ |
6 | |
e3c5b245 |
7 | #include <MacTypes.h> |
02cf4001 |
8 | #include <Files.h> |
9 | |
10 | #include <stdio.h> |
e3c5b245 |
11 | |
12 | struct Filename { |
02cf4001 |
13 | FSSpec fss; |
e3c5b245 |
14 | }; |
02cf4001 |
15 | |
16 | extern FILE * f_open(struct Filename, char const *); |
e3c5b245 |
17 | |
18 | /* Suspiciously similar to an ICFontRecord */ |
19 | struct FontSpec { |
20 | short size; |
21 | Style face; |
02cf4001 |
22 | char pad; |
e3c5b245 |
23 | Str255 name; |
24 | }; |
25 | |
d082ac49 |
26 | /* |
27 | * On the Mac, Unicode text copied to the clipboard has U+2028 line separators. |
28 | * Non-Unicode text will have these converted to CR along with the rest of the |
29 | * content. |
30 | */ |
31 | #define SEL_NL { 0x2028 } |
32 | |
2beb0fb0 |
33 | #include <MacTypes.h> |
d082ac49 |
34 | #include <Events.h> /* Timing related goo */ |
35 | |
36 | #define GETTICKCOUNT TickCount |
37 | #define CURSORBLINK GetCaretTime() |
38 | #define TICKSPERSEC 60 |
39 | |
40 | #define DEFAULT_CODEPAGE 0 /* FIXME: no idea how to do this */ |
41 | |
42 | #define WCHAR wchar_t |
2beb0fb0 |
43 | #define BYTE UInt8 |
44 | #define DWORD UInt32 |
d082ac49 |
45 | |
37d2a505 |
46 | #define OPTIMISE_SCROLL |
47 | |
2f92b717 |
48 | /* |
49 | * sk_getxdmdata() does not exist under the Mac (SGT: I have no |
50 | * idea whatsoever how to write it, and furthermore I'm unconvinced |
51 | * it's necessary), so it's a macro which always returns FALSE. |
52 | */ |
53 | #define sk_getxdmdata(socket, ip, port) (0) |
54 | |
d082ac49 |
55 | /* To make it compile */ |
56 | |
57 | #include <stdarg.h> |
58 | extern int vsnprintf(char *, size_t, char const *, va_list); |
2beb0fb0 |
59 | |
60 | extern int stricmp(char const *, char const *); |
61 | extern int strnicmp(char const *, char const *, size_t); |