include/tt: add tt_is_empty()

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: extend API definition to list info about partitions

This change adds a struct fdisk_column to provide generic description
for information about partitions. The struct is used for tt tables as
well as lists of possible columns for specified label driver.

We use the same concept in all applications linked with tt.c (lsblk,
findmnt, partx, ...) where is possible to dynamically change columns,
order of the columns etc. Now it will be possible to do the same with
fdisk.

And it's also possible to use FDISK_COL_* Ids to address data, for
example:

   fdisk_partition_get_data(cxt, FDISK_COL_SIZE, 1, &data);

returns a string with human readable size (<num>{MGT}) of the second
partition.

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: implement generic functions for FDISK_COL_ stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (gpt) use fdisk_column

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/tt: don't hardcode stdout as output

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/tt: add tb_get_nlines()

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/tt: add TT_FL_MAX to fill screen

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/tt: add reduce term width functionality

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: add struct fdisk_partition

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: improve conversion to string

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (bsd) use new get_part() API

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: add new list() columns, cleanup

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (dos) use new list() and get_part() API

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (sgi) use new list() and get_part() API

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (sun) use new list() and get_part() API

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (gpt) remove get_partition_type()

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (bsd) remove get_partition_type()

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (dos) remove get_partition_type()

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (sgi) remove get_partition_type()

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (sun) remove get_partition_type()

Signed-off-by: Karel Zak <kzak@redhat.com>