[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/buffer.c
From: |
Romain Francoise |
Subject: |
[Emacs-diffs] Changes to emacs/src/buffer.c |
Date: |
Sat, 10 Sep 2005 15:55:39 -0400 |
Index: emacs/src/buffer.c
diff -c emacs/src/buffer.c:1.490 emacs/src/buffer.c:1.491
*** emacs/src/buffer.c:1.490 Sat Sep 10 14:04:18 2005
--- emacs/src/buffer.c Sat Sep 10 19:55:27 2005
***************
*** 5135,5141 ****
pwd = get_current_dir_name ();
! if(!pwd)
fatal ("`get_current_dir_name' failed: %s\n", strerror (errno));
#ifndef VMS
--- 5135,5141 ----
pwd = get_current_dir_name ();
! if (!pwd)
fatal ("`get_current_dir_name' failed: %s\n", strerror (errno));
#ifndef VMS
***************
*** 5144,5149 ****
--- 5144,5151 ----
rc = strlen (pwd);
if (!(IS_DIRECTORY_SEP (pwd[rc - 1])))
{
+ /* Grow buffer to add directory separator and '\0'. */
+ pwd = (char *) xrealloc (pwd, rc + 2);
pwd[rc] = DIRECTORY_SEP;
pwd[rc + 1] = '\0';
}
***************
*** 5152,5158 ****
current_buffer->directory = make_unibyte_string (pwd, strlen (pwd));
if (! NILP (buffer_defaults.enable_multibyte_characters))
/* At this momemnt, we still don't know how to decode the
! direcotry name. So, we keep the bytes in multibyte form so
that ENCODE_FILE correctly gets the original bytes. */
current_buffer->directory
= string_to_multibyte (current_buffer->directory);
--- 5154,5160 ----
current_buffer->directory = make_unibyte_string (pwd, strlen (pwd));
if (! NILP (buffer_defaults.enable_multibyte_characters))
/* At this momemnt, we still don't know how to decode the
! directory name. So, we keep the bytes in multibyte form so
that ENCODE_FILE correctly gets the original bytes. */
current_buffer->directory
= string_to_multibyte (current_buffer->directory);