aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-02-04 22:10:41 +0000
committerRoy Marples <roy@marples.name>2008-02-04 22:10:41 +0000
commitb1771be2d13fba7b7eca5be3cead98eb9f4efeba (patch)
tree9890af78d875e41a9189c9e1b901c22a81b91b2e
parent4c6a66c3e93edfd9ca3b409020cc9281b650cf45 (diff)
eoutdent should set the correct env var.
-rw-r--r--src/libeinfo/libeinfo.c6
1 files changed, 4 insertions, 2 deletions
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)