]>
Commit | Line | Data |
---|---|---|
1c1af145 | 1 | /* |
2 | * pterm main program. | |
3 | */ | |
4 | ||
5 | #include <stdio.h> | |
6 | #include <stdlib.h> | |
7 | ||
8 | #include "putty.h" | |
9 | ||
10 | const char *const appname = "pterm"; | |
11 | const int use_event_log = 0; /* pterm doesn't need it */ | |
12 | const int new_session = 0, saved_sessions = 0; /* or these */ | |
13 | const int use_pty_argv = TRUE; | |
14 | ||
15 | Backend *select_backend(Config *cfg) | |
16 | { | |
17 | return &pty_backend; | |
18 | } | |
19 | ||
20 | int cfgbox(Config *cfg) | |
21 | { | |
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 | */ | |
27 | cfg->protocol = -1; | |
28 | return 1; | |
29 | } | |
30 | ||
31 | void cleanup_exit(int code) | |
32 | { | |
33 | exit(code); | |
34 | } | |
35 | ||
36 | int process_nonoption_arg(char *arg, Config *cfg, int *allow_launch) | |
37 | { | |
38 | return 0; /* pterm doesn't have any. */ | |
39 | } | |
40 | ||
41 | char *make_default_wintitle(char *hostname) | |
42 | { | |
43 | return dupstr("pterm"); | |
44 | } | |
45 | ||
46 | int 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 | ||
51 | cmdline_tooltype = TOOLTYPE_NONNETWORK; | |
52 | default_protocol = -1; | |
53 | ||
54 | pty_pre_init(); | |
55 | ||
56 | return pt_main(argc, argv); | |
57 | } |