eoutdent should set the correct env var.

This commit is contained in:
Roy Marples 2008-02-04 22:10:41 +00:00
parent 4c6a66c3e9
commit b1771be2d1

View File

@ -903,6 +903,7 @@ void eoutdent (void)
char *env = getenv ("EINFO_INDENT"); char *env = getenv ("EINFO_INDENT");
int amount = 0; int amount = 0;
char num[10]; char num[10];
int serrno = errno;
if (! env) if (! env)
return; return;
@ -915,11 +916,12 @@ void eoutdent (void)
amount -= INDENT_WIDTH; amount -= INDENT_WIDTH;
if (amount <= 0) if (amount <= 0)
unsetenv ("EINFO_EINDENT"); unsetenv ("EINFO_INDENT");
else { else {
snprintf (num, 10, "%08d", amount); snprintf (num, 10, "%08d", amount);
setenv ("EINFO_EINDENT", num, 1); setenv ("EINFO_INDENT", num, 1);
} }
errno = serrno;
} }
hidden_def(eoutdent) hidden_def(eoutdent)