emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/fileio.c,v


From: YAMAMOTO Mitsuharu
Subject: [Emacs-diffs] Changes to emacs/src/fileio.c,v
Date: Wed, 12 Jul 2006 08:37:46 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     YAMAMOTO Mitsuharu <mituharu>   06/07/12 08:37:46

Index: fileio.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fileio.c,v
retrieving revision 1.569
retrieving revision 1.570
diff -u -b -r1.569 -r1.570
--- fileio.c    11 Jul 2006 20:11:10 -0000      1.569
+++ fileio.c    12 Jul 2006 08:37:45 -0000      1.570
@@ -77,6 +77,7 @@
 #include "charset.h"
 #include "coding.h"
 #include "window.h"
+#include "blockinput.h"
 
 #ifdef WINDOWSNT
 #define NOMINMAX 1
@@ -1386,7 +1387,9 @@
          bcopy ((char *) nm, o, p - nm);
          o [p - nm] = 0;
 
+         BLOCK_INPUT;
          pw = (struct passwd *) getpwnam (o + 1);
+         UNBLOCK_INPUT;
          if (pw)
            {
              newdir = (unsigned char *) pw -> pw_dir;
@@ -1917,7 +1920,9 @@
        o[len] = 0;
 
        /* Look up the user name. */
+       BLOCK_INPUT;
        pw = (struct passwd *) getpwnam (o + 1);
+       UNBLOCK_INPUT;
        if (!pw)
          error ("\"%s\" isn't a registered user", o + 1);
 
@@ -2111,10 +2116,11 @@
              /* If we have ~user and `user' exists, discard
                 everything up to ~.  But if `user' does not exist, leave
                 ~user alone, it might be a literal file name.  */
-             if ((pw = getpwnam (o + 1)))
+             BLOCK_INPUT;
+             pw = getpwnam (o + 1);
+             UNBLOCK_INPUT;
+             if (pw)
                return p;
-             else
-               xfree (pw);
            }
          else
            return p;




reply via email to

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