Post-release destabilisation! Completely remove the struct type
[u/mdw/putty] / unix / uxpterm.c
CommitLineData
1d009ae7 1/*
2 * pterm main program.
3 */
4
5#include <stdio.h>
3f935d5b 6#include <stdlib.h>
1d009ae7 7
8#include "putty.h"
9
47e4e735 10const char *const appname = "pterm";
8eed910d 11const int use_event_log = 0; /* pterm doesn't need it */
56801e3d 12const int new_session = 0, saved_sessions = 0; /* or these */
fbcc43d3 13const int use_pty_argv = TRUE;
47e4e735 14
4a693cfc 15Backend *select_backend(Conf *conf)
1d009ae7 16{
17 return &pty_backend;
18}
19
4a693cfc 20int cfgbox(Conf *conf)
1d009ae7 21{
3e547dd8 22 /*
23 * This is a no-op in pterm, except that we'll ensure the
24 * protocol is set to -1 to inhibit the useless Connection
25 * panel in the config box.
26 */
4a693cfc 27 conf_set_int(conf, CONF_protocol, -1);
3e547dd8 28 return 1;
1d009ae7 29}
30
3f935d5b 31void cleanup_exit(int code)
32{
33 exit(code);
34}
35
4a693cfc 36int process_nonoption_arg(char *arg, Conf *conf, int *allow_launch)
46a3419b 37{
38 return 0; /* pterm doesn't have any. */
39}
40
10705014 41char *make_default_wintitle(char *hostname)
42{
43 return dupstr("pterm");
44}
45
1d009ae7 46int main(int argc, char **argv)
47{
48 extern int pt_main(int argc, char **argv);
49 extern void pty_pre_init(void); /* declared in pty.c */
50
46a3419b 51 cmdline_tooltype = TOOLTYPE_NONNETWORK;
3e547dd8 52 default_protocol = -1;
46a3419b 53
1d009ae7 54 pty_pre_init();
55
56 return pt_main(argc, argv);
57}