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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to