| 1 | /* |
| 2 | * macstuff.h -- Mac-specific definitions visible to the rest of PuTTY. |
| 3 | */ |
| 4 | |
| 5 | typedef void *Context; /* FIXME */ |
| 6 | |
| 7 | #include <MacTypes.h> |
| 8 | #include <Files.h> |
| 9 | |
| 10 | #include <stdio.h> |
| 11 | #include "charset.h" |
| 12 | |
| 13 | struct Filename { |
| 14 | FSSpec fss; |
| 15 | }; |
| 16 | |
| 17 | extern FILE * f_open(struct Filename, char const *); |
| 18 | |
| 19 | /* Suspiciously similar to an ICFontRecord */ |
| 20 | struct FontSpec { |
| 21 | short size; |
| 22 | Style face; |
| 23 | char pad; |
| 24 | Str255 name; |
| 25 | }; |
| 26 | |
| 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 | |
| 34 | #include <MacTypes.h> |
| 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 |
| 44 | #define BYTE UInt8 |
| 45 | #define DWORD UInt32 |
| 46 | |
| 47 | #define OPTIMISE_SCROLL |
| 48 | |
| 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 |
| 52 | * it's necessary), so it's a macro which always returns NULL. |
| 53 | */ |
| 54 | #define sk_getxdmdata(socket, lenp) (NULL) |
| 55 | |
| 56 | /* To make it compile */ |
| 57 | |
| 58 | #include <stdarg.h> |
| 59 | extern int vsnprintf(char *, size_t, char const *, va_list); |
| 60 | |
| 61 | extern int stricmp(char const *, char const *); |
| 62 | extern int strnicmp(char const *, char const *, size_t); |
| 63 | |
| 64 | #define HELPCTX(foo) I(0) |
| 65 | |
| 66 | #define FILTER_KEY_FILES "pAgt.PPK" |
| 67 | |
| 68 | #define CP_UTF8 CS_UTF8 /* from libcharset */ |
| 69 | |