zsh-workers
 help / color / mirror / code / Atom feed
* Latest patched development version
@ 1998-12-14 13:57 Peter Stephenson
  1998-12-14 15:56 ` zerr() and errflag (Re: Latest patched development version) Bart Schaefer
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Peter Stephenson @ 1998-12-14 13:57 UTC (permalink / raw)
  To: Zsh hackers list

I have put a new patched version of zsh 3.1.5 at

http://www.ifh.de/~pws/computing/zsh-3.1.5-pws-3.tar.gz

(the previous file zsh-3.1.5-patched.tar.gz has now disappeared).
It has the version number 3.1.5-pws-3 even though 1 and 2 weren't
numbered.  The following is a list of additions since the previous
version.  I am being less conservative than Zefram will presumably be
when 3.1.6 appears (I notice Zefram's keeping very quiet).  Note in
particular zftp, which is by no means guaranteed to compile on all
machines yet; there isn't even yet a not-even-attempting-to-compile
test (probably the presence of socket() would be a good one for that).
Fairly detailed reports about headers and libraries would be helpful.
If the worst comes to the worst, stick #if 0...#endif around the code
in Src/Modules/zftp.c .


4482 (cdmatch2)and 4641 (${assoc[0]}) now applied; 4641 was supposed
to be there before.

nroff manual pages deleted, you now need yodl.

deleted modules-bltin by hand, which `make distclean' somehow missed.
Caused problems when building a statically linked shell.

Bart's scanmatchtable fix, 4674

Commented out vifirstnonblank() in vioperswapcase(), pending any
better patch for it.

Bart's viforwardword fix, 4678

My case-independent globbing fix (case-independent testing was broken
after a top level *), 4693

Sven's zle_tricky.c, 4697

Sven's patch to ignore completions if the cursor is not in a part to
be completed, 4698, plus addition, 4707

I have not added Sven's zerr() patch, 4699, in case it has side
effects, but I haven't heard anything on the subject and I haven't
looked at it.

Sven's pennockite heap memory patch, 4700

Sven's condition module patch, 4716, and addition, 4732, and the
function wrapper patch, 4734, and additions, 4742, 4769: the module.c
bits of these have been moved around a little to avoid clashes with
the AIXDYNAMIC stuff.  The wrapper stuff is still not finished, but
doesn't currently impinge on use of the shell.

Phil Pennock's patch to use associative arrays in stat, 4727

Unposted fix for use of printcompctlptr in completion widgets:
printcompctl() had acquired another argument.  (None of the mucking
around with completion widgets to fit in with the latest completion
code has been separately posted.)

My bash-like ${foo/orig/new} patch, 4736, and the version to do
shortest matching together with optimizations of all pattern matching
in variable strings, 4754.

Phil's patch for typeset -a docs, 4737

Nobody wanted my fix for `FOO=x eval external', so it's not there.

zftp, 4761

Bart's fix for conddef without dynamical modules, 4762

Bart's associative array patches for implentation of subscripting flags,
4763, plus fix 4766; typeset output 4764

Sven's completion listing fix, 4767

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


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

* zerr() and errflag (Re: Latest patched development version)
  1998-12-14 13:57 Latest patched development version Peter Stephenson
@ 1998-12-14 15:56 ` Bart Schaefer
  1998-12-14 16:32   ` Peter Stephenson
  1998-12-14 17:05 ` Latest patched development version Bruce Stephens
  1998-12-14 18:54 ` Phil Pennock
  2 siblings, 1 reply; 8+ messages in thread
From: Bart Schaefer @ 1998-12-14 15:56 UTC (permalink / raw)
  To: Zsh hackers list

On Dec 14,  2:57pm, Peter Stephenson wrote:
} Subject: Latest patched development version
}
} I have not added Sven's zerr() patch, 4699, in case it has side
} effects, but I haven't heard anything on the subject and I haven't
} looked at it.

I've noticed a couple of other places in the code where zerr() is
called and then errflag is explicitly set.  This makes me think that
either (a) there is an undesired side effect, or (b) everybody else
who has noticed errflag bugs has been worried about (a) and therefore
fixed errflag in the caller.

Personally, I think it was a bad idea for zerr() to have the side-
effect of setting errflag in the first place.

In any case, if zerr() needs Sven's fix, then so does zerrnam() a few
lines later.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


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

* Re: zerr() and errflag (Re: Latest patched development version)
  1998-12-14 15:56 ` zerr() and errflag (Re: Latest patched development version) Bart Schaefer
