]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_raw.c
ncurses 6.0 - patch 20170318
[ncurses.git] / ncurses / tinfo / lib_raw.c
index 928692b0cb272ad52433dbb98ad2502dd5866303..a207fe0d920c5ee1e9dc17045e4c476f177c736e 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2016 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            *
@@ -49,7 +49,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_raw.c,v 1.21 2012/01/21 19:21:29 KO.Myung-Hun Exp $")
+MODULE_ID("$Id: lib_raw.c,v 1.22 2016/05/28 23:22:52 tom Exp $")
 
 #if HAVE_SYS_TERMIO_H
 #include <sys/termio.h>                /* needed for ISC */
@@ -177,12 +177,12 @@ cbreak(void)
 NCURSES_EXPORT(void)
 NCURSES_SP_NAME(qiflush) (NCURSES_SP_DCL0)
 {
-    int result = ERR;
     TERMINAL *termp;
 
     T((T_CALLED("qiflush(%p)"), (void *) SP_PARM));
     if ((termp = TerminalOf(SP_PARM)) != 0) {
        TTY buf;
+       int result;
 
        BEFORE("qiflush");
        buf = termp->Nttyb;
@@ -190,6 +190,7 @@ NCURSES_SP_NAME(qiflush) (NCURSES_SP_DCL0)
        buf.c_lflag &= (unsigned) ~(NOFLSH);
        result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
 #else
+       result = ERR;
        /* FIXME */
 #endif
        if (result == OK)
@@ -299,12 +300,12 @@ nocbreak(void)
 NCURSES_EXPORT(void)
 NCURSES_SP_NAME(noqiflush) (NCURSES_SP_DCL0)
 {
-    int result = ERR;
     TERMINAL *termp;
 
     T((T_CALLED("noqiflush(%p)"), (void *) SP_PARM));
     if ((termp = TerminalOf(SP_PARM)) != 0) {
        TTY buf;
+       int result;
 
        BEFORE("noqiflush");
        buf = termp->Nttyb;
@@ -313,6 +314,7 @@ NCURSES_SP_NAME(noqiflush) (NCURSES_SP_DCL0)
        result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
 #else
        /* FIXME */
+       result = ERR;
 #endif
        if (result == OK)
            termp->Nttyb = buf;