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

2018-08-23 Thread Daniel P . Berrangé
On Thu, Aug 23, 2018 at 03:19:39PM +0200, Michal Privoznik wrote: > On 08/22/2018 07:42 PM, 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

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

2018-08-23 Thread Simon Kobyda
On Thu, 2018-08-23 at 15:19 +0200, Michal Privoznik wrote: > NB, do we need to re-encode the string? All that we care about is its > width, isn't it? Yes. Many nonprintable or control characters such as tabulator, vertical tabulator, backspace... would be problematic, especially when calculating w

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

2018-08-23 Thread Michal Privoznik
On 08/22/2018 07:42 PM, 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 - adds new

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

2018-08-23 Thread Simon Kobyda
On Wed, 2018-08-22 at 19:42 +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

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

2018-08-22 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 - appe