Bug 238351 - x11-clocks/xclock: xclock -strftime option misinterprets/mishandles the %n specification
Summary: x11-clocks/xclock: xclock -strftime option misinterprets/mishandles the %n sp...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-05 22:06 UTC by Ronald F. Guilmette
Modified: 2020-07-11 19:58 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ronald F. Guilmette 2019-06-05 22:06:29 UTC
When xclock is invoked with both the -digital and -strftime options, the man page for xclock(1) suggests that the string given as the argument to the -strftime option will be interpreted as if it were a format specification given to the strftime() libc function.

This is mostly true with the exception of the %n (newline) conversion specification, which is utterly mishandled by xclock.  Instead of introducing a newline at that point in the rendered digital xclock image, xclock instead displays something that looks like an empty box character at the corresponding point in the rendered digital xclock image.

This is just wrong, and it obviously violates the Principal of Least Surprise.  If the user has explicitly requested a newline at some certain point in the format string, then he/she did so for a reason, and xclock should honor that request by splitting the rendered digital xclock image across two (or more) lines, exactly as the user had explicitly requested.  There is no compelling reason not to do so.
Comment 1 Niclas Zeising freebsd_committer 2019-07-29 12:35:23 UTC
This sounds like a bug in xclock itself, rather than the FreeBSD port of xclock.  Have you reported this upstream?
Comment 2 Ronald F. Guilmette 2019-07-29 21:19:02 UTC
I agree with your diagnosis, 100%, and no, I was meaning to report it to the xorg people, but I can't even remember now if I did or didn't.  So I probably didn't.  I'll see if I can do that now.

I guess that really, it is bugs.freedesktop.org where I should be reporting this, yes?

Well, I'll try that.  The worse that can happen is that they throw me out for being an ignorant idiot.
Comment 3 Niclas Zeising freebsd_committer 2019-07-29 21:34:55 UTC
(In reply to Ronald F. Guilmette from comment #2)
> I guess that really, it is bugs.freedesktop.org where I should be reporting
> this, yes?

I think it's better to report it in their gitlab, gitlab.freedesktop.org.
Thanks for looking into it!
Comment 4 Ronald F. Guilmette 2019-07-30 05:24:36 UTC
As requested, it has been done:

https://gitlab.freedesktop.org/xorg/app/xclock/issues/2

I am perfectly OK with the issue being closed now with respect to FreeBSD.
Comment 5 Niclas Zeising freebsd_committer 2020-07-11 19:58:34 UTC
Closing at the request of the submitter.