monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] monotone automate stdio


From: Nathaniel Smith
Subject: Re: [Monotone-devel] monotone automate stdio
Date: Wed, 18 May 2005 22:35:16 -0700
User-agent: Mutt/1.5.9i

On Wed, May 18, 2005 at 07:13:11PM -0500, Timothy Brownawell wrote:
> On 5/18/05, Nathaniel Smith <address@hidden> wrote:
> > I also haven't looked at how this parses the strings that are written
> > to stdin to get a command out, but I suspect that similar tricks would
> > be a good idea.  Maybe make the format the constant "l", then a bunch
> > of <decimal length><constant ":"><that many characters> argument
> > strings, then the constant "e" to mark the end of the list.
> > Semi-arbitrary, but happens to be the same as bencoding :-).
> > Definitely better than trying to do real command line parsing, with
> > quotes and argument splitting and goodness knows what...
> 
> It uses operator>>(istream, string) . So items are whitespace
> separated, and whitespace is ignored.

Not so good; items could conceivably contain whitespace...

I have this slighly unusual quirk; I can't stand process spawn apis
that take a string instead of a list of strings.  Drives me batty...
why would anyone ever _do_ that? ;-)

-- Nathaniel

-- 
Details are all that matters; God dwells there, and you never get to
see Him if you don't struggle to get them right. -- Stephen Jay Gould




reply via email to

[Prev in Thread] Current Thread [Next in Thread]