6bc0ea2c3757f725fe2fcc2e9e6618ac7f6677b0
[u/mdw/putty] / unix / ptermm.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
12 /*
13 * Another bunch of temporary stub functions. These ones will want
14 * removing by means of implementing them properly: libcharset
15 * should invent its own sensible format for codepage names and a
16 * means of enumerating them, and printer_enum needs to be dealt
17 * with somehow or other too.
18 */
19
20 char *cp_name(int codepage)
21 {
22 return "";
23 }
24 char *cp_enumerate(int index)
25 {
26 return NULL;
27 }
28 int decode_codepage(char *cp_name)
29 {
30 return -2;
31 }
32
33 printer_enum *printer_start_enum(int *nprinters_ptr) {
34 *nprinters_ptr = 0;
35 return NULL;
36 }
37 char *printer_get_name(printer_enum *pe, int i) { return NULL;
38 }
39 void printer_finish_enum(printer_enum *pe) { }
40
41 Backend *select_backend(Config *cfg)
42 {
43 return &pty_backend;
44 }
45
46 int cfgbox(Config *cfg)
47 {
48 return 1; /* no-op in pterm */
49 }
50
51 void cleanup_exit(int code)
52 {
53 exit(code);
54 }
55
56 int process_nonoption_arg(char *arg, Config *cfg)
57 {
58 return 0; /* pterm doesn't have any. */
59 }
60
61 char *make_default_wintitle(char *hostname)
62 {
63 return dupstr("pterm");
64 }
65
66 int main(int argc, char **argv)
67 {
68 extern int pt_main(int argc, char **argv);
69 extern void pty_pre_init(void); /* declared in pty.c */
70
71 cmdline_tooltype = TOOLTYPE_NONNETWORK;
72
73 pty_pre_init();
74
75 return pt_main(argc, argv);
76 }