Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: whence following symlinks



-----BEGIN PGP SIGNED MESSAGE-----

>>>>> "Zefram" == Zefram  <zefram@xxxxxxxxxxxxxxxxx> writes:

    Zefram> Juergen A. Erhard wrote:
    >> Unfortunately, 'whence -ms' doesn't work as expected, because '-m'
    >> jumps to a different code section, and that code doesn't care for
    >> '-s'.

    Zefram> You could duplicate the new code, or use the hashtable printnode() method.

Okay, I'll check this printnode() out...

    >> ! 		/* temporarily set CHASELINKS */
    >> ! 		chase = isset(CHASELINKS);
    >> ! 		dosetopt(CHASELINKS, 1, 0);
    Zefram> ...
    >> ! 		/* revert setting of CHASELINKS */
    >> ! 		dosetopt(CHASELINKS, chase, 0);

    Zefram> Do

    Zefram> 	chase = opts[CHASELINKS];
    Zefram> 	opts[CHASELINKS] = 1;
    Zefram> 	...
    Zefram> 	opts[CHASELINKS] = chase;

Well, there's a reason to my madness ;-)...

I simply don't like directly editing some data structures that might
or might not transmogrify into something completely different...

On the other hand, you're right in your (implied) statement that
dosetopt might carry too much overhead...

So, if TPTB gives me the ok to use your suggestion (that is,
they/he/she/it guarantees opts to stay a simple int[]), I will.

    >> ! 		/* throw away try_link... hope this is the right fn */
    >> ! 		zsfree(try_link);

    Zefram> It is the right function.

Thanks. I'd really love to see a couple more comments on this
beast. Especially on fns like 'xsymlink'... I had to RTFS to find out
I had to free(3) the result... and had to guess (more or less) on
zsfree (the doc on the mem-mgt could be better... or maybe I could be
smarter ;-)

    Zefram> -zefram

Bye, J

- -- 
Juergen A. Erhard (that ue is actually \"u (TeX) or &uuml; (HTML/SGML))
eMail: jae@xxxxxxxxxxxx                             |
snailMail: Belfortstr. 6; 76133 Karlsruhe; GERMANY  |  pros do it for money,
phone: +49 721 27326                                |  amateurs out of love.
WWW: http://members.tripod.com/~Juergen_Erhard/     |

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQEVAwUBM0/sAwIG66LugGzRAQH+AwgAn3nUBG6elVvRrbKBGPv9xfYzReQxT8k0
hdvJhzPwJR6gXGREjcwEs1+agl/tvE/FENt+7eG3QtKCPo/1jlZTWX1mkkLFUsox
qabkAB42xn0eLHy9MFVpA4sKA5uh1XeOEZ1rRSU/QsN8RRGcWqzc3PiWgDt+dukq
3AZQ32vPYMMersdy9VA5kGCXjDDv5t0w6XoaIZKxBlBjGcYJxRYHrwtZpi0QhQUH
2Mm9+VTLux0ZcqklZ3NO5D7le+W6N0vkchjN7hH2pF1MADcXoxaKSShFgBmHy8XK
k2KbA6iuYBO/1ksgrrfHnkuaoKwNVH6Miyk9WsE3f3GBXkLO+ydUbw==
=ocZm
-----END PGP SIGNATURE-----



Messages sorted by: Reverse Date, Date, Thread, Author