From e6c9bdf2a30d84e35b783146ebe36314b4269ffb Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sat, 5 Jan 2008 20:43:32 +0000 Subject: Add the missing changes from the recent Makefile updates --- src/libeinfo/libeinfo.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'src/libeinfo') diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c index d80af9c0..14f254eb 100644 --- a/src/libeinfo/libeinfo.c +++ b/src/libeinfo/libeinfo.c @@ -50,10 +50,7 @@ const char libeinfo_copyright[] = "Copyright (c) 2007-2008 Roy Marples"; #include #include "einfo.h" -#include "rc.h" -#include "rc-misc.h" - -#include "hidden-visibility.h" +#include "../hidden-visibility.h" hidden_proto(ecolor) hidden_proto(ebegin) hidden_proto(ebeginv) @@ -415,19 +412,20 @@ static bool colour_terminal (FILE * __EINFO_RESTRICT f) ee += strlen (ecolors[i].name); if (ee && *ee == '=') { + char *d = strdup (ee + 1); + if (d) { + char *end = strchr (d, ':'); + if (end) + *end = '\0'; - char *d = xstrdup (ee + 1); - char *end = strchr (d, ':'); - if (end) - *end = '\0'; + c = atoi(d); - c = atoi(d); - - end = strchr (d, ';'); - if (end && *++end == '0') - bold = _me; + end = strchr (d, ';'); + if (end && *++end == '0') + bold = _me; - free (d); + free (d); + } } } strlcpy (tmp, tgoto (bold, 0, 0), sizeof (tmp)); -- cgit v1.2.3