minix/external/bsd/nvi/dist/motif_l/m_prompt.c
Lionel Sambuc 84d9c625bf Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
2014-07-28 17:05:06 +02:00

80 lines
1.8 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"
#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 */
#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 );
}