2002-11-19 02:13:46 +00:00
|
|
|
/*
|
|
|
|
* macstuff.h -- Mac-specific definitions visible to the rest of PuTTY.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef void *Context; /* FIXME */
|
|
|
|
|
2003-02-01 15:44:08 +00:00
|
|
|
#include <MacTypes.h>
|
|
|
|
#include <stdio.h> /* for FILENAME_MAX */
|
|
|
|
|
|
|
|
struct Filename {
|
|
|
|
char path[FILENAME_MAX];
|
|
|
|
};
|
|
|
|
#define f_open(filename, mode) ( fopen((filename).path, (mode)) )
|
|
|
|
|
|
|
|
/* Suspiciously similar to an ICFontRecord */
|
|
|
|
struct FontSpec {
|
|
|
|
short size;
|
|
|
|
Style face;
|
|
|
|
Str255 name;
|
|
|
|
};
|
|
|
|
|
2002-11-19 02:13:46 +00:00
|
|
|
/*
|
|
|
|
* On the Mac, Unicode text copied to the clipboard has U+2028 line separators.
|
|
|
|
* Non-Unicode text will have these converted to CR along with the rest of the
|
|
|
|
* content.
|
|
|
|
*/
|
|
|
|
#define SEL_NL { 0x2028 }
|
|
|
|
|
2003-01-05 10:52:56 +00:00
|
|
|
#include <MacTypes.h>
|
2002-11-19 02:13:46 +00:00
|
|
|
#include <Events.h> /* Timing related goo */
|
|
|
|
|
|
|
|
#define GETTICKCOUNT TickCount
|
|
|
|
#define CURSORBLINK GetCaretTime()
|
|
|
|
#define TICKSPERSEC 60
|
|
|
|
|
|
|
|
#define DEFAULT_CODEPAGE 0 /* FIXME: no idea how to do this */
|
|
|
|
|
|
|
|
#define WCHAR wchar_t
|
2003-01-05 10:52:56 +00:00
|
|
|
#define BYTE UInt8
|
|
|
|
#define DWORD UInt32
|
2002-11-19 02:13:46 +00:00
|
|
|
|
2002-11-23 13:07:29 +00:00
|
|
|
#define OPTIMISE_SCROLL
|
|
|
|
|
2003-01-11 09:31:54 +00:00
|
|
|
/*
|
|
|
|
* sk_getxdmdata() does not exist under the Mac (SGT: I have no
|
|
|
|
* idea whatsoever how to write it, and furthermore I'm unconvinced
|
|
|
|
* it's necessary), so it's a macro which always returns FALSE.
|
|
|
|
*/
|
|
|
|
#define sk_getxdmdata(socket, ip, port) (0)
|
|
|
|
|
2002-11-19 02:13:46 +00:00
|
|
|
/* To make it compile */
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
extern int vsnprintf(char *, size_t, char const *, va_list);
|
2003-01-05 10:52:56 +00:00
|
|
|
|
|
|
|
extern int stricmp(char const *, char const *);
|
|
|
|
extern int strnicmp(char const *, char const *, size_t);
|