Module Name: src
Committed By: roy
Date: Thu Feb 11 14:38:43 UTC 2010
Modified Files:
src/usr.bin/infocmp: infocmp.c
Log Message:
Report when using internal database.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/infocmp/infocmp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/infocmp/infocmp.c
diff -u src/usr.bin/infocmp/infocmp.c:1.5 src/usr.bin/infocmp/infocmp.c:1.6
--- src/usr.bin/infocmp/infocmp.c:1.5 Thu Feb 11 08:46:18 2010
+++ src/usr.bin/infocmp/infocmp.c Thu Feb 11 14:38:43 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: infocmp.c,v 1.5 2010/02/11 08:46:18 roy Exp $ */
+/* $NetBSD: infocmp.c,v 1.6 2010/02/11 14:38:43 roy Exp $ */
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: infocmp.c,v 1.5 2010/02/11 08:46:18 roy Exp $");
+__RCSID("$NetBSD: infocmp.c,v 1.6 2010/02/11 14:38:43 roy Exp $");
#include <sys/ioctl.h>
@@ -438,9 +438,13 @@
name = getenv("TERM");
if (name == NULL)
name = "dumb";
- if (_ti_getterm(t, name, 1) != 1) /* load the raw data */
+ if (_ti_getterm(t, name, 1) == 1)
+ return t;
+
+ if (_ti_database == NULL)
+ errx(1, "no terminal definition found in internal database");
+ else
errx(1, "no terminal definition found in %s.db", _ti_database);
- return t;
}
static void