]> diplodocus.org Git - nmh/blobdiff - sbr/terminal.c
Replace `if (p) free(p)' with `mh_xfree(p)'.
[nmh] / sbr / terminal.c
index 14eca97bc1f9dc02e407f6a4cd79ea556776991c..cf71de03ade036dd7a50e6b115fe787c19d66d20 100644 (file)
 #include <h/mh.h>
 #include <h/utils.h>
 
-#include <termios.h>
 #include <sys/ioctl.h>
 
 #include <curses.h>
 #include <term.h>
+#include <termios.h>
 
 #ifdef WINSIZE_IN_PTEM
 # include <sys/stream.h>
@@ -54,9 +54,8 @@ initialize_terminfo(void)
     if (rc != 0 || errret != 1) {
        termstatus = -1;
        return;
-    } else {
-       termstatus = 1;
     }
+    termstatus = 1;
 
     if (!initCO && (CO = tigetnum ("cols")) <= 0)
        CO = 80;
@@ -120,7 +119,7 @@ nmh_clear_screen (void)
     if (ti_clear)
        tputs (ti_clear, LI, outc);
     else {
-       printf ("\f");
+       putchar('\f');
     }
 
     fflush (stdout);