summaryrefslogtreecommitdiffstats
path: root/contrib/libreadline/shell.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2004-10-18 07:02:42 +0000
committerache <ache@FreeBSD.org>2004-10-18 07:02:42 +0000
commit0a8076ac56fc245cdfb48a1ac83798a3d6086c30 (patch)
treef78c1227a8143a263e4974d6bf25cf0ccde0e716 /contrib/libreadline/shell.c
parent001407b3a64c7fac1489a2ad6eeb2d23254b3e19 (diff)
downloadFreeBSD-src-0a8076ac56fc245cdfb48a1ac83798a3d6086c30.zip
FreeBSD-src-0a8076ac56fc245cdfb48a1ac83798a3d6086c30.tar.gz
Virgin import of GNU Readline 5.0
Diffstat (limited to 'contrib/libreadline/shell.c')
-rw-r--r--contrib/libreadline/shell.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/libreadline/shell.c b/contrib/libreadline/shell.c
index ad27cc1..a07e2b9 100644
--- a/contrib/libreadline/shell.c
+++ b/contrib/libreadline/shell.c
@@ -126,6 +126,7 @@ sh_set_lines_and_columns (lines, cols)
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1);
sprintf (b, "LINES=%d", lines);
putenv (b);
+
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("COLUMNS=") + 1);
sprintf (b, "COLUMNS=%d", cols);
putenv (b);
@@ -134,9 +135,12 @@ sh_set_lines_and_columns (lines, cols)
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1);
sprintf (b, "%d", lines);
setenv ("LINES", b, 1);
+ free (b);
+
b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1);
sprintf (b, "%d", cols);
setenv ("COLUMNS", b, 1);
+ free (b);
# endif /* HAVE_SETENV */
#endif /* !HAVE_PUTENV */
}
OpenPOWER on IntegriCloud