diff options
| author | Karl Heuer | 1998-04-06 21:52:29 +0000 |
|---|---|---|
| committer | Karl Heuer | 1998-04-06 21:52:29 +0000 |
| commit | e540cbed19a420b56eb120100f5e10318942407a (patch) | |
| tree | d716f78532e793f653c8e035d53af848d792c360 /src | |
| parent | 2ca250f9bea7fee43a65787e4f2ff1894243ed24 (diff) | |
| download | emacs-e540cbed19a420b56eb120100f5e10318942407a.tar.gz emacs-e540cbed19a420b56eb120100f5e10318942407a.zip | |
(Fdirectory_files): Use make_uninit_multibyte_string.
Use STRING_BYTES on encoded_directory.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dired.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dired.c b/src/dired.c index 12406b8041b..4c1f62e27fd 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -183,7 +183,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.\n\ | |||
| 183 | report_file_error ("Opening directory", Fcons (directory, Qnil)); | 183 | report_file_error ("Opening directory", Fcons (directory, Qnil)); |
| 184 | 184 | ||
| 185 | list = Qnil; | 185 | list = Qnil; |
| 186 | dirnamelen = XSTRING (encoded_directory)->size; | 186 | dirnamelen = STRING_BYTES (XSTRING (encoded_directory)); |
| 187 | re_match_object = Qt; | 187 | re_match_object = Qt; |
| 188 | 188 | ||
| 189 | /* Decide whether we need to add a directory separator. */ | 189 | /* Decide whether we need to add a directory separator. */ |
| @@ -191,7 +191,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.\n\ | |||
| 191 | if (dirnamelen == 0 | 191 | if (dirnamelen == 0 |
| 192 | || !IS_ANY_SEP (XSTRING (encoded_directory)->data[dirnamelen - 1])) | 192 | || !IS_ANY_SEP (XSTRING (encoded_directory)->data[dirnamelen - 1])) |
| 193 | needsep = 1; | 193 | needsep = 1; |
| 194 | #endif /* VMS */ | 194 | #endif /* not VMS */ |
| 195 | 195 | ||
| 196 | GCPRO2 (encoded_directory, list); | 196 | GCPRO2 (encoded_directory, list); |
| 197 | 197 | ||
| @@ -214,7 +214,8 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.\n\ | |||
| 214 | int total = len + dirnamelen; | 214 | int total = len + dirnamelen; |
| 215 | int nchars; | 215 | int nchars; |
| 216 | 216 | ||
| 217 | name = make_uninit_string (total + needsep); | 217 | name = make_uninit_multibyte_string (total + needsep, |
| 218 | total + needsep); | ||
| 218 | bcopy (XSTRING (encoded_directory)->data, XSTRING (name)->data, | 219 | bcopy (XSTRING (encoded_directory)->data, XSTRING (name)->data, |
| 219 | dirnamelen); | 220 | dirnamelen); |
| 220 | if (needsep) | 221 | if (needsep) |