Rename some of the more stupidly named files in the Unix back end.
[sgt/putty] / unix / uxpterm.c
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
14 Backend *select_backend(Config *cfg)
15 {
16 return &pty_backend;
17 }
18
19 int cfgbox(Config *cfg)
20 {
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;
28 }
29
30 void cleanup_exit(int code)
31 {
32 exit(code);
33 }
34
35 int process_nonoption_arg(char *arg, Config *cfg)
36 {
37 return 0; /* pterm doesn't have any. */
38 }
39
40 char *make_default_wintitle(char *hostname)
41 {
42 return dupstr("pterm");
43 }
44
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
50 cmdline_tooltype = TOOLTYPE_NONNETWORK;
51 default_protocol = -1;
52
53 pty_pre_init();
54
55 return pt_main(argc, argv);
56 }