Diff

Differences From Artifact [f5c97cefaa]:

To Artifact [8b900e53dd]:


926
927
928
929
930
931
932
933

934
935
936

937
938
939


940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956

957
958
959

960
961
962

963
964
965
966
967
968
969
926
927
928
929
930
931
932

933
934
935

936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957

958
959
960

961
962
963
964
965
966
967
968
969
970
971
972







-
+


-
+



+
+
















-
+


-
+



+








/*
 * Print a message box and close the connection.
 */
void connection_fatal(void *frontend, char *fmt, ...)
{
    va_list ap;
    char stuff[200], morestuff[100];
    char *stuff, morestuff[100];

    va_start(ap, fmt);
    vsprintf(stuff, fmt, ap);
    stuff = dupvprintf(fmt, ap);
    va_end(ap);
    sprintf(morestuff, "%.70s Fatal Error", appname);
    MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
    sfree(stuff);

    if (cfg.close_on_exit == FORCE_ON)
	PostQuitMessage(1);
    else {
	session_closed = TRUE;
	sprintf(morestuff, "%.70s (inactive)", appname);
	set_icon(NULL, morestuff);
	set_title(NULL, morestuff);
    }
}

/*
 * Report an error at the command-line parsing stage.
 */
void cmdline_error(char *fmt, ...)
{
    va_list ap;
    char stuff[200], morestuff[100];
    char *stuff, morestuff[100];

    va_start(ap, fmt);
    vsprintf(stuff, fmt, ap);
    stuff = dupvprintf(fmt, ap);
    va_end(ap);
    sprintf(morestuff, "%.70s Command Line Error", appname);
    MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
    sfree(stuff);
    exit(1);
}

/*
 * Actually do the job requested by a WM_NETEVENT
 */
static void enact_pending_netevent(void)
4298
4299
4300
4301
4302
4303
4304
4305

4306
4307
4308

4309
4310
4311

4312
4313
4314
4315
4316
4317
4318
4319
4320
4321

4322
4323
4324

4325
4326
4327
4328

4329
4330
4331
4332
4333
4334
4335
4301
4302
4303
4304
4305
4306
4307

4308
4309
4310

4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324

4325
4326
4327

4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340







-
+


-
+



+









-
+


-
+




+








/*
 * Print a message box and perform a fatal exit.
 */
void fatalbox(char *fmt, ...)
{
    va_list ap;
    char stuff[200], morestuff[100];
    char *stuff, morestuff[100];

    va_start(ap, fmt);
    vsprintf(stuff, fmt, ap);
    stuff = dupvprintf(fmt, ap);
    va_end(ap);
    sprintf(morestuff, "%.70s Fatal Error", appname);
    MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
    sfree(stuff);
    cleanup_exit(1);
}

/*
 * Print a modal (Really Bad) message box and perform a fatal exit.
 */
void modalfatalbox(char *fmt, ...)
{
    va_list ap;
    char stuff[200], morestuff[100];
    char *stuff, morestuff[100];

    va_start(ap, fmt);
    vsprintf(stuff, fmt, ap);
    stuff = dupvprintf(fmt, ap);
    va_end(ap);
    sprintf(morestuff, "%.70s Fatal Error", appname);
    MessageBox(hwnd, stuff, morestuff,
	       MB_SYSTEMMODAL | MB_ICONERROR | MB_OK);
    sfree(stuff);
    cleanup_exit(1);
}

/*
 * Manage window caption / taskbar flashing, if enabled.
 * 0 = stop, 1 = maintain, 2 = start
 */