Fix the licence again. (Despite the copyright holders being more
[u/mdw/putty] / putty.h
diff --git a/putty.h b/putty.h
index 472c318..b6b1334 100644 (file)
--- a/putty.h
+++ b/putty.h
@@ -1,6 +1,8 @@
 #ifndef PUTTY_PUTTY_H
 #define PUTTY_PUTTY_H
 
+#include <stdio.h>                    /* for FILENAME_MAX */
+
 #include "network.h"
 
 #define PUTTY_REG_POS "Software\\SimonTatham\\PuTTY"
@@ -64,6 +66,7 @@
 #define UCSERR      (ATTR_LINEDRW|'a') /* UCS Format error character. */
 #define UCSWIDE             0x303F
 
+#define ATTR_NARROW  0x20000000UL
 #define ATTR_WIDE    0x10000000UL
 #define ATTR_BOLD    0x01000000UL
 #define ATTR_UNDER   0x02000000UL
@@ -90,8 +93,6 @@ typedef HDC Context;
 
 GLOBAL int rows, cols, savelines;
 
-GLOBAL int font_width, font_height;
-
 #define INBUF_SIZE 2048
 GLOBAL unsigned char inbuf[INBUF_SIZE];
 GLOBAL int inbuf_head;
@@ -111,6 +112,7 @@ GLOBAL int repeat_off, cr_lf_return;
 
 GLOBAL int seen_key_event;
 GLOBAL int seen_disp_event;
+GLOBAL int alt_pressed;
 
 GLOBAL int session_closed;
 
@@ -174,6 +176,18 @@ typedef enum {
 
 enum {
     /*
+     * SSH ciphers (both SSH1 and SSH2)
+     */
+    CIPHER_WARN,                      /* pseudo 'cipher' */
+    CIPHER_3DES,
+    CIPHER_BLOWFISH,
+    CIPHER_AES,                               /* (SSH 2 only) */
+    CIPHER_DES,                               /* (SSH 1 only) */
+    CIPHER_MAX                        /* no. ciphers (inc warn) */
+};
+
+enum {
+    /*
      * Line discipline option states: off, on, up to the backend.
      */
     LD_YES, LD_NO, LD_BACKEND
@@ -233,17 +247,22 @@ typedef struct {
     int ping_interval;                /* in seconds */
     /* SSH options */
     char remote_cmd[512];
+    char remote_cmd2[512];            /* fallback if the first fails
+                                       * (used internally for scp) */
     char *remote_cmd_ptr;             /* might point to a larger command
                                        * but never for loading/saving */
+    char *remote_cmd_ptr2;            /* might point to a larger command
+                                       * but never for loading/saving */
     int nopty;
     int compression;
     int agentfwd;
-    enum { CIPHER_3DES, CIPHER_BLOWFISH, CIPHER_DES, CIPHER_AES } cipher;
+    int ssh_cipherlist[CIPHER_MAX];
     char keyfile[FILENAME_MAX];
     int sshprot;                      /* use v1 or v2 when both available */
     int buggymac;                     /* MAC bug commmercial <=v2.3.x SSH2 */
     int try_tis_auth;
     int ssh_subsys;                   /* run a subsystem rather than a command */
+    int ssh_subsys2;                  /* fallback to go with remote_cmd2 */
     /* Telnet options */
     char termtype[32];
     char termspeed[32];
@@ -268,6 +287,7 @@ typedef struct {
     int localecho;
     int localedit;
     int alwaysontop;
+    int fullscreenonaltenter;
     int scroll_on_key;
     int scroll_on_disp;
     int compose_key;
@@ -293,6 +313,7 @@ typedef struct {
     char bell_wavefile[FILENAME_MAX];
     int scrollbar;
     int locksize;
+    int lockfont;
     int bce;
     int blinktext;
     int win_name_always;
@@ -306,6 +327,7 @@ typedef struct {
     int logxfovr;
     int hide_mouseptr;
     int sunken_edge;
+    int window_border;
     char answerback[256];
     /* Colour options */
     int try_palette;
@@ -314,6 +336,7 @@ typedef struct {
     /* Selection options */
     int mouse_is_xterm;
     int rawcnp;
+    int mouse_override;
     short wordness[256];
     /* translations */
     VT_Mode vtmode;
@@ -365,9 +388,10 @@ struct RSAKey;                            /* be a little careful of scope */
 /*
  * Exports from window.c.
  */
-void request_resize(int, int, int);
+void request_resize(int, int);
 void do_text(Context, int, int, char *, int, unsigned long, int);
 void do_cursor(Context, int, int, char *, int, unsigned long, int);
+int CharWidth(Context ctx, int uc);
 void set_title(char *);
 void set_icon(char *);
 void set_sbar(int, int, int);
@@ -410,6 +434,7 @@ void showeventlog(HWND);
 void showabout(HWND);
 void verify_ssh_host_key(char *host, int port, char *keytype,
                         char *keystr, char *fingerprint);
+void askcipher(char *ciphername, int cs);
 int askappend(char *filename);
 void registry_cleanup(void);
 void force_normal(HWND hwnd);
@@ -535,5 +560,11 @@ void crypto_wrapup();
 void agent_query(void *in, int inlen, void **out, int *outlen);
 int agent_exists(void);
 
+/*
+ * Exports from wildcard.c
+ */
+const char *wc_error(int value);
+int wc_match(const char *wildcard, const char *target);
+int wc_unescape(char *output, const char *wildcard);
 
 #endif