Include <time.h>.
(MDB_DIR_LEN): Don't include the terminating '\0' in the length.
(GEN_PATH): Args changed. Callers changed.
(struct MDatabaseInfo): Moved to database.h.
(struct MDatabase, mdb_list): Deleted.
(mdatabase__list): New var.
(get_database_filename): Deleted. Callers changed to use
get_database_file.
(find_file, get_database_file): New files.
(get_dir_info): Initialize new members of MDatabaseInfo.
(find_database): Arg chagnded. Callers changed.
(free_db_info, register_database, register_databases_in_files):
New functions.
(update_database_list): Deleted.
(mdatabase__init): Initialize mdatabase__list instead of mdb_list.
(mdatabase__fini): Finalize mdatabase__list instead of mdb_list.
(mdatabase__update): New function.
(mdatabase__check): Return value changed.
(mdatabase__file, mdatabase__lock, mdatabase__save)
(mdatabase__unlock): New functions.