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 if using internal database or not.



details:   https://anonhg.NetBSD.org/src/rev/f13e20fb7fb1
branches:  trunk
changeset: 752014:f13e20fb7fb1
user:      roy <roy%NetBSD.org@localhost>
date:      Thu Feb 11 08:46:18 2010 +0000

description:
Report if using internal database or not.

diffstat:

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

diffs (34 lines):

diff -r e0dcd7045a1a -r f13e20fb7fb1 usr.bin/infocmp/infocmp.c
--- a/usr.bin/infocmp/infocmp.c Thu Feb 11 07:00:46 2010 +0000
+++ b/usr.bin/infocmp/infocmp.c Thu Feb 11 08:46:18 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: infocmp.c,v 1.4 2010/02/05 16:43:46 roy Exp $ */
+/* $NetBSD: infocmp.c,v 1.5 2010/02/11 08:46:18 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: infocmp.c,v 1.4 2010/02/05 16:43:46 roy Exp $");
+__RCSID("$NetBSD: infocmp.c,v 1.5 2010/02/11 08:46:18 roy Exp $");
 
 #include <sys/ioctl.h>
 
@@ -713,8 +713,13 @@
                use_terms(t, argc - optind, argv + optind);
 
        if ((optind + 1 != argc && nflag == 0) || uflag != 0) {
-               if (uflag == 0)
-                       printf("# Reconstructed from %s.db\n", _ti_database);
+               if (uflag == 0) {
+                       printf("# Reconstructed from ");
+                       if (_ti_database == NULL)
+                               printf("internal database\n");
+                       else
+                               printf("%s.db\n", _ti_database);
+               }
                printf("%s", t->name);
                if (t->_alias != NULL && *t->_alias != '\0')
                        printf("|%s", t->_alias);



Home | Main Index | Thread Index | Old Index