]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_baudrate.c
ncurses 5.9 - patch 20150418
[ncurses.git] / ncurses / tinfo / lib_baudrate.c
index 252d03c593d8fcb11cc71d13ca4fddde69379001..bfd2229e3f168a7029df7f6c86aa1433deef29eb 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2010,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -79,7 +79,7 @@
 #undef USE_OLD_TTY
 #endif /* USE_OLD_TTY */
 
-MODULE_ID("$Id: lib_baudrate.c,v 1.34 2013/12/15 01:29:02 tom Exp $")
+MODULE_ID("$Id: lib_baudrate.c,v 1.36 2015/04/18 22:08:58 tom Exp $")
 
 /*
  *     int
@@ -161,7 +161,7 @@ _nc_baudrate(int OSpeed)
     if (result == ERR) {
        if (OSpeed >= 0) {
            for (i = 0; i < SIZEOF(speeds); i++) {
-               if (speeds[i].s == OSpeed) {
+               if ((int) speeds[i].s == OSpeed) {
                    result = speeds[i].sp;
                    break;
                }
@@ -208,7 +208,7 @@ NCURSES_SP_NAME(baudrate) (NCURSES_SP_DCL0)
      */
 #ifdef TRACE
     if (IsValidTIScreen(SP_PARM)
-       && !isatty(fileno(SP_PARM ? SP_PARM->_ofp : stdout))
+       && !NC_ISATTY(fileno(SP_PARM ? SP_PARM->_ofp : stdout))
        && getenv("BAUDRATE") != 0) {
        int ret;
        if ((ret = _nc_getenv_num("BAUDRATE")) <= 0)