Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/infocmp infocmp: Strip versioning from terminfo name



details:   https://anonhg.NetBSD.org/src/rev/6f3fe5b717b8
branches:  trunk
changeset: 746367:6f3fe5b717b8
user:      roy <roy%NetBSD.org@localhost>
date:      Sun Mar 29 19:10:08 2020 +0000

description:
infocmp: Strip versioning from terminfo name

diffstat:

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

diffs (29 lines):

diff -r 5475037cb3c9 -r 6f3fe5b717b8 usr.bin/infocmp/infocmp.c
--- a/usr.bin/infocmp/infocmp.c Sun Mar 29 18:54:57 2020 +0000
+++ b/usr.bin/infocmp/infocmp.c Sun Mar 29 19:10:08 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: infocmp.c,v 1.14 2020/03/28 15:50:25 christos Exp $ */
+/* $NetBSD: infocmp.c,v 1.15 2020/03/29 19:10:08 roy Exp $ */
 
 /*
  * Copyright (c) 2009, 2010, 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: infocmp.c,v 1.14 2020/03/28 15:50:25 christos Exp $");
+__RCSID("$NetBSD: infocmp.c,v 1.15 2020/03/29 19:10:08 roy Exp $");
 
 #include <sys/ioctl.h>
 
@@ -719,6 +719,10 @@
                        printf("# Reconstructed from %s\n",
                             _ti_database == NULL ?
                             "internal database" : _ti_database);
+               /* Strip internal versioning */
+               term = strchr(t->name, TERMINFO_VDELIM);
+               if (term != NULL)
+                       *term = '\0';
                printf("%s", t->name);
                if (t->_alias != NULL && *t->_alias != '\0')
                        printf("|%s", t->_alias);



Home | Main Index | Thread Index | Old Index