Oops. Defining max() the wrong way round was breaking rect select.
[sgt/putty] / unix / unix.h
CommitLineData
f7f27309 1#ifndef PUTTY_UNIX_H
2#define PUTTY_UNIX_H
3
4typedef void *Context; /* FIXME: probably needs changing */
5
1709795f 6extern Backend pty_backend;
7
e6346999 8/*
9 * Under GTK, we send MA_CLICK _and_ MA_2CLK, or MA_CLICK _and_
10 * MA_3CLK, when a button is pressed for the second or third time.
11 */
12#define MULTICLICK_ONLY_EVENT 0
13
14/*
15 * Under X, selection data must not be NUL-terminated.
16 */
17#define SELECTION_NUL_TERMINATED 0
18
f7f27309 19/* Simple wraparound timer function */
20unsigned long getticks(void); /* based on gettimeofday(2) */
21#define GETTICKCOUNT getticks
22#define TICKSPERSEC 1000000 /* gettimeofday returns microseconds */
23#define CURSORBLINK 400000 /* FIXME: need right way to do this */
24
25#define WCHAR wchar_t
26#define BYTE unsigned char
27
1709795f 28int is_dbcs_leadbyte(int codepage, char byte);
29int mb_to_wc(int codepage, int flags, char *mbstr, int mblen,
30 wchar_t *wcstr, int wclen);
e6346999 31int wc_to_mb(int codepage, int flags, wchar_t *wcstr, int wclen,
32 char *mbstr, int mblen, char *defchr, int *defused);
1709795f 33void init_ucs(void);
f7f27309 34
35#define DEFAULT_CODEPAGE 0 /* FIXME: no idea how to do this */
36
37#endif