lib/colors: check for /etc/terminal-colors.d/[util].disable

[kzak@redhat.com: - move paths to pathnames.h,
                  - use static path buffer]

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/colors: add info to man pages, add terminal-colors.d.5

Co-Author: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/colors: support <name>.enable too

Signed-off-by: Karel Zak <kzak@redhat.com>
ipcs: fix size_t overflow

Addresses: https://github.com/karelzak/util-linux/issues/51
Signed-off-by: Karel Zak <kzak@redhat.com>
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>