X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/f3ab148c2f5bc562133711998ac30d5fb31be460..d25f9823be478b4b8eab34f016f85122525b2bed:/mac/mac.c diff --git a/mac/mac.c b/mac/mac.c index b3df4838..9c1abdf8 100644 --- a/mac/mac.c +++ b/mac/mac.c @@ -1,4 +1,4 @@ -/* $Id: mac.c,v 1.17 2003/01/04 12:45:11 ben Exp $ */ +/* $Id: mac.c,v 1.19 2003/01/05 12:53:38 ben Exp $ */ /* * Copyright (c) 1999 Ben Harris * All rights reserved. @@ -167,6 +167,8 @@ static void mac_startup(void) { DisposeHandle((Handle)ti); } + mactcp_init(); + /* We've been tested with the Appearance Manager */ if (mac_gestalts.apprvers != 0) RegisterAppearanceClient(); @@ -182,6 +184,9 @@ static void mac_startup(void) { windows.about = NULL; windows.licence = NULL; + default_protocol = DEFAULT_PROTOCOL; + default_port = DEFAULT_PORT; + { short vol; long dirid; @@ -208,6 +213,7 @@ static void mac_eventloop(void) { mac_adjustcursor(cursrgn); if (gotevent) mac_event(&event); + mactcp_poll(); } DisposeRgn(cursrgn); } @@ -597,6 +603,7 @@ static void mac_shutdown(void) { if (mac_gestalts.encvvers != 0) TerminateUnicodeConverter(); #endif + mactcp_shutdown(); exit(0); } @@ -626,6 +633,20 @@ void modalfatalbox(char *fmt, ...) { exit(1); } +/* This should only kill the current session, not the whole application. */ +void connection_fatal(void *fontend, char *fmt, ...) { + va_list ap; + Str255 stuff; + + va_start(ap, fmt); + /* We'd like stuff to be a Pascal string */ + stuff[0] = vsprintf((char *)(&stuff[1]), fmt, ap); + va_end(ap); + ParamText(stuff, NULL, NULL, NULL); + StopAlert(128, NULL); + exit(1); +} + /* * Local Variables: * c-file-style: "simon"