Date: Sat, 02 Feb 2002 03:29:50 -0800 From: Terry Lambert <tlambert2@mindspring.com> To: Miguel Mendez <flynn@energyhq.homeip.net> Cc: Paul Fardy <pdfardy@mac.com>, current@freebsd.org, stable@freebsd.org Subject: Re: Junior Annoying Hacker Task Message-ID: <3C5BCDAE.22E25BAA@mindspring.com> References: <5F46C986-16DB-11D6-8CEC-00039359034A@mac.com> <3C5B3225.F04B9B18@mindspring.com> <20020202120725.A32535@energyhq.homeip.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Miguel Mendez wrote:
> Are you really serious about this? :) I've thought about that many
> times, well, not with the registry paradigm, but some sort of graphical
> admin tool based on GTK. I'm doing exams this week but may take a go at
> it after I finish them.
Let me know the form you want the hierarchy to take, so
you can stick it into the GTK hierarchy thingy; I'll be
happy to crank out some quick yacc and lex code to do
the parsing of the file into that format for you. A
structure definition, with links, and how you want it
linked, would be ideal. 8-).
Something like:
typedef enum _nodekind {
NK_VALUE, /* Path component */
NK_KEY, /* Key */
NK_DATA_INT, /* 32 bit integer */
NK_DATA_STRING, /* String */
NK_DATA_BINARY /* Word count prefix bytestream */
} nodekind_t;
struct wcval {
int16_t count; /* howw many bytes in "bytes" */
char bytes[ 1]; /* actually longer */
};
struct node {
struct node *parent;
struct node *sibling;
nodekind_t kind;
union {
struct node *child;
int intval;
char *strval;
struct wcval *wcval;
} u;
};
But I could arrange something else, if it would be more useful
for it to be some other data structure. ;-).
-- Terry
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C5BCDAE.22E25BAA>
