]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - unix/uxpterm.c
scp_recv_filedata: handle EOF more sensibly.
[PuTTY.git] / 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 const int dup_check_launchable = 0; /* no need to check host name in conf */
14 const int use_pty_argv = TRUE;
15
16 Backend *select_backend(Conf *conf)
17 {
18     return &pty_backend;
19 }
20
21 int cfgbox(Conf *conf)
22 {
23     /*
24      * This is a no-op in pterm, except that we'll ensure the
25      * protocol is set to -1 to inhibit the useless Connection
26      * panel in the config box.
27      */
28     conf_set_int(conf, CONF_protocol, -1);
29     return 1;
30 }
31
32 void cleanup_exit(int code)
33 {
34     exit(code);
35 }
36
37 int process_nonoption_arg(const char *arg, Conf *conf, int *allow_launch)
38 {
39     return 0;                          /* pterm doesn't have any. */
40 }
41
42 char *make_default_wintitle(char *hostname)
43 {
44     return dupstr("pterm");
45 }
46
47 void setup(int single)
48 {
49     extern void pty_pre_init(void);    /* declared in pty.c */
50
51     cmdline_tooltype = TOOLTYPE_NONNETWORK;
52     default_protocol = -1;
53
54     if (single)
55         pty_pre_init();
56 }