Here are some ideas for improvements.  If you would like to contribute,
send mail to me (kb@cs.umb.edu) first.


Have external db file to avoid most path element expansions.

Configuration files so, e.g., $TEXMFROOT can get evaluated at runtime.

Make default paths have $TEXMFROOT -- means have to have some way to set
  the default for that at compilation, unless config files will do?

Don't call init_path at every lookup. (See end of tex-file.h.)

cd during filesystem operations, to keep the pathname length constant.

Separate the routines needed for path searching, and others that are here
  only because it's a common place -- i.e., a kutil library.

Do the right thing if both (e.g.) DVIPSMAKEPK and MAKETEXPK are set.