@ 1998-12-14 16:32   ` Peter Stephenson
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Stephenson @ 1998-12-14 16:32 UTC (permalink / raw)
  To: Zsh hackers list

"Bart Schaefer" wrote:
> I've noticed a couple of other places in the code where zerr() is
> called and then errflag is explicitly set.  This makes me think that
> either (a) there is an undesired side effect, or (b) everybody else
> who has noticed errflag bugs has been worried about (a) and therefore
> fixed errflag in the caller.

Seems to be mainly in params.c, so it's possible it's just due to
someone once getting the wrong end of the stick.

> Personally, I think it was a bad idea for zerr() to have the side-
> effect of setting errflag in the first place.

Hence the distinction between zwarnnam() and zerrnam(), but there's no
zwarn(), mainly because it required too much new code and my seratonin
level wasn't high enough at the time, or something.  With the complete
set of four functions I think it's OK to have zerr() set errflag.  One
day I may get so fed up with potentials between adjoint sources in
SU(2) lattice gauge theory that I look at all the errflags.

> In any case, if zerr() needs Sven's fix, then so does zerrnam() a few
> lines later.

Maybe I just have to bite the bullet and try out both replacements.
It's too hard to tell what happens otherwise.

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


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

* Re: Latest patched development version
  1998-12-14 13:57 Latest patched development version Peter Stephenson
  1998-12-14 15:56 ` zerr() and errflag (Re: Latest patched development version) Bart Schaefer
@ 1998-12-14 17:05 ` Bruce Stephens
  1998-12-14 17:27   ` Peter Stephenson
  1998-12-14 17:31   ` Bruce Stephens
  1998-12-14 18:54 ` Phil Pennock
  2 siblings, 2 replies; 8+ messages in thread
From: Bruce Stephens @ 1998-12-14 17:05 UTC (permalink / raw)
  To: Zsh hackers list

Peter Stephenson <pws@ibmth.df.unipi.it> writes:

> I have put a new patched version of zsh 3.1.5 at
> 
> http://www.ifh.de/~pws/computing/zsh-3.1.5-pws-3.tar.gz

This fails to build for me on Solaris 2.5.1 with 

	./configure --enable-dynamic --prefix=/local

rm -f zsh
cc  -s  -o zsh main.o `cat stamp-modobjs`   -lsocket -ldl -lnsl -ltermcap -lc
Undefined                       first referenced
 symbol                             in file
wrappers                            exec.o
unload_module                       exec.o
ld: fatal: Symbol referencing errors. No output written to zsh
*** Error code 1

It fails for both SunPro C and egcs-1.1.1.  egcs also complains about
wrappers in init.c; I don't know why SunPro isn't complaining about
this file.


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

