diff options
| author | Scott Rotondo <Scott.Rotondo@Sun.COM> | 2009-05-21 22:03:24 -0700 |
|---|---|---|
| committer | Scott Rotondo <Scott.Rotondo@Sun.COM> | 2009-05-21 22:03:24 -0700 |
| commit | d67944fbe3fa0b31893a7116a09b0718eecf6078 (patch) | |
| tree | 89b9d2ec857c47e00acc2668cbdafa2edce45b14 /usr/src/lib/libcurses | |
| parent | 259105bc352a464b4cdf3f424b5575e5e5e3f247 (diff) | |
| download | illumos-joyent-d67944fbe3fa0b31893a7116a09b0718eecf6078.tar.gz | |
6795209 Enable compilation of ON-consolidation with GCC 4.2
6392640 rpcgen -h -T output does not compile with gcc 4.x
--HG--
rename : usr/src/stand/lib/fs/nfs/pathname.h => usr/src/stand/lib/fs/nfs/st_pathname.h
Diffstat (limited to 'usr/src/lib/libcurses')
| -rw-r--r-- | usr/src/lib/libcurses/screen/tgetch.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/usr/src/lib/libcurses/screen/tgetch.c b/usr/src/lib/libcurses/screen/tgetch.c index c0f8ca0bd4..20f6995a6b 100644 --- a/usr/src/lib/libcurses/screen/tgetch.c +++ b/usr/src/lib/libcurses/screen/tgetch.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -37,8 +36,6 @@ * contributors. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /*LINTLIBRARY*/ #include "curses_inc.h" @@ -114,7 +111,7 @@ tgetch(int interpret) /* Check for arrow and function keys */ if (interpret && cur_term->funckeystarter[inp]) - collapse = _getkey(interpret - 1, &inp); + collapse = _getkey(interpret - 1, &inp); } /* Collapse the input queue to remove the escape */ @@ -176,6 +173,9 @@ _readchar() extern char *_asciify(); #endif /* DEBUG */ +static int get_xterm_mouse(int, int *); +static void _map_button(chtype *); + /* * This algorithm is a "learning" algorithm. The premise is * that keys used once are like to be used again and again. @@ -192,8 +192,8 @@ _getkey(int blockpeek, chtype *inp) int key, num_keys = cur_term->_ksz; int i; chtype *inputQ = cur_term->_input_queue; - char *chars_onQ = &(cur_term->_chars_on_queue), - flag = cur_term->funckeystarter[*inp]; + char *chars_onQ = &(cur_term->_chars_on_queue); + char flag = cur_term->funckeystarter[*inp]; int first, collapse = 1; @@ -221,7 +221,7 @@ _getkey(int blockpeek, chtype *inp) if (*chars_onQ == i) { (*chars_onQ)++; inputQ[i] = (blockpeek) ? - _pk() : _fpk(); + _pk() : _fpk(); switch ((int)inputQ[i]) { case -2: /* @@ -266,7 +266,6 @@ _getkey(int blockpeek, chtype *inp) if (kp[key]->_keyval == KEY_MOUSE) { MOUSE_STATUS old_mouse; int rc; - static int get_xterm_mouse(int, int *); old_mouse = Mouse_status; @@ -339,7 +338,6 @@ _getkey(int blockpeek, chtype *inp) (MOUSE_Y_POS == LINES) && (SP->slk != (SLK_MAP *) NULL) && (SP->_map_mbe_to_key != 0)) { - static void _map_button(chtype *); _map_button(inp); } @@ -546,15 +544,15 @@ _fpk(void) /* restore the user alarms */ (void) signal(SIGALRM, oldsig); if (sig_caught && oldalarm > 1) - oldalarm--; + oldalarm--; (void) alarm(oldalarm); if (rc == 1) /* got a character */ - return (c); + return (c); else - if (sig_caught) /* timed out */ - return (-2); - else /* EOF or got interrupted */ - return (-1); + if (sig_caught) /* timed out */ + return (-2); + else /* EOF or got interrupted */ + return (-1); } #else /* FIONREAD */ /* |
