In xlatlognam(), use the start of the destination buffer as the destination
[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>
8#include <stdio.h> /* for FILENAME_MAX */
9
10struct Filename {
11 char path[FILENAME_MAX];
12};
13#define f_open(filename, mode) ( fopen((filename).path, (mode)) )
14
15/* Suspiciously similar to an ICFontRecord */
16struct FontSpec {
17 short size;
18 Style face;
19 Str255 name;
20};
21
d082ac49 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
2beb0fb0 29#include <MacTypes.h>
d082ac49 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
2beb0fb0 39#define BYTE UInt8
40#define DWORD UInt32
d082ac49 41
37d2a505 42#define OPTIMISE_SCROLL
43
2f92b717 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
d082ac49 51/* To make it compile */
52
53#include <stdarg.h>
54extern int vsnprintf(char *, size_t, char const *, va_list);
2beb0fb0 55
56extern int stricmp(char const *, char const *);
57extern int strnicmp(char const *, char const *, size_t);