zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@frontiernet.net>
To: jhi@iki.fi
Cc: zsh-workers@math.gatech.edu
Subject: Re: libzglob?
Date: Mon, 25 Aug 1997 01:30:15 -0400 (EDT)	[thread overview]
Message-ID: <199708250530.BAA04562@hzoli.home> (raw)
In-Reply-To: <199708232232.BAA25694@alpha.hut.fi> from Jarkko Hietaniemi at "Aug 24, 97 01:32:07 am"

> has there been any talk / thought / action as to separate the zsh
> globbing code into its own library?  (as Zle nowadays seems to be,
> sort of)

glob.c is quite independent of the rest of the code, I think it would not
be hard to make it a standalone library.

> I realize that this is not trivial because the glob.c seems to
> use a lot of general zsh structs and call other zsh functions,
> ansi2knr, makepro.sh, for some things it may be useful to use

ansi2knr is only needed for very old traditional compilers which cannot
compile programs with ANSI C prototypes.  Makepro is just a simple
prototype generator.

> If this happens I can see one zsh API change need right now: glob()
> should be 'thread-safe' in that the various glob options should be
> passed in as arguments (a bitmask? a struct?) instead of being part of
> the 'global' zsh state -- as there is no zsh opts[] if only the glob
> lib is being used.

There are several static variables used by glob.c, so if you want real
re-entrant glob, more changes are necessary.

The scanner in zsh glob can be used for perl, however the pattern
matching part has some problems.  One for example is that (ab#)# does not
match ab.  For perl, a zsh glob -> regexp translator would be much more
roboust and relyable.

Zoltan


  reply	other threads:[~1997-08-25  5:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-23 22:32 libzglob? Jarkko Hietaniemi
1997-08-25  5:30 ` Zoltan Hidvegi [this message]
1997-08-26  8:09   ` libzglob? Andrew Main
1997-08-26 14:58     ` libzglob? Zoltan T. Hidvegi
1997-08-26 15:26       ` libzglob? Andrew Main
1997-08-26 15:35         ` [ZSH] libzglob? Chip Salzenberg
1997-08-26 18:24         ` libzglob? 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=199708250530.BAA04562@hzoli.home \
    --to=hzoli@frontiernet.net \
    --cc=jhi@iki.fi \
    --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).