Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/infocmp Report when using internal database.



details:   https://anonhg.NetBSD.org/src/rev/493e35c19010
branches:  trunk
changeset: 752029:493e35c19010
user:      roy <roy%NetBSD.org@localhost>
date:      Thu Feb 11 14:38:43 2010 +0000

description:
Report when using internal database.

diffstat:

 usr.bin/infocmp/infocmp.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r c4fe71747b66 -r 493e35c19010 usr.bin/infocmp/infocmp.c
--- a/usr.bin/infocmp/infocmp.c Thu Feb 11 14:36:32 2010 +0000
+++ b/usr.bin/infocmp/infocmp.c Thu Feb 11 14:38:43 2010 +0000
@@ -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



Home | Main Index | Thread Index | Old Index