1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 01:18:00 +00:00
putty-source/unix/pterm.c
Simon Tatham f39c51f9a7 Rename most of the platform source files.
This gets rid of all those annoying 'win', 'ux' and 'gtk' prefixes
which made filenames annoying to type and to tab-complete. Also, as
with my other recent renaming sprees, I've taken the opportunity to
expand and clarify some of the names so that they're not such cryptic
abbreviations.
2021-04-26 18:00:01 +01:00

51 lines
1.2 KiB
C

/*
* pterm main program.
*/
#include <stdio.h>
#include <stdlib.h>
#include "putty.h"
const char *const appname = "pterm";
const bool use_event_log = false; /* pterm doesn't need it */
const bool new_session = false, saved_sessions = false; /* or these */
const bool dup_check_launchable = false; /* no need to check host name
* in conf */
const bool use_pty_argv = true;
const unsigned cmdline_tooltype = TOOLTYPE_NONNETWORK;
/* gtkwin.c will call this, and in pterm it's not needed */
void noise_ultralight(NoiseSourceId id, unsigned long data) { }
const struct BackendVtable *select_backend(Conf *conf)
{
return &pty_backend;
}
void initial_config_box(Conf *conf, post_dialog_fn_t after, void *afterctx)
{
/*
* This is a no-op in pterm, except that we'll ensure the protocol
* is set to -1 to inhibit the useless Connection panel in the
* config box. So we do that and then just immediately call the
* post-dialog function with a positive result.
*/
conf_set_int(conf, CONF_protocol, -1);
after(afterctx, 1);
}
void cleanup_exit(int code)
{
exit(code);
}
void setup(bool single)
{
settings_set_default_protocol(-1);
if (single)
pty_pre_init();
}