_ti_database now includes the database extension so don't duplicate it.

This commit is contained in:
roy 2017-05-16 09:21:54 +00:00
parent 2678fcfdf5
commit 12d2934b32
1 changed files with 6 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: infocmp.c,v 1.11 2016/03/16 21:01:28 christos Exp $ */
/* $NetBSD: infocmp.c,v 1.12 2017/05/16 09:21:54 roy Exp $ */
/*
* Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: infocmp.c,v 1.11 2016/03/16 21:01:28 christos Exp $");
__RCSID("$NetBSD: infocmp.c,v 1.12 2017/05/16 09:21:54 roy Exp $");
#include <sys/ioctl.h>
@ -712,14 +712,10 @@ main(int argc, char **argv)
use_terms(t, argc - optind, argv + optind);
if ((optind + 1 != argc && nflag == 0) || uflag != 0) {
if (uflag == 0) {
printf("# Reconstructed from ");
if (_ti_database == NULL)
printf("internal database\n");
else
printf("%s%s\n", _ti_database,
*_ti_database == '/' ? ".cdb" : "");
}
if (uflag == 0)
printf("# Reconstructed from %s\n",
_ti_database == NULL ?
"internal database" : _ti_database);
printf("%s", t->name);
if (t->_alias != NULL && *t->_alias != '\0')
printf("|%s", t->_alias);