X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=tack%2Fsysdep.c;h=78ae095e3bcb50e50c24b180fe79b0cd0c665ee0;hp=25376578fbcd92c0a76914faa0aaf6d205509290;hb=6f8ad7d77b390ee433a283e1c5175bcb67317674;hpb=c633e5103a29a38532cf1925257b91cea33fd090 diff --git a/tack/sysdep.c b/tack/sysdep.c index 25376578..78ae095e 100644 --- a/tack/sysdep.c +++ b/tack/sysdep.c @@ -15,8 +15,8 @@ ** ** You should have received a copy of the GNU General Public License ** along with TACK; see the file COPYING. If not, write to -** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -** Boston, MA 02111-1307, USA. +** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +** Boston, MA 02110-1301, USA */ /* * Operating system dependent functions. We assume the POSIX API. @@ -24,16 +24,22 @@ * global has no effect. */ -#if defined(__BEOS__) -#include +#ifdef HAVE_CONFIG_H +#include #endif +#include /* include before curses.h to work around glibc bug */ #include -#include #include #include +#if defined(__BEOS__) +#undef false +#undef true +#include +#endif + #if HAVE_SELECT #if HAVE_SYS_TIME_H && HAVE_SYS_TIME_SELECT #include @@ -43,7 +49,7 @@ #endif #endif -MODULE_ID("$Id: sysdep.c,v 1.9 2000/09/02 19:17:39 tom Exp $") +MODULE_ID("$Id: sysdep.c,v 1.15 2005/09/17 19:49:16 tom Exp $") #if DECL_ERRNO extern int errno; @@ -57,7 +63,7 @@ extern int errno; /* globals */ int tty_frame_size; /* asynch frame size times 2 */ -unsigned long tty_baud_rate; /* baud rate - bits per second */ +unsigned tty_baud_rate; /* baud rate - bits per second */ int not_a_tty; /* TRUE if output is not a tty (i.e. pipe) */ int nodelay_read; /* TRUE if NDELAY is set */ @@ -176,8 +182,8 @@ tty_set(void) #endif /* NL1 */ break; } - if (!(new_modes.c_oflag & ~OPOST)) - new_modes.c_oflag &= ~OPOST; + if (!(new_modes.c_oflag & (unsigned long) ~OPOST)) + new_modes.c_oflag &= (unsigned long) ~OPOST; #else new_modes.sg_flags |= RAW; if (not_a_tty) @@ -393,7 +399,7 @@ read_key(char *buf, int max) if (ask > max) { ask = max; } - if ((got = read(fileno(stdin), s, ask))) { + if ((got = read(fileno(stdin), s, (unsigned) ask))) { s += got; } else { break; @@ -494,5 +500,5 @@ set_alarm_clock( { signal(SIGALRM, alarm_event); no_alarm_event = 1; - (void) alarm(seconds); + (void) alarm((unsigned) seconds); }