]> diplodocus.org Git - nmh/blobdiff - uip/rcvtty.c
Added m_str() and m_strn() functions to convert int to string.
[nmh] / uip / rcvtty.c
index c38dd061ae56893d120b7c78c48868cdb9da33ef..6991829ea5ef220573207cef8d1b5df2e8a4b22c 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * rcvtty.c -- a rcvmail program (a lot like rcvalert) handling IPC ttys
+/* rcvtty.c -- a rcvmail program (a lot like rcvalert) handling IPC ttys
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -19,6 +17,8 @@
 #include <h/scansbr.h>
 #include <h/tws.h>
 #include <h/mts.h>
+#include <h/utils.h>
+#include "../sbr/m_mktemp.h"
 #include <fcntl.h>
 
 #ifdef HAVE_GETUTXENT
@@ -219,7 +219,7 @@ message_fd (char **vec)
            pidwait(child_id, OK);
            alarm (0);
 
-           if (fstat (fd, &st) != NOTOK && st.st_size > (off_t) 0)
+           if (fstat (fd, &st) != NOTOK && st.st_size > 0)
                return fd;
        } else {
            /*
@@ -315,7 +315,7 @@ alert (char *tty, int md)
        return;
     }
 
-    lseek (md, (off_t) 0, SEEK_SET);
+    lseek(md, 0, SEEK_SET);
 
     while ((i = read (md, buffer, sizeof(buffer))) > 0)
        if (write (td, buffer, i) != i)