]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - mac/macstuff.h
1193e005559e2faee4832943854e17138d029bf7
[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 <stdio.h>                     /* for FILENAME_MAX */
9
10 struct Filename {
11     char path[FILENAME_MAX];
12 };
13 #define f_open(filename, mode) ( fopen((filename).path, (mode)) )
14
15 /* Suspiciously similar to an ICFontRecord */
16 struct FontSpec {
17     short size;
18     Style face;
19     Str255 name;
20 };
21
22 /*
23  * On the Mac, Unicode text copied to the clipboard has U+2028 line separators.
24  * Non-Unicode text will have these converted to CR along with the rest of the
25  * content.
26  */
27 #define SEL_NL { 0x2028 }
28
29 #include <MacTypes.h>
30 #include <Events.h> /* Timing related goo */
31
32 #define GETTICKCOUNT TickCount
33 #define CURSORBLINK GetCaretTime()
34 #define TICKSPERSEC 60
35
36 #define DEFAULT_CODEPAGE 0             /* FIXME: no idea how to do this */
37
38 #define WCHAR wchar_t
39 #define BYTE UInt8
40 #define DWORD UInt32
41
42 #define OPTIMISE_SCROLL
43
44 /*
45  * sk_getxdmdata() does not exist under the Mac (SGT: I have no
46  * idea whatsoever how to write it, and furthermore I'm unconvinced
47  * it's necessary), so it's a macro which always returns FALSE.
48  */
49 #define sk_getxdmdata(socket, ip, port) (0)
50
51 /* To make it compile */
52
53 #include <stdarg.h>
54 extern int vsnprintf(char *, size_t, char const *, va_list);
55
56 extern int stricmp(char const *, char const *);
57 extern int strnicmp(char const *, char const *, size_t);