]> git.pld-linux.org Git - packages/mksh.git/commitdiff
- non-interactive mksh can inherit COLUMNS and LINES from parent process; auto/th/mksh-40d-3
authorKacper Kornet <draenog@pld-linux.org>
Fri, 9 Mar 2012 17:53:12 +0000 (17:53 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  fixes git-core-1.7.10-rc0 test suite

Changed files:
    mksh-columns.patch -> 1.1
    mksh.spec -> 1.38

mksh-columns.patch [new file with mode: 0644]
mksh.spec

diff --git a/mksh-columns.patch b/mksh-columns.patch
new file mode 100644 (file)
index 0000000..06c24dc
--- /dev/null
@@ -0,0 +1,31 @@
+diff -u -p -u -p -r1.522 sh.h
+--- sh.h       3 Mar 2012 21:31:21 -0000       1.522
++++ sh.h       9 Mar 2012 15:14:49 -0000
+@@ -855,7 +855,7 @@ EXTERN char        *current_wd;
+  */
+ #define MIN_COLS      (2 + MIN_EDIT_SPACE + 3)
+ #define MIN_LINS      3
+-EXTERN mksh_ari_t x_cols E_INIT(80);  /* tty columns */
++EXTERN mksh_ari_t x_cols E_INIT(-1);  /* tty columns */
+ EXTERN mksh_ari_t x_lins E_INIT(-1);  /* tty lines */
+ /* These to avoid bracket matching problems */
+diff -u -p -u -p -r1.141 var.c
+--- var.c      3 Mar 2012 21:31:23 -0000       1.141
++++ var.c      9 Mar 2012 15:14:49 -0000
+@@ -1458,14 +1458,13 @@ set_array(const char *var, bool reset, c
+ void
+ change_winsz(void)
+ {
+-      if (x_lins < 0) {
++      if (x_cols < 0 && x_lins < 0) {
+               /* first time initialisation */
+ #ifdef TIOCGWINSZ
+               if (tty_fd < 0)
+                       /* non-FTALKING, try to get an fd anyway */
+                       tty_init(true, false);
+ #endif
+-              x_cols = -1;
+       }
+ #ifdef TIOCGWINSZ
index 41aaf71ea5a2d198e91c849bdcfa1b6b56f5bcf7..23fcbb02cad4aaa652a89620cbb8c01956ca8952 100644 (file)
--- a/mksh.spec
+++ b/mksh.spec
@@ -5,7 +5,7 @@ Summary:        MirBSD Korn Shell
 Summary(pl.UTF-8):     Powłoka Korna z MirBSD
 Name:          mksh
 Version:       40d
-Release:       2
+Release:       3
 License:       BSD
 Group:         Applications/Shells
 Source0:       http://www.mirbsd.org/MirOS/dist/mir/mksh/%{name}-R%{version}.cpio.gz
@@ -16,6 +16,7 @@ Patch1:               %{name}-circumflex.patch
 Patch2:                %{name}-no_stop_alias.patch
 Patch3:                %{name}-distro.patch
 Patch4:                %{name}-cmdline-length.patch
+Patch5:                %{name}-columns.patch
 URL:           https://www.mirbsd.org/mksh.htm
 %if %{with tests}
 BuildRequires: ed
@@ -86,6 +87,7 @@ mv mksh/* .; rmdir mksh
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p0
 
 sed -i -e 's#@DISTRO@#PLD/Linux 3.0#g' check.t sh.h
 
This page took 0.109765 seconds and 4 git commands to generate.