Subject: Re: pcvt and TIOCCONS
To: Gordon W. Ross <>
From: Alan Barrett <>
List: current-users
Date: 04/21/1996 12:51:22
> I'd like to see how you would write glob_match.
> I went looking for something like that, and all I found is
> the glob.3 man page and libc glob() function, which does
> not do what we want. (and does a lot more - readdir, etc)

wildmat() seems to do what you want.  Here's the head of wildmat.c as
distributed with INN: 

/*  $Revision: 1.9 $
**  Do shell-style pattern matching for ?, \, [], and * characters.
**  Might not be robust in face of malformed patterns; e.g., "foo[a-"
**  could cause a segmentation violation.  It is 8bit clean.
**  Written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.
**  Rich $alz is now <>.
**  April, 1991:  Replaced mutually-recursive calls with in-line code
**  for the star character.

--apb (Alan Barrett)