comparison src/buffer.c @ 90242:5e2d3828e89f

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-91 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 581-597) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 133-141) - Update from CVS - Merge from emacs--cvs-trunk--0 - Update from CVS: texi/gnus.texi (RSS): Fix key description. - Update from CVS: texi/gnus.texi (Document Server Internals): Addition.
author Miles Bader <miles@gnu.org>
date Sat, 15 Oct 2005 00:26:05 +0000
parents 10fe5fadaf89 7e251d472f1c
children 0ca0d9181b5e
comparison
equal deleted inserted replaced
90241:c293a93ebacf 90242:5e2d3828e89f
5128 init_buffer () 5128 init_buffer ()
5129 { 5129 {
5130 char *pwd; 5130 char *pwd;
5131 struct stat dotstat, pwdstat; 5131 struct stat dotstat, pwdstat;
5132 Lisp_Object temp; 5132 Lisp_Object temp;
5133 int rc; 5133 int len;
5134 5134
5135 #ifdef USE_MMAP_FOR_BUFFERS 5135 #ifdef USE_MMAP_FOR_BUFFERS
5136 { 5136 {
5137 /* When using the ralloc implementation based on mmap(2), buffer 5137 /* When using the ralloc implementation based on mmap(2), buffer
5138 text pointers will have been set to null in the dumped Emacs. 5138 text pointers will have been set to null in the dumped Emacs.
5155 fatal ("`get_current_dir_name' failed: %s\n", strerror (errno)); 5155 fatal ("`get_current_dir_name' failed: %s\n", strerror (errno));
5156 5156
5157 #ifndef VMS 5157 #ifndef VMS
5158 /* Maybe this should really use some standard subroutine 5158 /* Maybe this should really use some standard subroutine
5159 whose definition is filename syntax dependent. */ 5159 whose definition is filename syntax dependent. */
5160 rc = strlen (pwd); 5160 len = strlen (pwd);
5161 if (!(IS_DIRECTORY_SEP (pwd[rc - 1]))) 5161 if (!(IS_DIRECTORY_SEP (pwd[len - 1])))
5162 { 5162 {
5163 /* Grow buffer to add directory separator and '\0'. */ 5163 /* Grow buffer to add directory separator and '\0'. */
5164 pwd = (char *) xrealloc (pwd, rc + 2); 5164 pwd = (char *) xrealloc (pwd, len + 2);
5165 pwd[rc] = DIRECTORY_SEP; 5165 pwd[len] = DIRECTORY_SEP;
5166 pwd[rc + 1] = '\0'; 5166 pwd[len + 1] = '\0';
5167 } 5167 }
5168 #endif /* not VMS */ 5168 #endif /* not VMS */
5169 5169
5170 current_buffer->directory = make_unibyte_string (pwd, strlen (pwd)); 5170 current_buffer->directory = make_unibyte_string (pwd, strlen (pwd));
5171 if (! NILP (buffer_defaults.enable_multibyte_characters)) 5171 if (! NILP (buffer_defaults.enable_multibyte_characters))