kernel - swapcache - vm_object_page_remove()
[dragonfly.git] / gnu / lib / libdialog / notify.c
blobd5e5c68a1b7a9fe15ea8ad6bc3466ab3c24899f1
1 /*
2 * File: notify.c
3 * Author: Marc van Kempen
4 * Desc: display a notify box with a message
6 * Copyright (c) 1995, Marc van Kempen
8 * All rights reserved.
10 * This software may be used, modified, copied, distributed, and
11 * sold, in both source and binary form provided that the above
12 * copyright and these terms are retained, verbatim, as the first
13 * lines of this file. Under no circumstances is the author
14 * responsible for the proper functioning of this software, nor does
15 * the author assume any responsibility for damages incurred with
16 * its use.
18 * $FreeBSD: src/gnu/lib/libdialog/notify.c,v 1.6.12.2 2002/06/18 07:55:55 dougb Exp $
19 * $DragonFly: src/gnu/lib/libdialog/notify.c,v 1.2 2003/06/17 04:25:43 dillon Exp $
22 #include <dialog.h>
23 #include <stdio.h>
24 #include <stdlib.h>
26 void
27 dialog_notify(char *msg)
29 * Desc: display an error message
32 char *tmphlp;
33 WINDOW *w;
35 w = dupwin(newscr);
36 if (w == NULL) {
37 endwin();
38 fprintf(stderr, "\ndupwin(newscr) failed, malloc memory corrupted\n");
39 exit(1);
41 tmphlp = get_helpline();
42 use_helpline("Press enter or space");
43 dialog_mesgbox("Message", msg, -1, -1);
44 restore_helpline(tmphlp);
45 touchwin(w);
46 wrefresh(w);
47 delwin(w);
49 return;
51 } /* dialog_notify() */