Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libterminfo Conditionalize a few more functions (hopeful...
details: https://anonhg.NetBSD.org/src/rev/e4a699722c16
branches: trunk
changeset: 1008909:e4a699722c16
user: martin <martin%NetBSD.org@localhost>
date: Sun Apr 05 14:53:39 2020 +0000
description:
Conditionalize a few more functions (hopefully fixing the build)
diffstat:
lib/libterminfo/term.c | 14 ++++++++------
lib/libterminfo/termcap.c | 7 ++++---
2 files changed, 12 insertions(+), 9 deletions(-)
diffs (91 lines):
diff -r 5574e0ff0acc -r e4a699722c16 lib/libterminfo/term.c
--- a/lib/libterminfo/term.c Sun Apr 05 14:36:43 2020 +0000
+++ b/lib/libterminfo/term.c Sun Apr 05 14:53:39 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: term.c,v 1.33 2020/04/05 12:31:02 roy Exp $ */
+/* $NetBSD: term.c,v 1.34 2020/04/05 14:53:39 martin Exp $ */
/*
* Copyright (c) 2009, 2010, 2011, 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: term.c,v 1.33 2020/04/05 12:31:02 roy Exp $");
+__RCSID("$NetBSD: term.c,v 1.34 2020/04/05 14:53:39 martin Exp $");
#include <sys/stat.h>
@@ -349,6 +349,11 @@
static int
_ti_findterm(TERMINAL *term, const char *name, int flags)
{
+#ifndef TERMINFO_DB
+ _ti_database = NULL;
+
+ return 0;
+#else
int r;
char *c, *e;
@@ -359,10 +364,8 @@
r = 0;
e = getenv("TERMINFO");
-#ifdef TERMINFO_DB
if (e != NULL && *e == '/')
return _ti_dbgetterm(term, e, name, flags);
-#endif
c = NULL;
#ifdef TERMINFO_COMPILE
@@ -410,9 +413,7 @@
return r;
}
}
-#endif
-#ifdef TERMINFO_DB
if ((e = getenv("TERMINFO_DIRS")) != NULL)
return _ti_dbgettermp(term, e, name, flags);
@@ -427,6 +428,7 @@
#endif
return r;
+#endif
}
int
diff -r 5574e0ff0acc -r e4a699722c16 lib/libterminfo/termcap.c
--- a/lib/libterminfo/termcap.c Sun Apr 05 14:36:43 2020 +0000
+++ b/lib/libterminfo/termcap.c Sun Apr 05 14:53:39 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: termcap.c,v 1.23 2020/03/27 17:39:53 christos Exp $ */
+/* $NetBSD: termcap.c,v 1.24 2020/04/05 14:53:39 martin Exp $ */
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: termcap.c,v 1.23 2020/03/27 17:39:53 christos Exp $");
+__RCSID("$NetBSD: termcap.c,v 1.24 2020/04/05 14:53:39 martin Exp $");
#include <assert.h>
#include <ctype.h>
@@ -183,6 +183,7 @@
return tiparm(cm, destline, destcol);
}
+#ifdef TERMINFO_COMPILE
static const char *
flagname(const char *key)
{
@@ -600,4 +601,4 @@
*ip = '\0';
return info;
}
-
+#endif
Home |
Main Index |
Thread Index |
Old Index