XML Output: libxo - provide single API to output TXT, XML, JSON and HTML

Simon J. Gerraty sjg at juniper.net
Thu Jul 31 03:41:12 UTC 2014


On Wed, 30 Jul 2014 21:37:54 -0400, Garance A Drosehn writes:
>It's hard to tell based on your sample output, but there's also
>the question of truncating strings.  In the text output of your

Perhaps more than a "yes" answer is warranted.
w(1) sizes those strings based on its expectation of the width of the
tty.  That can obviously be fixed/improved - but involves exposing
knowledge of the out format (or at least that it isn't TXT) to the
application. 
I'm sure there will be many cases where that sort of thing may be
needed/useful, but that's almost orthogonal to the API question.

As I mentioned, this patch was demoing the API not changing how w(1)
works, when apps are converted for real people can go as crazy as they
like (ok not true; it really is important to have consitency in terms
of the structure eg that the same XML tags are used for the same data
regardless of application - we have a team of people to keep an eye on
that stuff).

--sjg




More information about the freebsd-arch mailing list