coreboot-kgpe-d16/payloads/libpayload/curses/PDCurses/x11/pdcutil.c
Stefan Reinauer 4f85a1eb76 libpayload: Rename PDCurses-3.4 to PDCurses
Change-Id: If881ec130833c7e7e62caa3d31e350a531f5bc8e
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/12398
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-11-11 21:38:48 +01:00

39 lines
613 B
C

/* Public Domain Curses */
#include "pdcx11.h"
RCSID("$Id: pdcutil.c,v 1.10 2008/07/14 04:24:52 wmcbrine Exp $")
#if defined(HAVE_POLL) && !defined(HAVE_USLEEP)
# include <poll.h>
#endif
void PDC_beep(void)
{
PDC_LOG(("PDC_beep() - called\n"));
XCursesInstruct(CURSES_BELL);
}
void PDC_napms(int ms)
{
PDC_LOG(("PDC_napms() - called: ms=%d\n", ms));
#if defined(HAVE_USLEEP)
usleep(1000 * ms);
#elif defined(HAVE_POLL)
{
struct pollfd fd;
fd.fd = -1;
fd.events = 0;
poll(&fd, 1, ms);
}
#endif
}
const char *PDC_sysname(void)
{
return "X11";
}