Re: [libvirt] [PATCH v3 1/3] vsh: Add API for printing tables.

2018-08-22 Thread Daniel P . Berrangé
On Wed, Aug 22, 2018 at 12:50:12PM +0200, Simon Kobyda wrote: > On Tue, 2018-08-21 at 11:46 +0100, Daniel P. Berrangé wrote: > > On Tue, Aug 21, 2018 at 12:27:34PM +0200, Michal Privoznik wrote: > > > On 08/21/2018 11:18 AM, Simon Kobyda wrote: > > > > On Thu, 2018-08-16 at 12:28 +0100, Daniel P.

Re: [libvirt] [PATCH v3 1/3] vsh: Add API for printing tables.

2018-08-22 Thread Simon Kobyda
On Tue, 2018-08-21 at 11:46 +0100, Daniel P. Berrangé wrote: > On Tue, Aug 21, 2018 at 12:27:34PM +0200, Michal Privoznik wrote: > > On 08/21/2018 11:18 AM, Simon Kobyda wrote: > > > On Thu, 2018-08-16 at 12:28 +0100, Daniel P. Berrangé wrote: > > > > On Thu, Aug 16, 2018 at 12:56:24PM +0200,

Re: [libvirt] [PATCH v3 1/3] vsh: Add API for printing tables.

2018-08-21 Thread Daniel P . Berrangé
On Tue, Aug 21, 2018 at 12:27:34PM +0200, Michal Privoznik wrote: > On 08/21/2018 11:18 AM, Simon Kobyda wrote: > > On Thu, 2018-08-16 at 12:28 +0100, Daniel P. Berrangé wrote: > >> On Thu, Aug 16, 2018 at 12:56:24PM +0200, Simon Kobyda wrote: > >>> > >> > >> After asking around I have found the

Re: [libvirt] [PATCH v3 1/3] vsh: Add API for printing tables.

2018-08-21 Thread Michal Privoznik
On 08/21/2018 11:18 AM, Simon Kobyda wrote: > On Thu, 2018-08-16 at 12:28 +0100, Daniel P. Berrangé wrote: >> On Thu, Aug 16, 2018 at 12:56:24PM +0200, Simon Kobyda wrote: >>> >> >> After asking around I have found the right solution that we need to >> use >> for measuring string width.

Re: [libvirt] [PATCH v3 1/3] vsh: Add API for printing tables.

2018-08-21 Thread Simon Kobyda
On Thu, 2018-08-16 at 12:28 +0100, Daniel P. Berrangé wrote: > On Thu, Aug 16, 2018 at 12:56:24PM +0200, Simon Kobyda wrote: > > > > After asking around I have found the right solution that we need to > use > for measuring string width. mbstowcs()/wcswidth() will get the > answer > wrong wrt

Re: [libvirt] [PATCH v3 1/3] vsh: Add API for printing tables.

2018-08-16 Thread Daniel P . Berrangé
On Thu, Aug 16, 2018 at 02:05:45PM +0200, Ján Tomko wrote: > On Thu, Aug 16, 2018 at 12:56:24PM +0200, Simon Kobyda wrote: > > It solves problems with alignment of columns. Width of each column > > is calculated by its biggest cell. Should solve unicode bug. > > In future, it may be implemented in

Re: [libvirt] [PATCH v3 1/3] vsh: Add API for printing tables.

2018-08-16 Thread Ján Tomko
On Thu, Aug 16, 2018 at 12:56:24PM +0200, Simon Kobyda wrote: It solves problems with alignment of columns. Width of each column is calculated by its biggest cell. Should solve unicode bug. In future, it may be implemented in virsh, virt-admin... This API has 5 public functions: - vshTableNew -

Re: [libvirt] [PATCH v3 1/3] vsh: Add API for printing tables.

2018-08-16 Thread Daniel P . Berrangé
On Thu, Aug 16, 2018 at 12:56:24PM +0200, Simon Kobyda wrote: > It solves problems with alignment of columns. Width of each column > is calculated by its biggest cell. Should solve unicode bug. > In future, it may be implemented in virsh, virt-admin... > > This API has 5 public functions: > -

[libvirt] [PATCH v3 1/3] vsh: Add API for printing tables.

2018-08-16 Thread Simon Kobyda
It solves problems with alignment of columns. Width of each column is calculated by its biggest cell. Should solve unicode bug. In future, it may be implemented in virsh, virt-admin... This API has 5 public functions: - vshTableNew - adds new table and defines its header - vshTableRowAppend -