Subject: Re: pcvt and TIOCCONS
To: None <tsarna@endicor.com>
From: Gordon W. Ross <gwr@mc.com>
List: current-users
Date: 04/20/1996 15:55:30
> From: Ty Sarna <tsarna@endicor.com>
> Date: Fri, 19 Apr 1996 13:28:20 -0500 (CDT)

> Gordon W. Ross wrote:
> > 
> > It looks a little hairy to me.  Maybe Ty would like to offer an
> > outline of the tty_relatives() function he proposes.
> 
> I don't think it's hairy. Just set a couple more variables, switch to
> glob matching instead of strcmp(), and match on the action field as
> well.
> 
> Here's a outline based on your earlier one. I don't see that it's that
> much more complex:

The basic outline I put forward would not change, I realize.
The "hair" I'm concerned about would be in glob_match...

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)

Maybe one could convert a glob string to a regexp and then use
regcomp();regexec();regfree() each time you call glob_match.

Is there some better way?