comparison src/fileio.c @ 83532:b19aaf4ab0ee

Merged from emacs@sv.gnu.org. Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-331 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-332 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-333 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-334 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-335 Add note about "link" button-class to etc/TODO * emacs@sv.gnu.org/emacs--devo--0--patch-336 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-337 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-338 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-339 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-340 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-341 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-342 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-343 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-344 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-345 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-346 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-347 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-348 Update for ERC 5.1.3. * emacs@sv.gnu.org/emacs--devo--0--patch-349 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-350 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/gnus--rel--5.10--patch-111 Update from CVS: texi/gnus.texi (Summary Buffer Lines): Fix typo. * emacs@sv.gnu.org/gnus--rel--5.10--patch-112 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-113 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-114 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-572
author Karoly Lorentey <lorentey@elte.hu>
date Fri, 14 Jul 2006 05:56:32 +0000
parents a387c138b28e 086c76517b02
children 02e39decdc84
comparison
equal deleted inserted replaced
83531:a387c138b28e 83532:b19aaf4ab0ee
75 #include "intervals.h" 75 #include "intervals.h"
76 #include "buffer.h" 76 #include "buffer.h"
77 #include "charset.h" 77 #include "charset.h"
78 #include "coding.h" 78 #include "coding.h"
79 #include "window.h" 79 #include "window.h"
80 #include "blockinput.h"
80 #include "frame.h" 81 #include "frame.h"
81 #include "dispextern.h" 82 #include "dispextern.h"
82 83
83 #ifdef WINDOWSNT 84 #ifdef WINDOWSNT
84 #define NOMINMAX 1 85 #define NOMINMAX 1
1386 ); p++); 1387 ); p++);
1387 o = (unsigned char *) alloca (p - nm + 1); 1388 o = (unsigned char *) alloca (p - nm + 1);
1388 bcopy ((char *) nm, o, p - nm); 1389 bcopy ((char *) nm, o, p - nm);
1389 o [p - nm] = 0; 1390 o [p - nm] = 0;
1390 1391
1392 BLOCK_INPUT;
1391 pw = (struct passwd *) getpwnam (o + 1); 1393 pw = (struct passwd *) getpwnam (o + 1);
1394 UNBLOCK_INPUT;
1392 if (pw) 1395 if (pw)
1393 { 1396 {
1394 newdir = (unsigned char *) pw -> pw_dir; 1397 newdir = (unsigned char *) pw -> pw_dir;
1395 #ifdef VMS 1398 #ifdef VMS
1396 nm = p + 1; /* skip the terminator */ 1399 nm = p + 1; /* skip the terminator */
1917 o = (unsigned char *) alloca (len + 1); 1920 o = (unsigned char *) alloca (len + 1);
1918 bcopy ((char *) user, o, len); 1921 bcopy ((char *) user, o, len);
1919 o[len] = 0; 1922 o[len] = 0;
1920 1923
1921 /* Look up the user name. */ 1924 /* Look up the user name. */
1925 BLOCK_INPUT;
1922 pw = (struct passwd *) getpwnam (o + 1); 1926 pw = (struct passwd *) getpwnam (o + 1);
1927 UNBLOCK_INPUT;
1923 if (!pw) 1928 if (!pw)
1924 error ("\"%s\" isn't a registered user", o + 1); 1929 error ("\"%s\" isn't a registered user", o + 1);
1925 1930
1926 newdir = (unsigned char *) pw->pw_dir; 1931 newdir = (unsigned char *) pw->pw_dir;
1927 1932
2111 o [s - p] = 0; 2116 o [s - p] = 0;
2112 2117
2113 /* If we have ~user and `user' exists, discard 2118 /* If we have ~user and `user' exists, discard
2114 everything up to ~. But if `user' does not exist, leave 2119 everything up to ~. But if `user' does not exist, leave
2115 ~user alone, it might be a literal file name. */ 2120 ~user alone, it might be a literal file name. */
2116 if ((pw = getpwnam (o + 1))) 2121 BLOCK_INPUT;
2122 pw = getpwnam (o + 1);
2123 UNBLOCK_INPUT;
2124 if (pw)
2117 return p; 2125 return p;
2118 else
2119 xfree (pw);
2120 } 2126 }
2121 else 2127 else
2122 return p; 2128 return p;
2123 } 2129 }
2124 } 2130 }
5853 5859
5854 static Lisp_Object 5860 static Lisp_Object
5855 do_auto_save_make_dir (dir) 5861 do_auto_save_make_dir (dir)
5856 Lisp_Object dir; 5862 Lisp_Object dir;
5857 { 5863 {
5858 return call2 (Qmake_directory, dir, Qt); 5864 Lisp_Object mode;
5865
5866 call2 (Qmake_directory, dir, Qt);
5867 XSETFASTINT (mode, 0700);
5868 return Fset_file_modes (dir, mode);
5859 } 5869 }
5860 5870
5861 static Lisp_Object 5871 static Lisp_Object
5862 do_auto_save_eh (ignore) 5872 do_auto_save_eh (ignore)
5863 Lisp_Object ignore; 5873 Lisp_Object ignore;
6051 { 6061 {
6052 if (old_message_p) 6062 if (old_message_p)
6053 { 6063 {
6054 /* If we are going to restore an old message, 6064 /* If we are going to restore an old message,
6055 give time to read ours. */ 6065 give time to read ours. */
6056 sit_for (1, 0, 0, 0, 0); 6066 sit_for (make_number (1), 0, 0);
6057 restore_message (); 6067 restore_message ();
6058 } 6068 }
6059 else 6069 else
6060 /* If we displayed a message and then restored a state 6070 /* If we displayed a message and then restored a state
6061 with no message, leave a "done" message on the screen. */ 6071 with no message, leave a "done" message on the screen. */