ntpq quirk

Mark Atwood fallenpegasus at gmail.com
Mon Nov 28 20:25:35 UTC 2016


On Sun, Nov 27, 2016 at 1:00 AM Achim Gratz <Stromeko at nexgo.de> wrote:

> Eric S. Raymond writes:
> > OK, there are two ways we can handle this.
>
> The third way is building a hash table that maps each possible unique
> prefix to the actual full-length command.
>
>
I was on a project years ago that did that (minimal length matching of
command strings).

Someone on team dug up an amazing little utility that ingested a list of
strings, and emitted a human-unreadable table-driven maximally efficient C
function that implemented some computer science magic state machine
character parser that took as a parameter char* and returned a integer or
enum that designated one of the target strings that was minimal matched by
the input.

We then made running this code generator a Makefile production, and
compiled the generator itself as another dependent Makefile production.

I'm struggling now to remember it's name...


...m
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/devel/attachments/20161128/357e5eb7/attachment.html>


More information about the devel mailing list