Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!alberta!auvax!rwa From: rwa@auvax.UUCP (Ross Alexander) Newsgroups: comp.lang.c Subject: Re: Turbo C--Current Version??? Message-ID: <477@auvax.UUCP> Date: 2 Jan 88 06:38:45 GMT References: <3195@ihlpf.ATT.COM> <5300001@hpccc.HP.COM> Organization: Athabasca U., Alberta, Canada Lines: 31 Summary: or you can get a copy of Henry Spencer's regexp package In article <5300001@hpccc.HP.COM>, kevino@hpccc.HP.COM (Kevin Owen) writes: > George V. Wilder (gvw1@ihlpf.ATT.COM) writes... > >And finally, a "technical" question, is there anyway > >with Turbo C to process wildcard command line arguments > >(e.g., grep pattern *.c). I understand that MSDOS doesn't > >expand command line wildcard characters. > Turbo C (or rather MSDOS) can expand wildcard characters > by using the functions findfirst() and findnext(); Pages > 87 - 89 of the reference guide give the magic incantations. That's true enough if what you want to do is match wildcards to filenames (that is, do command line filename globbing). If you want to do something more like 'egrep "^#define[ ]+(FOO|BAR)" *c' then may I suggest the regular expression compiler, matcher, and substituter package posted to comp.sources.unix as part of the Improved Egrep distribution. It was written by Henry Spencer @ utzoo, and does a very nice job (thanks, Henry - it's saved me a lot of work!). I ported it from my 4.xBSD environment to an Atari 1040 running Mark Williams C with about 30 seconds work - just a tiny bit of editing to fix some #include paths. Even the Makefile worked first time ;-)! I would be glad to mail you or anyone else a copy on request; it's about 38K of nicely written C, a makefile, a test routine (to make sure your compiler didn't screw up, and as an example of how to use it), and some doc. -- Ross Alexander, Athabasca University alberta!auvax!rwa