Fix some places that were assuming unsigned CHAR_T.
[nvi.git] / motif_l / m_prompt.c
blobdb7079c282340312efcf34cc90f3022c60721a03
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 #ifndef lint
13 static const char sccsid[] = "$Id: m_prompt.c,v 8.6 1996/12/18 10:26:59 bostic Exp $ (Berkeley) $Date: 1996/12/18 10:26:59 $";
14 #endif /* not lint */
16 #include <sys/types.h>
17 #include <sys/queue.h>
19 #include <X11/X.h>
20 #include <X11/Intrinsic.h>
21 #include <Xm/MessageB.h>
23 #include <bitstring.h>
24 #include <stdio.h>
25 #include <stdlib.h>
26 #include <string.h>
28 #include "../common/common.h"
29 #include "../ipc/ip.h"
30 #include "m_motif.h"
33 void vi_fatal_message( parent, str )
34 Widget parent;
35 String str;
37 Widget db = XmCreateErrorDialog( parent, "Fatal", NULL, 0 );
38 XmString msg = XmStringCreateSimple( str );
40 XtVaSetValues( XtParent(db),
41 XmNtitle, "Fatal",
44 XtVaSetValues( db,
45 XmNmessageString, msg,
48 XtAddCallback( XtParent(db), XmNpopdownCallback, __vi_cancel_cb, 0 );
50 XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_CANCEL_BUTTON ) );
51 XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_HELP_BUTTON ) );
53 __vi_modal_dialog( db );
55 exit(0);
59 void vi_info_message( parent, str )
60 Widget parent;
61 String str;
63 static Widget db = NULL;
64 XmString msg = XmStringCreateSimple( str );
66 if ( db == NULL )
67 db = XmCreateInformationDialog( parent, "Information", NULL, 0 );
69 XtVaSetValues( XtParent(db),
70 XmNtitle, "Information",
73 XtVaSetValues( db,
74 XmNmessageString, msg,
77 XtAddCallback( XtParent(db), XmNpopdownCallback, __vi_cancel_cb, 0 );
79 XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_CANCEL_BUTTON ) );
80 XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_HELP_BUTTON ) );
82 __vi_modal_dialog( db );