bug-gnubg
[Top][All Lists]
Advanced

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

[Bug-gnubg] Splitting of multiple arguments


From: Holger
Subject: [Bug-gnubg] Splitting of multiple arguments
Date: Sun, 23 Nov 2003 03:20:07 +0100

Hi all,

I'm trying to figure out how commands with multiple arguments are
processed. As I've understood it, when I finally reach my command handler
the arguments are passed in sz and still need to be split.

In particular I was looking at the helper functions at the start of
gnubg.c. What exactly do they return under which circumstances? Could
someone please add some comments in front of every function about the
general behaviour?

What do the lines
          *pchSave++ = **ppch;
serve in NextTokenGeneral()? It seems the character is being copied on top
of itself. Or am I missing something?

If the first token starts on the first byte (thus no leading whitespace) it
returns this on the first call, and a pointer to the start of the next in
the passed ppch, correct?

The Parse*() functions, at least ParseNumber(), seem only to accept strings
that only contain numbers (and minus signs) and nothing else? Is some
trailing whitespace cut off earlier on?

I'll probably also have some questions about the command arrays and the
handling of commands but will ask this later when I've looked a bit more
into it.

Thanks and regards,

        Holger




reply via email to

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