]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - gnu/lib/libdialog/notify.c
This commit was generated by cvs2svn to compensate for changes in r53809,
[FreeBSD/FreeBSD.git] / gnu / lib / libdialog / notify.c
1 /*
2  * File:        notify.c
3  * Author:      Marc van Kempen
4  * Desc:        display a notify box with a message
5  *
6  * Copyright (c) 1995, Marc van Kempen
7  *
8  * All rights reserved.
9  *
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.
17  *
18  */
19
20
21 #include <dialog.h>
22 #include <stdio.h>
23
24 void
25 dialog_notify(char *msg)
26 /*
27  * Desc: display an error message
28  */
29 {
30     char *tmphlp;
31     WINDOW *w;
32
33     w = dupwin(newscr);
34     if (w == NULL) {
35         endwin();
36         fprintf(stderr, "\ndupwin(newscr) failed, malloc memory corrupted\n");
37         exit(1);
38     }
39     tmphlp = get_helpline();
40     use_helpline("Press enter to continue");
41     dialog_mesgbox("Message", msg, -1, -1);
42     restore_helpline(tmphlp);
43     touchwin(w);
44     wrefresh(w);
45     delwin(w);
46
47     return;
48
49 } /* dialog_notify() */
50