fix a critical typo in stringListReverse

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
fix wrong prioritization of path elements of CTAGS_DATA_PATH

Path elements of CTAGS_DATA_PATH should be prioritized from left to
right. Though it was prioritized in reverse direction.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
use a macro definition for specifying CTAGS_DATA_PATH environment variable

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
introduce --data-dir=, command line alternative for CTAGS_DATA_PATH env var

With --data-dir=+DIR, you can prepend the DIR to CTAGS_DATA_PATH.  DIR
added from --data-dir is prior to paths in CTAGS_DATA_PATH; a file is
searced DIR first. Then paths in CTAGS_DATA_PATH from left to right.

If no + is given like --data-dir=DIR, CTAGS_DATA_PATH is cleared then
DIR is set to CTAGS_DATA_PATH; CTAGS_DATA_PATH has only one path.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
fix wrong description about .d dir

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
separate the concept "config name" and "config file(or directory)"

A config name can be specified with --options. The name was consider
as a file name; and the file(or directory) for the name is searched
from directories listed in CTAGS_DATA_PATH. The name was used directly
as a file name.

This patch separates the concept "config name" and "config file(or
directory)". The config file name is generated from the config name by
appending ".d", ".conf", or ".ctags". The generated file name is
searched from directories listed in CTAGS_DATA_PATH.

When --options=foo is given, foo.d is searched first. If a directory
foo.d is found in CTAGS_DATA_PATH, it is loaded.  If not found,
foo.conf is searched next. If a file foo.conf is found  in
CTAGS_DATA_PATH, it is loaded. If not found, foo.ctags is tried.

e.g.

Before introducing this patch Data/configs/mib.ctags is specified for
loading with following command line:

	$ CTAGS_DATA_DIR=Data ctags --options=mib.ctags ...

With this patch:

	$ CTAGS_DATA_DIR=Data ctags --options=mib ...

BTW, if you want to specify the file with path use the following
command line

	$ ctags --options=Data/configs/mib.ctags ...

Signed-off-by: Masatake YAMATO <yamato@redhat.com>