maintainer-feedback requested: [Bug 238351] x11-clocks/xclock: xclock -strftime option misinterprets/mishandles the %n specification

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jun 5 22:06:32 UTC 2019


Bugzilla Automation <bugzilla at FreeBSD.org> has asked freebsd-x11 mailing list
<x11 at FreeBSD.org> for maintainer-feedback:
Bug 238351: x11-clocks/xclock: xclock -strftime option misinterprets/mishandles
the %n specification
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238351



--- Description ---
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.


More information about the freebsd-x11 mailing list