mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-31 02:32:49 -05:00
Move SessionSpecial definitions into their own header.
This will allow me to re-include it elsewhere, to make an array of the specials' names for diagnostic purposes.
This commit is contained in:
parent
b5645f79dd
commit
fd43ff6e27
58
putty.h
58
putty.h
@ -296,59 +296,11 @@ void init_ucs_generic(Conf *conf, struct unicode_data *ucsdata);
|
|||||||
* session, separately from the byte stream of ordinary session data.
|
* session, separately from the byte stream of ordinary session data.
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
/*
|
/* The list of enum constants is defined in a separate header so
|
||||||
* Commands that are generally useful in multiple backends.
|
* they can be reused in other contexts */
|
||||||
*/
|
#define SPECIAL(x) SS_ ## x,
|
||||||
SS_BRK, /* serial-line break */
|
#include "specials.h"
|
||||||
SS_EOF, /* end-of-file on session input */
|
#undef SPECIAL
|
||||||
SS_NOP, /* transmit data with no effect */
|
|
||||||
SS_PING, /* try to keep the session alive (probably, but not
|
|
||||||
* necessarily, implemented as SS_NOP) */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Commands specific to Telnet.
|
|
||||||
*/
|
|
||||||
SS_AYT, /* Are You There */
|
|
||||||
SS_SYNCH, /* Synch */
|
|
||||||
SS_EC, /* Erase Character */
|
|
||||||
SS_EL, /* Erase Line */
|
|
||||||
SS_GA, /* Go Ahead */
|
|
||||||
SS_ABORT, /* Abort Process */
|
|
||||||
SS_AO, /* Abort Output */
|
|
||||||
SS_IP, /* Interrupt Process */
|
|
||||||
SS_SUSP, /* Suspend Process */
|
|
||||||
SS_EOR, /* End Of Record */
|
|
||||||
SS_EOL, /* Telnet end-of-line sequence (CRLF, as opposed to CR
|
|
||||||
* NUL that escapes a literal CR) */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Commands specific to SSH.
|
|
||||||
*/
|
|
||||||
SS_REKEY, /* trigger an immediate repeat key exchange */
|
|
||||||
SS_XCERT, /* cross-certify another host key ('arg' indicates which) */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Send a POSIX-style signal. (Useful in SSH and also pterm.)
|
|
||||||
*
|
|
||||||
* We use the master list in ssh/signal-list.h to define these enum
|
|
||||||
* values, which will come out looking like names of the form
|
|
||||||
* SS_SIGABRT, SS_SIGINT etc.
|
|
||||||
*/
|
|
||||||
#define SIGNAL_MAIN(name, text) SS_SIG ## name,
|
|
||||||
#define SIGNAL_SUB(name) SS_SIG ## name,
|
|
||||||
#include "ssh/signal-list.h"
|
|
||||||
#undef SIGNAL_MAIN
|
|
||||||
#undef SIGNAL_SUB
|
|
||||||
|
|
||||||
/*
|
|
||||||
* These aren't really special commands, but they appear in the
|
|
||||||
* enumeration because the list returned from
|
|
||||||
* backend_get_specials() will use them to specify the structure
|
|
||||||
* of the GUI specials menu.
|
|
||||||
*/
|
|
||||||
SS_SEP, /* Separator */
|
|
||||||
SS_SUBMENU, /* Start a new submenu with specified name */
|
|
||||||
SS_EXITMENU, /* Exit current submenu, or end of entire specials list */
|
|
||||||
} SessionSpecialCode;
|
} SessionSpecialCode;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
52
specials.h
Normal file
52
specials.h
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* Commands that are generally useful in multiple backends.
|
||||||
|
*/
|
||||||
|
SPECIAL(BRK) /* serial-line break */
|
||||||
|
SPECIAL(EOF) /* end-of-file on session input */
|
||||||
|
SPECIAL(NOP) /* transmit data with no effect */
|
||||||
|
SPECIAL(PING) /* try to keep the session alive (probably, but not
|
||||||
|
* necessarily, implemented as SS_NOP) */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Commands specific to Telnet.
|
||||||
|
*/
|
||||||
|
SPECIAL(AYT) /* Are You There */
|
||||||
|
SPECIAL(SYNCH) /* Synch */
|
||||||
|
SPECIAL(EC) /* Erase Character */
|
||||||
|
SPECIAL(EL) /* Erase Line */
|
||||||
|
SPECIAL(GA) /* Go Ahead */
|
||||||
|
SPECIAL(ABORT) /* Abort Process */
|
||||||
|
SPECIAL(AO) /* Abort Output */
|
||||||
|
SPECIAL(IP) /* Interrupt Process */
|
||||||
|
SPECIAL(SUSP) /* Suspend Process */
|
||||||
|
SPECIAL(EOR) /* End Of Record */
|
||||||
|
SPECIAL(EOL) /* Telnet end-of-line sequence (CRLF, as opposed to
|
||||||
|
* CR NUL that escapes a literal CR) */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Commands specific to SSH.
|
||||||
|
*/
|
||||||
|
SPECIAL(REKEY) /* trigger an immediate repeat key exchange */
|
||||||
|
SPECIAL(XCERT) /* cross-certify another host key ('arg' indicates which) */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Send a POSIX-style signal. (Useful in SSH and also pterm.)
|
||||||
|
*
|
||||||
|
* We use the master list in ssh/signal-list.h to define these enum
|
||||||
|
* values, which will come out looking like names of the form
|
||||||
|
* SS_SIGABRT, SS_SIGINT etc.
|
||||||
|
*/
|
||||||
|
#define SIGNAL_MAIN(name, text) SPECIAL(SIG ## name)
|
||||||
|
#define SIGNAL_SUB(name) SPECIAL(SIG ## name)
|
||||||
|
#include "ssh/signal-list.h"
|
||||||
|
#undef SIGNAL_MAIN
|
||||||
|
#undef SIGNAL_SUB
|
||||||
|
|
||||||
|
/*
|
||||||
|
* These aren't really special commands, but they appear in the
|
||||||
|
* enumeration because the list returned from backend_get_specials()
|
||||||
|
* will use them to specify the structure of the GUI specials menu.
|
||||||
|
*/
|
||||||
|
SPECIAL(SEP) /* Separator */
|
||||||
|
SPECIAL(SUBMENU) /* Start a new submenu with specified name */
|
||||||
|
SPECIAL(EXITMENU) /* Exit current submenu, or end of entire specials list */
|
Loading…
x
Reference in New Issue
Block a user