On 16.04.2011 02:06, Pascal J. Bourguignon wrote:
> The props data protocol ls command has a problem: there's no way to
> determine that its output is complete (unless we use a timer, which
> would mean that all ls commands would suspend the client for the time out
> duration).
>
> I'm proposing to add a lsx command, similar to ls, but that will
> terminate its output with an empty line.

Hi Pascal,
before we duplicate commands: couldn't you detect output completion by 
reading until the prompt? When output is complete, the server prints a 
linefeed ("\n") and a "/" (followed by an optional property path and 
">"). Should be easy to parse.
Ok, the prompt is only printed in PROMPT mode (obviously). There is no 
prompt in RAW mode. But then it might be better to add another output 
mode, i.e. a mode similar to RAW which completes _every_ existing 
command with a specific character sequence, such as an additional 
linefeed. Adding another command ("lsx") wouldn't cost much - but then 
we should also add new versions of all other commands ("getx", "dumpx", 
"runx", ...) for the same reason.

So, a different output mode seems a better solution? Or also possible: 
just add a new option to configure the prompt in PROMPT mode. So 
everyone can configure this to his needs.
To see what I mean, try
        export PS1="FOO\nBAR\n"
in your linux console - or
        set prompt="#FOOBAR#"
in your Win-DOS box.
Might be a better solution if you added something similar to props.cxx. 
Any other thoughts?

cheers,
Thorsten

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to