nmh-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-commits] [SCM] The nmh Mail Handling System branch, posix, updated.


From: Lyndon Nerenberg
Subject: [Nmh-commits] [SCM] The nmh Mail Handling System branch, posix, updated. 443c174bbffb1a91b0ff46ca13ea3a58cd49f303
Date: Sun, 25 Dec 2011 20:00:08 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The nmh Mail Handling System".

The branch, posix has been updated
       via  443c174bbffb1a91b0ff46ca13ea3a58cd49f303 (commit)
      from  1074c02d0cb2b2868cccf69161417ca27f2f9d37 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=443c174bbffb1a91b0ff46ca13ea3a58cd49f303


commit 443c174bbffb1a91b0ff46ca13ea3a58cd49f303
Author: Lyndon Nerenberg <address@hidden>
Date:   Sun Dec 25 11:58:38 2011 -0800

    Make use of mkstemp() unconditional (vs. mktemp().
    
    This patch also removes the m_scratch() and m_tmpfil() functions.
    They have been deprecated for a while, and are no longer used in any of
    the code base.

diff --git a/sbr/m_scratch.c b/sbr/m_scratch.c
deleted file mode 100644
index 3c63d09..0000000
--- a/sbr/m_scratch.c
+++ /dev/null
@@ -1,41 +0,0 @@
-
-/*
- * m_scratch.c -- construct a scratch file
- *
- * This code is Copyright (c) 2002, by the authors of nmh.  See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
-
-#include <h/mh.h>
-
-/***************************************************************************
- * DO NOT USE THIS FUNCTION!  IT WILL BE REMOVED IN THE FUTURE.
- * THIS FUNCTION IS INSECURE.  USE THE FUNCTIONS DEFINED IN m_mktemp.c.
- ***************************************************************************/
-char *
-m_scratch (char *file, char *template)
-{
-    char *cp;
-    static char buffer[BUFSIZ], tmpfil[BUFSIZ];
-
-    snprintf (tmpfil, sizeof(tmpfil), "%sXXXXXX", template);
-/*
-  Mkstemp work postponed until later -Doug
-#ifdef HAVE_MKSTEMP
-    mkstemp (tmpfil);
-#else
-*/
-    mktemp (tmpfil);
-/*
-#endif
-*/
-    /* nasty - this really means: if there is no '/' in the path */
-    if ((cp = r1bindex (file, '/')) == file)
-       strncpy (buffer, tmpfil, sizeof(buffer));
-    else
-       snprintf (buffer, sizeof(buffer), "%.*s%s", (int)(cp - file), file, 
tmpfil);
-    unlink (buffer);
-
-    return buffer;
-}
diff --git a/sbr/m_tmpfil.c b/sbr/m_tmpfil.c
deleted file mode 100644
index 291d996..0000000
--- a/sbr/m_tmpfil.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * m_tmpfil.c -- construct a temporary file
- *
- * This code is Copyright (c) 2002, by the authors of nmh.  See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
-
-#include <h/mh.h>
-
-/***************************************************************************
- * DO NOT USE THIS FUNCTION!  IT WILL BE REMOVED IN THE FUTURE.
- * THIS FUNCTION IS INSECURE.  USE THE FUNCTIONS DEFINED IN m_mktemp.c.
- ***************************************************************************/
-char *
-m_tmpfil (char *template)
-{
-    static char tmpfil[BUFSIZ];
-
-    snprintf (tmpfil, sizeof(tmpfil), "/tmp/%sXXXXXX", template);
-/*
-  Mkstemp work postponed until later -Doug
-#ifdef HAVE_MKSTEMP
-    unlink(mkstemp(tmpfil));
-#else
-*/
-    unlink(mktemp(tmpfil));
-/*
-#endif
-*/
-    return tmpfil;
-}

-----------------------------------------------------------------------

Summary of changes:
 sbr/m_scratch.c |   41 -----------------------------------------
 sbr/m_tmpfil.c  |   32 --------------------------------
 2 files changed, 0 insertions(+), 73 deletions(-)
 delete mode 100644 sbr/m_scratch.c
 delete mode 100644 sbr/m_tmpfil.c


hooks/post-receive
-- 
The nmh Mail Handling System



reply via email to

[Prev in Thread] Current Thread [Next in Thread]