Remove building with NOCRYPTO option
[minix.git] / external / bsd / nvi / dist / motif_l / m_prompt.c
blobd7430d5abe06d86fb5a0f399b9a7fb66e5c0cfd4
1 /*-
2 * Copyright (c) 1996
3 * Rob Zimmermann. All rights reserved.
4 * Copyright (c) 1996
5 * Keith Bostic. All rights reserved.
7 * See the LICENSE file for redistribution information.
8 */
10 #include "config.h"
12 #include <sys/cdefs.h>
13 #if 0
14 #ifndef lint
15 static const char sccsid[] = "Id: m_prompt.c,v 8.8 2003/11/05 17:10:00 skimo Exp (Berkeley) Date: 2003/11/05 17:10:00 ";
16 #endif /* not lint */
17 #else
18 __RCSID("$NetBSD: m_prompt.c,v 1.2 2014/01/26 21:43:45 christos Exp $");
19 #endif
21 #include <sys/types.h>
22 #include <sys/queue.h>
24 #include <X11/X.h>
25 #include <X11/Intrinsic.h>
26 #include <Xm/MessageB.h>
28 #include <bitstring.h>
29 #include <stdio.h>
30 #include <stdlib.h>
31 #include <string.h>
33 #undef LOCK_SUCCESS
34 #include "../common/common.h"
35 #include "../ipc/ip.h"
36 #include "m_motif.h"
39 void vi_fatal_message(Widget parent, String str)
41 Widget db = XmCreateErrorDialog( parent, "Fatal", NULL, 0 );
42 XmString msg = XmStringCreateSimple( str );
44 XtVaSetValues( XtParent(db),
45 XmNtitle, "Fatal",
48 XtVaSetValues( db,
49 XmNmessageString, msg,
52 XtAddCallback( XtParent(db), XmNpopdownCallback, __vi_cancel_cb, 0 );
54 XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_CANCEL_BUTTON ) );
55 XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_HELP_BUTTON ) );
57 __vi_modal_dialog( db );
59 exit(0);
63 void vi_info_message(Widget parent, String str)
65 static Widget db = NULL;
66 XmString msg = XmStringCreateSimple( str );
68 if ( db == NULL )
69 db = XmCreateInformationDialog( parent, "Information", NULL, 0 );
71 XtVaSetValues( XtParent(db),
72 XmNtitle, "Information",
75 XtVaSetValues( db,
76 XmNmessageString, msg,
79 XtAddCallback( XtParent(db), XmNpopdownCallback, __vi_cancel_cb, 0 );
81 XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_CANCEL_BUTTON ) );
82 XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_HELP_BUTTON ) );
84 __vi_modal_dialog( db );