diff options
| author | Richard M. Stallman | 1998-03-21 18:23:09 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-03-21 18:23:09 +0000 |
| commit | 8ec5a40461420a6cac52c9bd089cd8bd01d0c6eb (patch) | |
| tree | b90cf03dd813238a384ba9ad500c135341de401f /src | |
| parent | b10b2daa18775dc1bd218ab6c33cae4a3f8447ab (diff) | |
| download | emacs-8ec5a40461420a6cac52c9bd089cd8bd01d0c6eb.tar.gz emacs-8ec5a40461420a6cac52c9bd089cd8bd01d0c6eb.zip | |
(Fdirectory_files): In FULL case, compute number of characters
Diffstat (limited to 'src')
| -rw-r--r-- | src/dired.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dired.c b/src/dired.c index 076b42ee40c..090f58b7252 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -206,6 +206,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.\n\ | |||
| 206 | int afterdirindex = dirnamelen; | 206 | int afterdirindex = dirnamelen; |
| 207 | int total = len + dirnamelen; | 207 | int total = len + dirnamelen; |
| 208 | int needsep = 0; | 208 | int needsep = 0; |
| 209 | int nchars; | ||
| 209 | 210 | ||
| 210 | /* Decide whether we need to add a directory separator. */ | 211 | /* Decide whether we need to add a directory separator. */ |
| 211 | #ifndef VMS | 212 | #ifndef VMS |
| @@ -221,6 +222,11 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.\n\ | |||
| 221 | XSTRING (name)->data[afterdirindex++] = DIRECTORY_SEP; | 222 | XSTRING (name)->data[afterdirindex++] = DIRECTORY_SEP; |
| 222 | bcopy (dp->d_name, | 223 | bcopy (dp->d_name, |
| 223 | XSTRING (name)->data + afterdirindex, len); | 224 | XSTRING (name)->data + afterdirindex, len); |
| 225 | nchars = chars_in_text (dp->d_name, | ||
| 226 | afterdirindex + len); | ||
| 227 | XSTRING (name)->size = nchars; | ||
| 228 | if (nchars == STRING_BYTES (XSTRING (name))) | ||
| 229 | SET_STRING_BYTES (XSTRING (name), -1); | ||
| 224 | } | 230 | } |
| 225 | else | 231 | else |
| 226 | name = make_string (dp->d_name, len); | 232 | name = make_string (dp->d_name, len); |