Re: .h for standard headers
From: P.J. Plauger (pjp_at_dinkumware.com)
Date: 05/20/04
- Next message: Jeff Flinn: "Re: simple delete question"
- Previous message: P.J. Plauger: "Re: .h for standard headers"
- In reply to: Old Wolf: "Re: .h for standard headers"
- Next in thread: Duane: "Re: .h for standard headers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 20 May 2004 12:47:19 GMT
"Old Wolf" <oldwolf@inspire.net.nz> wrote in message
news:843a4f78.0405192227.2c16cc2f@posting.google.com...
> "Duane Hebert" <spoo@flarn2.com> wrote:
>
> > grep "somefunctionname" *.h is a sight better than grep
> > "somefunctionname" *.* when I'm looking for a function
> > declaration in a header file.
>
> "grep foo *.*" will not find things in files that don't contain a dot
> (except on retarded filesystems).
And even there, you're at the mercy of the particular tool. It is a
rare system that has the equivalent of the old Unix /etc/glob, which
uniformly expanded wild-card patterns on a command line for all
comers. NB: There is such a critter with the MKS Toolkit, but
heaven help you if you try to make sense out of it. Just try
contriving a wild-card pattern that matches only files with no .*
suffix. This would all be a non-problem if the C++ Committee had
settled on *any* .xx suffix, even if they wanted to get away from .h.
> Why not list all your implementation's
> standard headers into a file (that won't ever need to change),
What planet do you live on? They change regularly. In particular,
the subset of headers you want to look at on any given occasion
changes all the time. You can't make a problem go away by redefining
it out of existence.
> and then
> you can go:
>
> grep foo *.h `cat stdhdrs`
which doesn't exactly roll trippingly off the tongue even if stdhdrs
is in your current directory (looking like a C++ header file, I
might add).
> or make an alias or small script to do that. If you want to search
> headers in many directories (eg. if you're working on a project with
> 3rd party libraries) regularly, you have to do something like this anyway.
No I don't. The beauty of the shell language developed so many
decades ago is that it is a) terse and b) easy to type correctly.
(It is also c) easy to encapsulate in scripts, but that's another
dimension.) None of the kludges proposed to make up for the loss
of the suffix satisfy either a) or b).
P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
- Next message: Jeff Flinn: "Re: simple delete question"
- Previous message: P.J. Plauger: "Re: .h for standard headers"
- In reply to: Old Wolf: "Re: .h for standard headers"
- Next in thread: Duane: "Re: .h for standard headers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|