X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/bcb1823f2c7cb3e886e54c6932ff2c37731d8ab8..88ea89339783ee587180b645981967f6cb8bcd20:/windows/winplink.c diff --git a/windows/winplink.c b/windows/winplink.c index 0abed7ce..37453bb7 100644 --- a/windows/winplink.c +++ b/windows/winplink.c @@ -49,6 +49,19 @@ void modalfatalbox(char *p, ...) } cleanup_exit(1); } +void nonfatal(char *p, ...) +{ + va_list ap; + fprintf(stderr, "ERROR: "); + va_start(ap, p); + vfprintf(stderr, p, ap); + va_end(ap); + fputc('\n', stderr); + if (logctx) { + log_free(logctx); + logctx = NULL; + } +} void connection_fatal(void *frontend, char *p, ...) { va_list ap; @@ -636,12 +649,12 @@ int main(int argc, char **argv) } if (run_timers(now, &next)) { - then = now; - now = GETTICKCOUNT(); - if (now - then > next - then) - ticks = 0; - else - ticks = next - now; + then = now; + now = GETTICKCOUNT(); + if (now - then > next - then) + ticks = 0; + else + ticks = next - now; } else { ticks = INFINITE; }