1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-03 20:42:48 -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:
Simon Tatham
2016-03-23 21:58:40 +00:00
parent 450a995f05
commit 01778a2d54
3 changed files with 12 additions and 16 deletions

View File

@ -534,13 +534,20 @@ int do_cmdline(int argc, char **argv, int do_everything, int *allow_launch,
extern int cfgbox(Conf *conf);
int pt_main(int argc, char **argv)
int main(int argc, char **argv)
{
Conf *conf;
int need_config_box;
setlocale(LC_CTYPE, "");
{
/* Call the function in ux{putty,pterm}.c to do app-type
* specific setup */
extern void setup(int);
setup(TRUE); /* TRUE means we are a one-session process */
}
progname = argv[0];
/*