Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jul 2014 20:40:31 -0700
From:      "Simon J. Gerraty" <sjg@juniper.net>
To:        Garance A Drosehn <drosih@rpi.edu>
Cc:        arch@freebsd.org, marcel@freebsd.org, phil@juniper.net
Subject:   Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML
Message-ID:  <20140731034031.B2FC5580A2@chaos.jnpr.net>
In-Reply-To: <82CFA67F-BA93-44EE-BD4B-9105F89AD157@rpi.edu>
References:  <20140725044921.9F0D3580A2@chaos.jnpr.net> <82CFA67F-BA93-44EE-BD4B-9105F89AD157@rpi.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140731034031.B2FC5580A2>