minix/external/bsd/nvi/dist/motif_l/m_prompt.c
Lionel Sambuc 0a6a1f1d05 NetBSD re-synchronization of the source tree
This brings our tree to NetBSD 7.0, as found on -current on the
10-10-2015.

This updates:
 - LLVM to 3.6.1
 - GCC to GCC 5.1
 - Replace minix/commands/zdump with usr.bin/zdump
 - external/bsd/libelf has moved to /external/bsd/elftoolchain/
 - Import ctwm
 - Drop sprintf from libminc

Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
2016-01-13 20:32:14 +01:00

86 lines
1.9 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*-
* Copyright (c) 1996
* Rob Zimmermann. All rights reserved.
* Copyright (c) 1996
* Keith Bostic. All rights reserved.
*
* See the LICENSE file for redistribution information.
*/
#include "config.h"
#include <sys/cdefs.h>
#if 0
#ifndef lint
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 ";
#endif /* not lint */
#else
__RCSID("$NetBSD: m_prompt.c,v 1.2 2014/01/26 21:43:45 christos Exp $");
#endif
#include <sys/types.h>
#include <sys/queue.h>
#include <X11/X.h>
#include <X11/Intrinsic.h>
#include <Xm/MessageB.h>
#include <bitstring.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#undef LOCK_SUCCESS
#include "../common/common.h"
#include "../ipc/ip.h"
#include "m_motif.h"
void vi_fatal_message(Widget parent, String str)
{
Widget db = XmCreateErrorDialog( parent, "Fatal", NULL, 0 );
XmString msg = XmStringCreateSimple( str );
XtVaSetValues( XtParent(db),
XmNtitle, "Fatal",
0
);
XtVaSetValues( db,
XmNmessageString, msg,
0
);
XtAddCallback( XtParent(db), XmNpopdownCallback, __vi_cancel_cb, 0 );
XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_CANCEL_BUTTON ) );
XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_HELP_BUTTON ) );
__vi_modal_dialog( db );
exit(0);
}
void vi_info_message(Widget parent, String str)
{
static Widget db = NULL;
XmString msg = XmStringCreateSimple( str );
if ( db == NULL )
db = XmCreateInformationDialog( parent, "Information", NULL, 0 );
XtVaSetValues( XtParent(db),
XmNtitle, "Information",
0
);
XtVaSetValues( db,
XmNmessageString, msg,
0
);
XtAddCallback( XtParent(db), XmNpopdownCallback, __vi_cancel_cb, 0 );
XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_CANCEL_BUTTON ) );
XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_HELP_BUTTON ) );
__vi_modal_dialog( db );
}