zsh-workers
 help / color / mirror / code / Atom feed
* test patches
@ 1997-05-09  7:42 Zoltan Hidvegi
  1997-05-09  8:04 ` Hrvoje Niksic
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Zoltan Hidvegi @ 1997-05-09  7:42 UTC (permalink / raw)
  To: Zsh hacking and development

You can find patches for zsh-3.1.2-test1 and zsh-3.0.3-test5 on
ftp://ftp.cs.elte.hu/pub/zsh/testing/, in files

  45860 May  9 09:14 zsh-3.0.3-test5.diff.gz
 145337 May  9 09:09 zsh-3.1.2-test1.diff.sh.gz

zsh-3.1.2-test1.diff.sh.gz is a script which should be run in the zsh-3.1.1
top directory (you can use zsh <(zsh-3.1.2-test1.diff.sh.gz) to run the
script).

An interesting change is that commands like ((echo foo); echo bar) now work
(zsh used to think that this is an arithmetic expansion).

I have made an other change I'm not completely sure about.  I removed the
errflag = 1 assignment on interrupt of the foreground process from
printjob().  This is handled in update_job().  I do not understand why was
it there in printjob() (and from the deleted comments it seems that Peter
did not know it either).

This version of zsh now seems to run debian startup/shutdown scripts
without problems, but I haven't tried any dpkg runs yet.  Unfortunately
some Linux programs assume that /bin/sh has brace expansion so I'm thinking
about making ignorebraces off by default even in sh mode.  bash, ksh93 and
pdksh all do brace expansion by default.  The problem is that in zsh if
ignorebraces is not set, commands like `{foo' or `foo bar}' do not work.

Zoltan


^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: test patches
@ 1997-05-11  6:19 Zoltan Hidvegi
  0 siblings, 0 replies; 18+ messages in thread
From: Zoltan Hidvegi @ 1997-05-11  6:19 UTC (permalink / raw)
  To: Zsh hacking and development

I wrote:
> > } > There still doesn't appear to be a test in init.c for the case where
> > } > the system supports TIOCGWINSZ but the rows and columns value in the
> > } > shttyinfo.winsize structure are both zero.  In that case we ought to
> > } > be using the row and column sizes from the termcap or terminfo entry?
> 
> The patch below implements this.  It does not work for non-interactive

That patch does not work apply for zsh-3.0.3-test5.  Here is a patch for
zsh-3.0.3-test5.

Zoltan


--- Src/globals.h	1997/04/25 05:53:45	3.0.2.4
+++ Src/globals.h	1997/05/11 05:04:53
@@ -603,6 +603,10 @@
 EXTERN int tclen[TC_COUNT];
  
 EXTERN char *tcstr[TC_COUNT];
+
+/* Values of the li and co entries */
+
+EXTERN int tclines, tccolumns;
  
 /* names of the strings we want */
 #ifdef GLOBALS
--- Src/init.c	1997/04/20 07:24:12	3.0.2.4
+++ Src/init.c	1997/05/11 05:04:53
@@ -441,6 +441,9 @@
 	/* check whether terminal has automargin (wraparound) capability */
 	hasam = tgetflag("am");
 
+	tclines = tgetnum("li");
+	tccolumns = tgetnum("co");
+
 	/* if there's no termcap entry for cursor up, use single line mode: *
 	 * this is flagged by termflags which is examined in zle_refresh.c  *
 	 */
@@ -599,8 +602,9 @@
     setiparam("COLUMNS", shttyinfo.winsize.ws_col);
     setiparam("LINES", shttyinfo.winsize.ws_row);
 #else
-    setiparam("COLUMNS", 80);
-    setiparam("LINES", 24);
+    /* Using zero below sets the defaults from termcap */
+    setiparam("COLUMNS", 0);
+    setiparam("LINES", 0);
 #endif
 
     /* create hash table for multi-character emacs bindings */
--- Src/params.c	1997/04/25 05:18:50	3.0.2.7
+++ Src/params.c	1997/05/11 05:13:35
@@ -1235,23 +1235,19 @@
 zlevarsetfn(Param pm, long x)
 {
     if ((long *)pm->data == & columns) {
+	if(x <= 0)
+	    x = tccolumns > 0 ? tccolumns : 80;
 	if (x > 2)
 	    termflags &= ~TERM_NARROW;
-	else {
+	else
 	    termflags |= TERM_NARROW;
-	    if (x <= 0)
-		x = 80;		/* Arbitary, but same as init.c */
-	    else
-		x = 2;
-	}
     } else if ((long *)pm->data == & lines) {
+	if(x <= 0)
+	    x = tclines > 0 ? tclines : 24;
 	if (x > 2)
 	    termflags &= ~TERM_SHORT;
-	else {
+	else
 	    termflags |= TERM_SHORT;
-	    if (x <= 0)
-		x = 24;		/* Arbitrary, but same as init.c */
-	}
     }
 
     *((long *)pm->data) = x;


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~1997-05-13 19:13 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-05-09  7:42 test patches Zoltan Hidvegi
1997-05-09  8:04 ` Hrvoje Niksic
1997-05-09 17:50   ` Zoltan T. Hidvegi
1997-05-09  8:49 ` Bart Schaefer
1997-05-09 14:00 ` Zefram
1997-05-09 18:09   ` Zoltan T. Hidvegi
1997-05-09 20:40     ` Zefram
1997-05-09 21:04       ` Zoltan T. Hidvegi
1997-05-10 17:09 ` Bart Schaefer
1997-05-10 17:48   ` Zoltan Hidvegi
1997-05-10 19:12     ` Bart Schaefer
1997-05-11  4:57       ` Zoltan Hidvegi
1997-05-12 12:41 ` Andrej Borsenkow
1997-05-12 17:49   ` Zefram
1997-05-13  5:46     ` Andrej Borsenkow
1997-05-13 16:08       ` Zefram
1997-05-13 18:53         ` Zoltan T. Hidvegi
1997-05-11  6:19 Zoltan Hidvegi

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).