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> |
76a3e871 |
11 | #include "charset.h" |
e3c5b245 |
12 | |
13 | struct Filename { |
02cf4001 |
14 | FSSpec fss; |
e3c5b245 |
15 | }; |
02cf4001 |
16 | |
c6940f12 |
17 | extern FILE * f_open(struct Filename, char const *, int); |
e3c5b245 |
18 | |
19 | /* Suspiciously similar to an ICFontRecord */ |
20 | struct FontSpec { |
21 | short size; |
22 | Style face; |
02cf4001 |
23 | char pad; |
e3c5b245 |
24 | Str255 name; |
25 | }; |
26 | |
d082ac49 |
27 | /* |
28 | * On the Mac, Unicode text copied to the clipboard has U+2028 line separators. |
29 | * Non-Unicode text will have these converted to CR along with the rest of the |
30 | * content. |
31 | */ |
32 | #define SEL_NL { 0x2028 } |
33 | |
2beb0fb0 |
34 | #include <MacTypes.h> |
d082ac49 |
35 | #include <Events.h> /* Timing related goo */ |
36 | |
37 | #define GETTICKCOUNT TickCount |
38 | #define CURSORBLINK GetCaretTime() |
39 | #define TICKSPERSEC 60 |
40 | |
41 | #define DEFAULT_CODEPAGE 0 /* FIXME: no idea how to do this */ |
42 | |
43 | #define WCHAR wchar_t |
2beb0fb0 |
44 | #define BYTE UInt8 |
45 | #define DWORD UInt32 |
d082ac49 |
46 | |
37d2a505 |
47 | #define OPTIMISE_SCROLL |
48 | |
2f92b717 |
49 | /* |
50 | * sk_getxdmdata() does not exist under the Mac (SGT: I have no |
51 | * idea whatsoever how to write it, and furthermore I'm unconvinced |
0a4022a1 |
52 | * it's necessary), so it's a macro which always returns NULL. |
2f92b717 |
53 | */ |
0a4022a1 |
54 | #define sk_getxdmdata(socket, lenp) (NULL) |
2f92b717 |
55 | |
d082ac49 |
56 | /* To make it compile */ |
57 | |
58 | #include <stdarg.h> |
59 | extern int vsnprintf(char *, size_t, char const *, va_list); |
2beb0fb0 |
60 | |
61 | extern int stricmp(char const *, char const *); |
62 | extern int strnicmp(char const *, char const *, size_t); |
8a7e67ec |
63 | |
64 | #define HELPCTX(foo) I(0) |
65 | |
66 | #define FILTER_KEY_FILES "pAgt.PPK" |
76a3e871 |
67 | |
68 | #define CP_UTF8 CS_UTF8 /* from libcharset */ |
69 | |