| 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 | return 1; /* no-op in pterm */ |
| 22 | } |
| 23 | |
| 24 | void cleanup_exit(int code) |
| 25 | { |
| 26 | exit(code); |
| 27 | } |
| 28 | |
| 29 | int process_nonoption_arg(char *arg, Config *cfg) |
| 30 | { |
| 31 | return 0; /* pterm doesn't have any. */ |
| 32 | } |
| 33 | |
| 34 | char *make_default_wintitle(char *hostname) |
| 35 | { |
| 36 | return dupstr("pterm"); |
| 37 | } |
| 38 | |
| 39 | int main(int argc, char **argv) |
| 40 | { |
| 41 | extern int pt_main(int argc, char **argv); |
| 42 | extern void pty_pre_init(void); /* declared in pty.c */ |
| 43 | |
| 44 | cmdline_tooltype = TOOLTYPE_NONNETWORK; |
| 45 | |
| 46 | pty_pre_init(); |
| 47 | |
| 48 | return pt_main(argc, argv); |
| 49 | } |