Re: CML2 0.2.0

From: mike_phillips@urscorp.com
Date: Fri Jun 02 2000 - 13:53:21 EST


(Apologies if you receive a half finished e-mail, pressing the wrong
button doesn't help :)
Scenario:

foo required bar, bas required bar.

foo.select(type (module or builtin) ) {
        for each req in foo.requires {
                if (req.hardlink) {
                        /* Do nothing, user knows what there are doing */
                } else {
                        req.select(type)
                }
        }
 
        foo.hardlink = true ;
        foo.selected = type ;
}

foo.unselect {
        for each req in foo.requires {
                if (req.hardlink) {
                        /* Do nothing */
                } else {
                        for each parent in req.parents {
                                if (parent.selected) {
                                        break ;
                                        /* Something else required this,
don't touch */
                                }
                        }
                        req.selected = none ;
                }
        }

        for each parent in foo.parents {
                parent.unselect ;
        } /* This could get real recursive, real fast */

        foo.selected = none ;
        foo.hardlink = false ;
}

Or something similar, of course you need to maintain a list of
requirements and parents for each node.

Mike

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:15 EST