[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] new restrictions syntax proposal
From: |
Richard Levitte - VMS Whacker |
Subject: |
Re: [Monotone-devel] new restrictions syntax proposal |
Date: |
Mon, 30 Aug 2004 08:50:01 +0200 (CEST) |
In message <address@hidden> on Mon, 30 Aug 2004 00:30:33 -0600, Derek Scherger
<address@hidden> said:
derek> Richard Levitte - VMS Whacker wrote:
derek> >
derek> > The usual problem, which applies to all programs doing it this way.
derek>
derek> I assume you mean the globbing stuff?
Yes.
derek> If the shell *does* do globbing though, --include *.c expands
derek> to something like --include a.c b.c c.c d.c and from what I
derek> can see with the popt option library you can get either
derek> --include or --include a.c out of this, b.c, c.c and d.c will
derek> have nothing to do with the option. I don't see any way of
derek> saying "I want to use --include and --exclude but please don't
derek> treat them as normal options, just leave them in the argument
derek> list in order and untouched."
Hmm, good point. I wonder how GNU ld does it... Probably manually.
derek> > However, if we want to be portable, we must be prepared for internal
derek> > globbing anyway, since there are shells that don't do it for us (like
derek> > the Windows command prompt, I believe...).
derek>
derek> I've been wondering whether one of the portability libraries
derek> might slip in before main(argc, argv) and possibly do the
derek> globbing before main sees the arguments so that we don't need
derek> to worry about it explicitly.
Well, it's always possible to do, by having the portability library
create a macro called "main", that translates that symbol to
"submain", and then define it's own main() that does the twiddling...
I think I've done that once upon a time, but I can't quite remember
for what...
Cheers,
Richard
-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.
--
Richard Levitte address@hidden
http://richard.levitte.org/
"When I became a man I put away childish things, including
the fear of childishness and the desire to be very grown up."
-- C.S. Lewis