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 |
10 | const char *const appname = "pterm"; |
8eed910d |
11 | const int use_event_log = 0; /* pterm doesn't need it */ |
56801e3d |
12 | const int new_session = 0, saved_sessions = 0; /* or these */ |
47e4e735 |
13 | |
1d009ae7 |
14 | Backend *select_backend(Config *cfg) |
15 | { |
16 | return &pty_backend; |
17 | } |
18 | |
19 | int cfgbox(Config *cfg) |
20 | { |
3e547dd8 |
21 | /* |
22 | * This is a no-op in pterm, except that we'll ensure the |
23 | * protocol is set to -1 to inhibit the useless Connection |
24 | * panel in the config box. |
25 | */ |
26 | cfg->protocol = -1; |
27 | return 1; |
1d009ae7 |
28 | } |
29 | |
3f935d5b |
30 | void cleanup_exit(int code) |
31 | { |
32 | exit(code); |
33 | } |
34 | |
46a3419b |
35 | int process_nonoption_arg(char *arg, Config *cfg) |
36 | { |
37 | return 0; /* pterm doesn't have any. */ |
38 | } |
39 | |
10705014 |
40 | char *make_default_wintitle(char *hostname) |
41 | { |
42 | return dupstr("pterm"); |
43 | } |
44 | |
1d009ae7 |
45 | int main(int argc, char **argv) |
46 | { |
47 | extern int pt_main(int argc, char **argv); |
48 | extern void pty_pre_init(void); /* declared in pty.c */ |
49 | |
46a3419b |
50 | cmdline_tooltype = TOOLTYPE_NONNETWORK; |
3e547dd8 |
51 | default_protocol = -1; |
46a3419b |
52 | |
1d009ae7 |
53 | pty_pre_init(); |
54 | |
55 | return pt_main(argc, argv); |
56 | } |