From b1771be2d13fba7b7eca5be3cead98eb9f4efeba Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 4 Feb 2008 22:10:41 +0000 Subject: eoutdent should set the correct env var. --- src/libeinfo/libeinfo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libeinfo') diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c index 15e54d60..e1414384 100644 --- a/src/libeinfo/libeinfo.c +++ b/src/libeinfo/libeinfo.c @@ -903,6 +903,7 @@ void eoutdent (void) char *env = getenv ("EINFO_INDENT"); int amount = 0; char num[10]; + int serrno = errno; if (! env) return; @@ -915,11 +916,12 @@ void eoutdent (void) amount -= INDENT_WIDTH; if (amount <= 0) - unsetenv ("EINFO_EINDENT"); + unsetenv ("EINFO_INDENT"); else { snprintf (num, 10, "%08d", amount); - setenv ("EINFO_EINDENT", num, 1); + setenv ("EINFO_INDENT", num, 1); } + errno = serrno; } hidden_def(eoutdent) -- cgit v1.2.3