mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-04 21:12:47 -05:00
Make gtkmain.c contain the actual main().
Instead of main() living in uxputty.c and uxpterm.c, and doing a little bit of setup before calling the larger pt_main() in gtkmain.c, I've now turned things backwards: the big function in gtkmain.c *is* main(), and the small pieces of preliminary setup in uxputty.c and uxpterm.c are now a function called setup() which is called from there. This will allow me to reuse the rest of ux{putty,pterm}.c, i.e. the assorted top-level bits and pieces that distinguish PuTTY from pterm, in the upcoming OS X application that will have its own main().
This commit is contained in:
@ -132,11 +132,8 @@ char *platform_get_x_display(void) {
|
||||
const int share_can_be_downstream = TRUE;
|
||||
const int share_can_be_upstream = TRUE;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
void setup(int single)
|
||||
{
|
||||
extern int pt_main(int argc, char **argv);
|
||||
int ret;
|
||||
|
||||
sk_init();
|
||||
flags = FLAG_VERBOSE | FLAG_INTERACTIVE;
|
||||
default_protocol = be_default_protocol;
|
||||
@ -147,7 +144,4 @@ int main(int argc, char **argv)
|
||||
if (b)
|
||||
default_port = b->default_port;
|
||||
}
|
||||
ret = pt_main(argc, argv);
|
||||
cleanup_exit(ret);
|
||||
return ret; /* not reached, but placates optimisers */
|
||||
}
|
||||
|
Reference in New Issue
Block a user