X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/2ac3322ef9bc032ad942753a56696764aa0b0f74..2fa6ce2cd497f14cde0e43c6096813bad2a4d9c9:/unix/unix.h diff --git a/unix/unix.h b/unix/unix.h index 54cf39f2..0e61faab 100644 --- a/unix/unix.h +++ b/unix/unix.h @@ -1,13 +1,17 @@ #ifndef PUTTY_UNIX_H #define PUTTY_UNIX_H +#ifdef HAVE_CONFIG_H +# include "uxconfig.h" /* Space to hide it from mkfiles.pl */ +#endif + #include /* for FILENAME_MAX */ #include "charset.h" struct Filename { char path[FILENAME_MAX]; }; -#define f_open(filename, mode) ( fopen((filename).path, (mode)) ) +FILE *f_open(struct Filename, char const *, int); struct FontSpec { char name[256]; @@ -56,6 +60,28 @@ extern long tickcount_offset; #define WCHAR wchar_t #define BYTE unsigned char +#ifndef NO_GSSAPI +/* + * GSS-API stuff + */ +#include +typedef gss_buffer_desc Ssh_gss_buf; +#define SSH_GSS_EMPTY_BUF GSS_C_EMPTY_BUFFER +typedef gss_name_t Ssh_gss_name; +#endif + +/* + * Unix-specific global flag + * + * FLAG_STDERR_TTY indicates that standard error might be a terminal and + * might get its configuration munged, so anything trying to output plain + * text (i.e. with newlines in it) will need to put it back into cooked + * mode first. Applications setting this flag should also call + * stderr_tty_init() before messing with any terminal modes, and can call + * premsg() before outputting text to stderr and postmsg() afterwards. + */ +#define FLAG_STDERR_TTY 0x1000 + /* Things pty.c needs from pterm.c */ char *get_x_display(void *frontend); int font_dimension(void *frontend, int which);/* 0 for width, 1 for height */ @@ -76,7 +102,7 @@ int reallyclose(void *frontend); /* Things pterm.c needs from {ptermm,uxputty}.c */ char *make_default_wintitle(char *hostname); -int process_nonoption_arg(char *arg, Config *cfg); +int process_nonoption_arg(char *arg, Config *cfg, int *allow_launch); /* pterm.c needs this special function in xkeysym.c */ int keysym_to_unicode(int keysym); @@ -87,6 +113,12 @@ char *x_get_default(const char *key); /* Things uxstore.c provides to pterm.c */ void provide_xrm_string(char *string); +/* Things provided by uxcons.c */ +struct termios; +void stderr_tty_init(void); +void premsg(struct termios *); +void postmsg(struct termios *); + /* The interface used by uxsel.c */ void uxsel_init(void); typedef int (*uxsel_callback_fn)(int fd, int event); @@ -101,7 +133,7 @@ void uxsel_input_remove(int id); /* uxcfg.c */ struct controlbox; -void unix_setup_config_box(struct controlbox *b, int midsession); +void unix_setup_config_box(struct controlbox *b, int midsession, int protocol); /* gtkcfg.c */ void gtk_setup_config_box(struct controlbox *b, int midsession, void *window); @@ -124,6 +156,9 @@ void gtk_setup_config_box(struct controlbox *b, int midsession, void *window); void (*putty_signal(int sig, void (*func)(int)))(int); void block_signal(int sig, int block_it); +/* uxmisc.c */ +int cloexec(int); + /* * Exports from unicode.c. */ @@ -145,4 +180,9 @@ void *sk_getxdmdata(void *sock, int *lenp); if (max < fd + 1) max = fd + 1; \ } while (0) +/* + * Exports from winser.c. + */ +extern Backend serial_backend; + #endif