From: Karl Heuer Date: Mon, 6 Apr 1998 21:52:29 +0000 (+0000) Subject: (Fdirectory_files): Use make_uninit_multibyte_string. X-Git-Tag: emacs-20.3~1681 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e540cbed19a420b56eb120100f5e10318942407a;p=emacs.git (Fdirectory_files): Use make_uninit_multibyte_string. Use STRING_BYTES on encoded_directory. --- 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\ report_file_error ("Opening directory", Fcons (directory, Qnil)); list = Qnil; - dirnamelen = XSTRING (encoded_directory)->size; + dirnamelen = STRING_BYTES (XSTRING (encoded_directory)); re_match_object = Qt; /* 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\ if (dirnamelen == 0 || !IS_ANY_SEP (XSTRING (encoded_directory)->data[dirnamelen - 1])) needsep = 1; -#endif /* VMS */ +#endif /* not VMS */ GCPRO2 (encoded_directory, list); @@ -214,7 +214,8 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable.\n\ int total = len + dirnamelen; int nchars; - name = make_uninit_string (total + needsep); + name = make_uninit_multibyte_string (total + needsep, + total + needsep); bcopy (XSTRING (encoded_directory)->data, XSTRING (name)->data, dirnamelen); if (needsep)