X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/c31f6c61a6c4229643515407981f90cae6b0cf89..fabd1805a8f429ca83b4271aabd1206ac3537ebb:/mac/mac.c diff --git a/mac/mac.c b/mac/mac.c index 6335aabe..52258c36 100644 --- a/mac/mac.c +++ b/mac/mac.c @@ -1,4 +1,4 @@ -/* $Id: mac.c,v 1.29 2003/01/14 19:42:00 ben Exp $ */ +/* $Id: mac.c,v 1.32 2003/01/15 23:30:21 ben Exp $ */ /* * Copyright (c) 1999 Ben Harris * All rights reserved. @@ -200,8 +200,17 @@ static void mac_startup(void) { windows.about = NULL; windows.licence = NULL; - default_protocol = DEFAULT_PROTOCOL; - default_port = DEFAULT_PORT; + default_protocol = be_default_protocol; + /* Find the appropriate default port. */ + { + int i; + default_port = 0; /* illegal */ + for (i = 0; backends[i].backend != NULL; i++) + if (backends[i].protocol == default_protocol) { + default_port = backends[i].backend->default_port; + break; + } + } flags = FLAG_INTERACTIVE; { @@ -532,18 +541,15 @@ static void mac_closewindow(WindowPtr window) { CloseDeskAcc(((WindowPeek)window)->windowKind); break; case wTerminal: - /* FIXME: end session and stuff */ + mac_closeterm(window); break; case wAbout: windows.about = NULL; - CloseWindow(window); + DisposeDialog(window); break; case wLicence: windows.licence = NULL; - CloseWindow(window); - break; - default: - CloseWindow(window); + DisposeWindow(window); break; } }