**
** 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.
* global has no effect.
*/
-#if defined(__BEOS__)
-#include <OS.h>
+#ifdef HAVE_CONFIG_H
+#include <ncurses_cfg.h>
#endif
+#include <signal.h> /* include before curses.h to work around glibc bug */
#include <tack.h>
-#include <signal.h>
#include <term.h>
#include <errno.h>
+#if defined(__BEOS__)
+#undef false
+#undef true
+#include <OS.h>
+#endif
+
#if HAVE_SELECT
#if HAVE_SYS_TIME_H && HAVE_SYS_TIME_SELECT
#include <sys/time.h>
#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;
/* 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 */
#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)
if (ask > max) {
ask = max;
}
- if ((got = read(fileno(stdin), s, ask))) {
+ if ((got = read(fileno(stdin), s, (unsigned) ask))) {
s += got;
} else {
break;
{
signal(SIGALRM, alarm_event);
no_alarm_event = 1;
- (void) alarm(seconds);
+ (void) alarm((unsigned) seconds);
}