zsh-workers
 help / color / mirror / code / Atom feed
From: <hzoli@VNET.IBM.COM> (Zoltan T. Hidvegi)
To: schaefer@nbn.com
Cc: zsh-workers@math.gatech.edu (Zsh workers list)
Subject: Re: zle_refresh patch 2
Date: Wed, 5 Mar 1997 18:47:55 -0500 (EST)	[thread overview]
Message-ID: <9703052347.AA20952@lotto.fishkill.ibm.com> (raw)
In-Reply-To: <970305150606.ZM7318@candle.brasslantern.com> from Bart Schaefer at "Mar 5, 97 03:06:05 pm"

Bart Schaefer wrote:
> This patch is against the base 3.0.3-test4, so there may be a conflict in
> the utils.c hunk with Geoff's patch.  Nevertheless, the rest of Geoff's
> patch (to the zle* files) is required.

Fine, but there are two problems: shortterm is a zle variable and in 3.1
utils.c has no access to zle globals.  The other problem is that
resetneeded local variable has the same name as a global one, which is
misleading.  Also a comparision should use >= 3 instead on > 3.  I simply
removed the resetneeded variable, since it was really unnecessary.

Zoltan


diff -c Src/params.c.bart Src/params.c
*** Src/params.c.bart   Wed Mar  5 18:40:19 1997
--- Src/params.c        Wed Mar  5 18:42:57 1997
***************
*** 1266,1273 ****
  void
  zlevarsetfn(Param pm, long x)
  {
-     int resetneeded = 0;
-
      if ((long *)pm->data == & columns) {
        if (x < 3) {
            if (x <= 0)
--- 1266,1271 ----
***************
*** 1275,1297 ****
            else
                x = 2;
            termok = TERM_BAD;
!       } else if (columns < 3)
!           resetneeded = 1;
      } else if ((long *)pm->data == & lines) {
        if (x < 3) {
            if (x <= 0)
                x = 24;         /* Arbitrary, but same as init.c */
            termok = TERM_NOUP;
!       } else if (lines < 3)
!           resetneeded = 1;
      }

      *((long *)pm->data) = x;
-
-     if (resetneeded) {
-       if (lines > 3 && columns > 3 && termok != TERM_OK)
-           init_term();        /* Attempt to reset termok properly */
-     }
  }

  /* Function to set value of generic special scalar    *
--- 1273,1290 ----
            else
                x = 2;
            termok = TERM_BAD;
!       } else if (columns < 3 && lines >= 3 && termok != TERM_OK)
!           init_term();        /* Attempt to reset termok properly */
      } else if ((long *)pm->data == & lines) {
        if (x < 3) {
            if (x <= 0)
                x = 24;         /* Arbitrary, but same as init.c */
            termok = TERM_NOUP;
!       } else if (lines < 3 && columns >= 3 && termok != TERM_OK)
!           init_term();        /* Attempt to reset termok properly */
      }

      *((long *)pm->data) = x;
  }

  /* Function to set value of generic special scalar    *
diff -c Src/utils.c.bart Src/utils.c
*** Src/utils.c.bart    Wed Mar  5 18:39:57 1997
--- Src/utils.c Wed Mar  5 18:40:22 1997
***************
*** 813,820 ****
        }
      }
  #endif   /*  TIOCGWINSZ */
-     DPUTS((!(isset(SINGLELINEZLE) || termok != TERM_OK || lines < 3)
-          != !shortterm), "BUG: shortterm wrong in adjustwinsize");
  }

  /* Move a fd to a place >= 10 and mark the new fd in fdtable.  If the fd *
--- 813,818 ----


  reply	other threads:[~1997-03-06  0:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-03 10:55 gwing
1997-02-03 18:05 ` Bart Schaefer
1997-02-03 18:34   ` gwing
1997-02-03 19:03     ` Bart Schaefer
1997-02-04  8:25     ` Peter Stephenson
1997-03-05 20:56   ` Zoltan T. Hidvegi
1997-03-05 21:55     ` Bart Schaefer
1997-03-05 23:06       ` Bart Schaefer
1997-03-05 23:47         ` Zoltan T. Hidvegi [this message]
1997-03-06  0:51           ` Bart Schaefer
1997-03-06  3:56             ` gwing
1997-03-06  4:58               ` Bart Schaefer
1997-03-06  5:03                 ` gwing
1997-03-06 18:32                   ` Zoltan T. Hidvegi
1997-03-06 18:58             ` Zoltan T. Hidvegi
1997-03-05 23:52 Zoltan T. Hidvegi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9703052347.AA20952@lotto.fishkill.ibm.com \
    --to=hzoli@vnet.ibm.com \
    --cc=schaefer@nbn.com \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).