blob: 5b5109f84e6b071ae79db9c0672e4f7bd4c49656 [file] [log] [blame]
Patrick Georgi3b77b722011-07-07 15:41:53 +02001/* Public Domain Curses */
2
3#include "pdcx11.h"
4
5RCSID("$Id: pdcutil.c,v 1.10 2008/07/14 04:24:52 wmcbrine Exp $")
6
7#if defined(HAVE_POLL) && !defined(HAVE_USLEEP)
8# include <poll.h>
9#endif
10
11void PDC_beep(void)
12{
13 PDC_LOG(("PDC_beep() - called\n"));
14
15 XCursesInstruct(CURSES_BELL);
16}
17
18void PDC_napms(int ms)
19{
20 PDC_LOG(("PDC_napms() - called: ms=%d\n", ms));
21
22#if defined(HAVE_USLEEP)
23
24 usleep(1000 * ms);
25
26#elif defined(HAVE_POLL)
27 {
28 struct pollfd fd;
29 fd.fd = -1;
30 fd.events = 0;
31 poll(&fd, 1, ms);
32 }
33#endif
34}
35
36const char *PDC_sysname(void)
37{
38 return "X11";
39}