[comp.sys.mac] C wildcard routines

LMD101@PSUVM.BITNET (Matthew Day) (08/09/89)

Hi,
   I'm writing a program that attempts to search through a table(array) of
names, and pulls out the names according to a wildcard specification.  The
kind of wildcards I want to use are the typical ones such as '*', '?', etc.
Unfortunately my wildcard matching routines aren't working very well.  I was
wondering if anyone had some C source code they could point me to that handles
wildcards?  My program and I thank you!

Matt Day
lmd101@psuvm.bitnet

wetter@cup.portal.com (Pierce T Wetter) (08/11/89)

   
   The Gnu project has code to do wildcard stuff, you can look at that for 
info. Of course, then any program you write using that code you have to
include the GNU stuff as well, so be careful.

Pierce

P.S.  Yay!!!! I'm back! Did you miss me! Let's hear it for Portal (TM).

    I now work for Radius Inc. (The Macintosh Monitor Types). 
    By the way, all opinions are still mine, not Radius.

Confidential to Caltech Types: Send me Mail you weinies!

amanda@intercon.uu.net (Amanda Walker) (08/12/89)

In article <21181@cup.portal.com>, wetter@cup.portal.com (Pierce T Wetter)
writes:
>    The Gnu project has code to do wildcard stuff, you can look at that for 
> info. Of course, then any program you write using that code you have to
> include the GNU stuff as well, so be careful.

Another place to look is a set of routines written by Henry Spencer at
the University of Totonto.  They match UNIX-style regular expressions,
and all he asks is that you don't misrepresent where you got the code.
None of the GNU political baggage.  They came across comp.sources.unix
some time ago--they should be available for FTP from uunet or other
archive sites.

--
Amanda Walker
InterCon Systems Corporation
amanda@intercon.uu.net    |    ...!uunet!intercon!amanda

"It can hardly be a coincidence that no language on earth has ever
produced the expression 'As pretty as an airport.'"
    --Douglas Adams

earleh@eleazar.dartmouth.edu (Earle R. Horton) (08/12/89)

In article <1359@intercon.UUCP> amanda@intercon.uu.net (Amanda Walker) writes:
...
>Another place to look is a set of routines written by Henry Spencer at
>the University of Totonto.  They match UNIX-style regular expressions,
>and all he asks is that you don't misrepresent where you got the code.
>None of the GNU political baggage.  They came across comp.sources.unix
>some time ago--they should be available for FTP from uunet or other
>archive sites.

     A good place to look is j.cc.purdue.edu.  The directory is
comp.sources.unix, and you want files regexp.Z and regexp2.Z.  These
are compressed shar files, if memory serves me well.

     I have used these to do regular expression searching on the Mac,
and they work well.  They are even "16-bit clean," by this meaning
they will compile and run when used with a compiler where (sizeof(int) == 16).
That is most definitely not the case with some of the GNU code.

Earle R. Horton