]> diplodocus.org Git - nmh/blobdiff - sbr/folder_pack.c
Document the -port flag. Text copied from inc.man .
[nmh] / sbr / folder_pack.c
index 9f00398a76a9ecf5e2b4ac6a655bd87b297ea1e6..7fdfcf8536d9aa34bf9b49f73005831ac7f2ac5b 100644 (file)
@@ -6,7 +6,12 @@
  * complete copyright information.
  */
 
-#include <h/mh.h>
+#include "h/mh.h"
+#include "m_name.h"
+#include "seq_setcur.h"
+#include "ext_hook.h"
+#include "folder_realloc.h"
+#include "folder_pack.h"
 #include "error.h"
 
 /*
@@ -44,8 +49,8 @@ folder_pack (struct msgs **mpp, int verbose)
     for (msgnum = mp->lowmsg, hole = 1; msgnum <= mp->hghmsg; msgnum++) {
        if (does_exist (mp, msgnum)) {
            if (msgnum != hole) {
-               strncpy (newmsg, m_name (hole), sizeof(newmsg));
-               strncpy (oldmsg, m_name (msgnum), sizeof(oldmsg));
+               strncpy (newmsg, m_name (hole), sizeof(newmsg) - 1);
+               strncpy (oldmsg, m_name (msgnum), sizeof(oldmsg) - 1);
                if (verbose)
                    printf ("message %s becomes %s\n", oldmsg, newmsg);