run make indent

This commit is contained in:
Fumitoshi UKAI
2001-12-14 17:40:09 +00:00
parent e67fb668cf
commit 6823531d6b

47
terms.c
View File

@@ -1,4 +1,4 @@
/* $Id: terms.c,v 1.22 2001/12/12 17:04:21 ukai Exp $ */
/* $Id: terms.c,v 1.23 2001/12/14 17:40:09 ukai Exp $ */
/*
* An original curses library for EUC-kanji by Akinori ITO, December 1989
* revised by Akinori ITO, January 1995
@@ -143,7 +143,8 @@ read_win32_console_input(void)
break;
#ifdef USE_MOUSE
case MOUSE_EVENT:
if ((lastConMouse.dwButtonState ^ rec.Event.MouseEvent.dwButtonState) & ~(~0 << 5)) {
if ((lastConMouse.dwButtonState ^ rec.Event.MouseEvent.
dwButtonState) & ~(~0 << 5)) {
int down;
MOUSE_EVENT_RECORD *mer;
INPUT_RECORD dummy;
@@ -154,15 +155,20 @@ read_win32_console_input(void)
ConInV[nConIn + 1] = '[';
ConInV[nConIn + 2] = 'M';
if (~(mer->dwButtonState) & lastConMouse.dwButtonState & ~(~0 << 5))
if (~(mer->dwButtonState) & lastConMouse.
dwButtonState & ~(~0 << 5))
ConInV[nConIn + 3] = MOUSE_BTN_UP + ' ';
else if (!(down = mer->dwButtonState & ~lastConMouse.dwButtonState & ~(~0 << 5)))
else if (!
(down =
mer->dwButtonState & ~lastConMouse.
dwButtonState & ~(~0 << 5)))
break;
else
ConInV[nConIn + 3] = (down & (1 << 0) ? MOUSE_BTN1_DOWN :
down & (1 << 1) ? MOUSE_BTN3_DOWN :
down & (1 << 2) ? MOUSE_BTN2_DOWN :
down & (1 << 3) ? MOUSE_BTN4_DOWN_XTERM :
down & (1 << 3) ?
MOUSE_BTN4_DOWN_XTERM :
MOUSE_BTN5_DOWN_XTERM) + ' ';
ConInV[nConIn + 4] = mer->dwMousePosition.X + '!';
@@ -206,8 +212,7 @@ read_win32_console(char *s, int n)
iConIn = nConIn = 0;
while (!read_win32_console_input())
;
while (!read_win32_console_input()) ;
}
return n;
@@ -219,8 +224,7 @@ cmp_tv(const struct timeval *tv_a, const struct timeval *tv_b)
return ((tv_a->tv_sec < tv_b->tv_sec) ? -1 :
(tv_a->tv_sec > tv_b->tv_sec) ? 1 :
(tv_a->tv_usec < tv_b->tv_usec) ? -1 :
(tv_a->tv_usec > tv_b->tv_usec) ? 1 :
0);
(tv_a->tv_usec > tv_b->tv_usec) ? 1 : 0);
}
static int
@@ -232,11 +236,13 @@ subtract_tv(struct timeval *dst, const struct timeval *src)
}
return ((dst->tv_sec -= src->tv_sec) < 0 ? -1 :
!dst->tv_sec ? (dst->tv_usec < 0 ? -1 : !dst->tv_usec ? 0 : 1) : 1);
!dst->tv_sec ? (dst->tv_usec <
0 ? -1 : !dst->tv_usec ? 0 : 1) : 1);
}
int
select_or_poll_win32_console(int n, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *tout)
select_or_poll_win32_console(int n, fd_set * rfds, fd_set * wfds,
fd_set * efds, struct timeval *tout)
{
int m;
DWORD nevents;
@@ -264,13 +270,15 @@ select_or_poll_win32_console(int n, fd_set *rfds, fd_set *wfds, fd_set *efds, st
}
int
select_win32_console(int n, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *tout)
select_win32_console(int n, fd_set * rfds, fd_set * wfds, fd_set * efds,
struct timeval *tout)
{
static struct timeval polltv = { 0, 1000000 / CLOCKS_PER_SEC };
int m;
struct timeval tv;
if (hConIn == INVALID_HANDLE_VALUE || tty < 0 || tty >= n || !rfds || !FD_ISSET(tty, rfds))
if (hConIn == INVALID_HANDLE_VALUE || tty < 0 || tty >= n || !rfds
|| !FD_ISSET(tty, rfds))
return select(n, rfds, wfds, efds, tout);
FD_CLR(tty, rfds);
@@ -470,13 +478,16 @@ static struct mouse_term_info {
char *term;
int flag;
} xterm_mouse_term[] = {
{"xterm", NEED_XTERM_ON|NEED_XTERM_OFF},
{"kterm", NEED_XTERM_ON|NEED_XTERM_OFF},
{"rxvt", NEED_XTERM_ON|NEED_XTERM_OFF},
{
"xterm", NEED_XTERM_ON | NEED_XTERM_OFF}, {
"kterm", NEED_XTERM_ON | NEED_XTERM_OFF}, {
"rxvt", NEED_XTERM_ON | NEED_XTERM_OFF},
#ifdef __CYGWIN__
{"cygwin", NEED_XTERM_ON},
{
"cygwin", NEED_XTERM_ON},
#endif
{NULL, 0}
{
NULL, 0}
};
#endif