* Re: Latest patched development version
  1998-12-14 17:05 ` Latest patched development version Bruce Stephens
@ 1998-12-14 17:27   ` Peter Stephenson
  1998-12-14 17:31   ` Bruce Stephens
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Stephenson @ 1998-12-14 17:27 UTC (permalink / raw)
  To: Bruce Stephens, Zsh hackers list

Bruce Stephens wrote:
> Undefined                       first referenced
>  symbol                             in file
> wrappers                            exec.o
> unload_module                       exec.o

It's the problem Bart was complaining about when you compile without
dynamic loading.  The following will fix this; I have updated
http://www.ifh.de/~pws/computing/zsh-3.1.5-pws-3.tar.gz
as well. (I have now successfully compiled this statically linked, so
after this you're on your own :-).)

The module.c chunk may well be my fault, since I moved Sven's bits
around to fit in with AIXDYNAMIC --- hence this chunk is not relevant
if you are building your own 3.1.5 patched version.  For the exec.c
part, Sven will have to decide eventually where the #ifdef DYNAMIC
should really go, but this does not currently affect use of the shell
at all so anyone trying to get this version to compile doesn't need to
worry about that.

*** Src/exec.c.wrap	Mon Dec 14 18:05:02 1998
--- Src/exec.c	Mon Dec 14 18:03:12 1998
***************
*** 2777,2786 ****
--- 2777,2788 ----
  	wrap->count--;
  	if (!wrap->count) {
  	    wrap->module->flags &= ~MOD_WRAPPER;
+ #ifdef DYNAMIC
  	    if (wrap->module->flags & MOD_UNLOAD) {
  		wrap->module->flags &= ~MOD_UNLOAD;
  		unload_module(wrap->module, NULL);
  	    }
+ #endif
  	}
  	if (!cont)
  	    return;
*** Src/module.c.wrap	Mon Dec 14 18:05:23 1998
--- Src/module.c	Mon Dec 14 18:04:27 1998
***************
*** 90,95 ****
--- 90,124 ----
      return hadf ? hads : 1;
  }
  
+ /* The list of function wrappers defined. */
+ 
+ /**/
+ FuncWrap wrappers;
+ 
+ /* This adds a definition for a wrapper. Return value is one in case of *
+  * error and zero if all went fine. */
+ 
+ /**/
+ int
+ addwrapper(Module m, FuncWrap w)
+ {
+     FuncWrap p, q;
+ 
+     if (w->flags & WRAPF_ADDED)
+ 	return 1;
+     for (p = wrappers, q = NULL; p; q = p, p = p->next);
+     if (q)
+ 	q->next = w;
+     else
+ 	wrappers = w;
+     w->next = NULL;
+     w->flags |= WRAPF_ADDED;
+     w->module = m;
+     w->count = 0;
+ 
+     return 0;
+ }
+ 
  #ifdef DYNAMIC
  
  /* $module_path ($MODULE_PATH) */
***************
*** 159,193 ****
  	b->flags &= ~BINF_ADDED;
      }
      return hadf ? hads : 1;
- }
-   
- /* The list of function wrappers defined. */
- 
- /**/
- FuncWrap wrappers;
- 
- /* This adds a definition for a wrapper. Return value is one in case of *
-  * error and zero if all went fine. */
- 
- /**/
- int
- addwrapper(Module m, FuncWrap w)
- {
-     FuncWrap p, q;
- 
-     if (w->flags & WRAPF_ADDED)
- 	return 1;
-     for (p = wrappers, q = NULL; p; q = p, p = p->next);
-     if (q)
- 	q->next = w;
-     else
- 	wrappers = w;
-     w->next = NULL;
-     w->flags |= WRAPF_ADDED;
-     w->module = m;
-     w->count = 0;
- 
-     return 0;
  }
  
  /* This removes the given wrapper definition from the list. Returned is *
--- 188,193 ----

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


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

* Re: Latest patched development version
  1998-12-14 17:05 ` Latest patched development version Bruce Stephens
  1998-12-14 17:27   ` Peter Stephenson
@ 1998-12-14 17:31   ` Bruce Stephens
  1 sibling, 0 replies; 8+ messages in thread
From: Bruce Stephens @ 1998-12-14 17:31 UTC (permalink / raw)
  To: Zsh hackers list

Bruce Stephens <b.stephens@isode.com> writes:

> Peter Stephenson <pws@ibmth.df.unipi.it> writes:
> 
> > I have put a new patched version of zsh 3.1.5 at
> > 
> > http://www.ifh.de/~pws/computing/zsh-3.1.5-pws-3.tar.gz
> 
> This fails to build for me on Solaris 2.5.1 with 
> 
> 	./configure --enable-dynamic --prefix=/local

egcs-1.1.1 gives the following:

