]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - mac/macstuff.h
Patch from Alejandro Sedeno, somewhat modified by me, which
[PuTTY.git] / mac / macstuff.h
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 *, int);
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 typedef UInt32 uint32;
48 #define PUTTY_UINT32_DEFINED
49
50 #define OPTIMISE_SCROLL
51
52 /*
53  * sk_getxdmdata() does not exist under the Mac (SGT: I have no
54  * idea whatsoever how to write it, and furthermore I'm unconvinced
55  * it's necessary), so it's a macro which always returns NULL.
56  */
57 #define sk_getxdmdata(socket, lenp) (NULL)
58
59 /* To make it compile */
60
61 #include <stdarg.h>
62 extern int vsnprintf(char *, size_t, char const *, va_list);
63
64 extern int stricmp(char const *, char const *);
65 extern int strnicmp(char const *, char const *, size_t);
66
67 #define HELPCTX(foo) I(0)
68
69 #define FILTER_KEY_FILES "pAgt.PPK"
70
71 #define CP_UTF8 CS_UTF8                /* from libcharset */
72