You could use it for commands like "stats" that have subcommands. Hard
to see how it'd be useful for much beyond that.
This was a good idea, BTW. I like it. We should make sure that the
release tarballs don't require gperf to be installed; the hash values
should be the same everywhere for a given release of the code (since
the command set is fixed) so there shouldn't be any need to make
people install gperf unless they're adding/removing commands in the
text protocol. We can just run it once before tarring and let end
users reuse the output.
-Steve
On Nov 7, 2007, at 10:56 AM, Aaron Stone wrote:
The resulting code is much prettier. The existing code does satisfy
the
O(1) requirement, but as a big fan of gperf, I like this a lot.
How do you use gperf for further parsing?
Aaron
On Wed, Nov 7, 2007, Tomash Brechko <[EMAIL PROTECTED]> said:
Using one lookup per command instead of a sequence of strcmp() is
more
scalable. This patch doesn't change command syntax or semantics in
any way. The next step would be to use GPerf for the rest of the
parsing.
[snip patch]