* PATCH: needs zputs() for output of dirs -l
@ 2014-12-17 6:18 Jun Kuriyama
0 siblings, 0 replies; only message in thread
From: Jun Kuriyama @ 2014-12-17 6:18 UTC (permalink / raw)
To: zsh-workers; +Cc: Jun Kuriyama
Hi,
I found non-first line of "dirs -l" output is corrupted when dirname
includes some Japanese (UTF-8) characters. First line is OK.
I checked the source and history, then it seems one more "fputs() to
zputs() conversion" at dc060607e9d9de14f6be02a27a4b54a2643d03a8
commit is there.
This patch fixes this, at least my environment.
diff --git a/Src/builtin.c b/Src/builtin.c
index ad3a192..264169c 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -719,7 +719,7 @@ bin_dirs(UNUSED(char *name), char **argv, Options ops, UNUSED(int func))
for (node = firstnode(dirstack); node; incnode(node)) {
printf(fmt, pos++);
if (OPT_ISSET(ops,'l'))
- fputs(getdata(node), stdout);
+ zputs(getdata(node), stdout);
else
fprintdir(getdata(node), stdout);
--
Jun Kuriyama <kuriyama@FreeBSD.org> // FreeBSD Project
<kuriyama@s2factory.co.jp> // S2 Factory, Inc.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-17 6:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-17 6:18 PATCH: needs zputs() for output of dirs -l Jun Kuriyama
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).