Patch from Alejandro Sedeno, somewhat modified by me, which
[u/mdw/putty] / mac / macstuff.h
CommitLineData
d082ac49 1/*
2 * macstuff.h -- Mac-specific definitions visible to the rest of PuTTY.
3 */
4
5typedef 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
13struct Filename {
02cf4001 14 FSSpec fss;
e3c5b245 15};
02cf4001 16
c6940f12 17extern FILE * f_open(struct Filename, char const *, int);
e3c5b245 18
19/* Suspiciously similar to an ICFontRecord */
20struct 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
b3d375b2 47typedef UInt32 uint32;
48#define PUTTY_UINT32_DEFINED
49
37d2a505 50#define OPTIMISE_SCROLL
51
2f92b717 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
0a4022a1 55 * it's necessary), so it's a macro which always returns NULL.
2f92b717 56 */
0a4022a1 57#define sk_getxdmdata(socket, lenp) (NULL)
2f92b717 58
d082ac49 59/* To make it compile */
60
61#include <stdarg.h>
62extern int vsnprintf(char *, size_t, char const *, va_list);
2beb0fb0 63
64extern int stricmp(char const *, char const *);
65extern int strnicmp(char const *, char const *, size_t);
8a7e67ec 66
67#define HELPCTX(foo) I(0)
68
69#define FILTER_KEY_FILES "pAgt.PPK"
76a3e871 70
71#define CP_UTF8 CS_UTF8 /* from libcharset */
72