rm -f zsh
gcc  -s  -o zsh main.o `cat stamp-modobjs`   -lsocket -ldl -lnsl -ltermcap -lc
exec.o: In function `doshfunc':
exec.o(.text+0x59c0): undefined reference to `wrappers'
exec.o(.text+0x59e4): undefined reference to `wrappers'
exec.o(.text+0x5a14): undefined reference to `wrappers'
exec.o(.text+0x5a18): undefined reference to `wrappers'
exec.o: In function `runshfunc':
exec.o(.text+0x5c48): undefined reference to `unload_module'
init.o: In function `setupvals':
init.o(.text+0x10d4): undefined reference to `wrappers'
init.o(.text+0x10e0): undefined reference to `wrappers'
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `zsh'

Not that that helps greatly, I suspect.


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

* Re: Latest patched development version
  1998-12-14 13:57 Latest patched development version Peter Stephenson
  1998-12-14 15:56 ` zerr() and errflag (Re: Latest patched development version) Bart Schaefer
  1998-12-14 17:05 ` Latest patched development version Bruce Stephens
@ 1998-12-14 18:54 ` Phil Pennock
  1998-12-14 20:13   ` Bart Schaefer
  2 siblings, 1 reply; 8+ messages in thread
From: Phil Pennock @ 1998-12-14 18:54 UTC (permalink / raw)
  To: Zsh hackers list

Erm, please ignore previous waffle post.  I should've read all the new
messages first.

Typing away merrily, Peter Stephenson produced the immortal words:
> I have put a new patched version of zsh 3.1.5 at
> 
> http://www.ifh.de/~pws/computing/zsh-3.1.5-pws-3.tar.gz

I don't suppose it's possible to provide bzip2 compressed forms too, is
it?  I know it's more space on the server, but:
 (a) bzip2 is patent-free and GPL so same distrib as gzip
 (b) It provides better compression.

I'm still waiting for it to download.  But as a comparison from
zsh-3.1.5 (using figure in announce post and from my own patched 3.1.4):
  zsh-3.1.5.tar.gz as announced,    size 867498 bytes.
  zsh-3.1.5.tar.bz2 made via patch, size 669971 bytes.

> Phil Pennock's patch to use associative arrays in stat, 4727

Could someone familiar with the depths of params.c please check the
sethparam function I added?  The post (4727 I guess) contained warnings
about the checks in that.  There are bound to be problems with the
unhandled cases.  Please?  I'm just feeling very nervous about it.
-- 
--> Phil Pennock ; GAT d- s+:+ a22 C++(++++) UL++++/I+++/S+++/H+ P++@ L+++
E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+
G+ e+ h* r y?


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

* Re: Latest patched development version
  1998-12-14 18:54 ` Phil Pennock
@ 1998-12-14 20:13   ` Bart Schaefer
  0 siblings, 0 replies; 8+ messages in thread
From: Bart Schaefer @ 1998-12-14 20:13 UTC (permalink / raw)
  To: Phil Pennock, Zsh hackers list

On Dec 14,  6:54pm, Phil Pennock wrote:
} Subject: Re: Latest patched development version
}
} Could someone familiar with the depths of params.c please check the
} sethparam function I added?

I have a replacement for that sethparam() which I will be posting as
soon as I finish reconciling differences between pws-3 and my local
changes.  I was hoping to avoid the stat module, completion widgets,
and the ftp module for the time being, but it looks like they're too
much tangled in with other things.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


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

end of thread, other threads:[~1998-12-14 20:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-14 13:57 Latest patched development version Peter Stephenson
1998-12-14 15:56 ` zerr() and errflag (Re: Latest patched development version) Bart Schaefer
1998-12-14 16:32   ` Peter Stephenson
1998-12-14 17:05 ` Latest patched development version Bruce Stephens
1998-12-14 17:27   ` Peter Stephenson
1998-12-14 17:31   ` Bruce Stephens
1998-12-14 18:54 ` Phil Pennock
1998-12-14 20:13   ` Bart Schaefer

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