4 #include <stdio.h> /* for FILENAME_MAX */
8 char path
[FILENAME_MAX
];
10 #define f_open(filename, mode) ( fopen((filename).path, (mode)) )
16 typedef void *Context
; /* FIXME: probably needs changing */
18 extern Backend pty_backend
;
21 * Under GTK, we send MA_CLICK _and_ MA_2CLK, or MA_CLICK _and_
22 * MA_3CLK, when a button is pressed for the second or third time.
24 #define MULTICLICK_ONLY_EVENT 0
27 * Under X, selection data must not be NUL-terminated.
29 #define SELECTION_NUL_TERMINATED 0
32 * Under X, copying to the clipboard terminates lines with just LF.
36 /* Simple wraparound timer function */
37 unsigned long getticks(void); /* based on gettimeofday(2) */
38 #define GETTICKCOUNT getticks
39 #define TICKSPERSEC 1000000 /* gettimeofday returns microseconds */
40 #define CURSORBLINK 450000 /* no standard way to set this */
43 #define BYTE unsigned char
47 /* Things pty.c needs from pterm.c */
48 char *get_x_display(void *frontend
);
49 int font_dimension(void *frontend
, int which
);/* 0 for width, 1 for height */
50 long get_windowid(void *frontend
);
52 /* Things uxstore.c needs from pterm.c */
53 char *x_get_default(const char *key
);
55 /* Things uxstore.c provides to pterm.c */
56 void provide_xrm_string(char *string
);
58 /* Things uxnet.c provides to the front end */
59 int select_result(int fd
, int event
);
60 int first_socket(int *state
, int *rwx
);
61 int next_socket(int *state
, int *rwx
);
64 * In the Unix Unicode layer, DEFAULT_CODEPAGE is a special value
65 * which causes mb_to_wc and wc_to_mb to call _libc_ rather than
66 * libcharset. That way, we can interface the various charsets
67 * supported by libcharset with the one supported by mbstowcs and
68 * wcstombs (which will be the character set in which stuff read
69 * from the command line or config files is assumed to be encoded).
71 #define DEFAULT_CODEPAGE 0xFFFF
72 #define CP_UTF8 CS_UTF8 /* from libcharset */
74 #define strnicmp strncasecmp
75 #define stricmp strcasecmp
77 /* BSD-semantics version of signal() */
78 void (*putty_signal(int sig
, void (*func
)(int)))(int);
81 * Exports from unicode.c.
84 int init_ucs(struct unicode_data
*ucsdata
,
85 char *line_codepage
, int font_charset
);
88 * Spare function exported directly from uxnet.c.
90 int sk_getxdmdata(void *sock
, unsigned long *ip
, int *port
);