Mercurial > emacs
comparison src/buffer.c @ 83385:1cd4072747c6
Merged from miles@gnu.org--gnu-2005 (patch 593-595)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-593
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-594
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-595
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-425
| author | Karoly Lorentey <lorentey@elte.hu> |
|---|---|
| date | Wed, 19 Oct 2005 14:03:44 +0000 |
| parents | de684325b343 7e251d472f1c |
| children | 732c5740ca8f |
comparison
equal
deleted
inserted
replaced
| 83384:08b4dd6a6e87 | 83385:1cd4072747c6 |
|---|---|
| 5112 init_buffer () | 5112 init_buffer () |
| 5113 { | 5113 { |
| 5114 char *pwd; | 5114 char *pwd; |
| 5115 struct stat dotstat, pwdstat; | 5115 struct stat dotstat, pwdstat; |
| 5116 Lisp_Object temp; | 5116 Lisp_Object temp; |
| 5117 int rc; | 5117 int len; |
| 5118 | 5118 |
| 5119 #ifdef USE_MMAP_FOR_BUFFERS | 5119 #ifdef USE_MMAP_FOR_BUFFERS |
| 5120 { | 5120 { |
| 5121 /* When using the ralloc implementation based on mmap(2), buffer | 5121 /* When using the ralloc implementation based on mmap(2), buffer |
| 5122 text pointers will have been set to null in the dumped Emacs. | 5122 text pointers will have been set to null in the dumped Emacs. |
| 5139 fatal ("`get_current_dir_name' failed: %s\n", strerror (errno)); | 5139 fatal ("`get_current_dir_name' failed: %s\n", strerror (errno)); |
| 5140 | 5140 |
| 5141 #ifndef VMS | 5141 #ifndef VMS |
| 5142 /* Maybe this should really use some standard subroutine | 5142 /* Maybe this should really use some standard subroutine |
| 5143 whose definition is filename syntax dependent. */ | 5143 whose definition is filename syntax dependent. */ |
| 5144 rc = strlen (pwd); | 5144 len = strlen (pwd); |
| 5145 if (!(IS_DIRECTORY_SEP (pwd[rc - 1]))) | 5145 if (!(IS_DIRECTORY_SEP (pwd[len - 1]))) |
| 5146 { | 5146 { |
| 5147 /* Grow buffer to add directory separator and '\0'. */ | 5147 /* Grow buffer to add directory separator and '\0'. */ |
| 5148 pwd = (char *) xrealloc (pwd, rc + 2); | 5148 pwd = (char *) xrealloc (pwd, len + 2); |
| 5149 pwd[rc] = DIRECTORY_SEP; | 5149 pwd[len] = DIRECTORY_SEP; |
| 5150 pwd[rc + 1] = '\0'; | 5150 pwd[len + 1] = '\0'; |
| 5151 } | 5151 } |
| 5152 #endif /* not VMS */ | 5152 #endif /* not VMS */ |
| 5153 | 5153 |
| 5154 current_buffer->directory = make_unibyte_string (pwd, strlen (pwd)); | 5154 current_buffer->directory = make_unibyte_string (pwd, strlen (pwd)); |
| 5155 if (! NILP (buffer_defaults.enable_multibyte_characters)) | 5155 if (! NILP (buffer_defaults.enable_multibyte_characters)) |
