Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KZ9PM-0000Py-OI for mharc-grub-devel@gnu.org; Fri, 29 Aug 2008 15:13:20 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KZ9PL-0000OB-Bc for grub-devel@gnu.org; Fri, 29 Aug 2008 15:13:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KZ9PI-0000Js-UJ for grub-devel@gnu.org; Fri, 29 Aug 2008 15:13:17 -0400 Received: from [199.232.76.173] (port=41980 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZ9PI-0000Ja-Nx for grub-devel@gnu.org; Fri, 29 Aug 2008 15:13:16 -0400 Received: from mail.dasr.de ([217.69.77.164]:2604) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KZ9PI-0006hq-CK for grub-devel@gnu.org; Fri, 29 Aug 2008 15:13:16 -0400 Received: from c-24-147-59-43.hsd1.ma.comcast.net ([24.147.59.43] helo=plato.walfield.org.walfield.org) by mail.dasr.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1KZ9PF-0005Bg-Eh for grub-devel@gnu.org; Fri, 29 Aug 2008 21:13:13 +0200 Date: Fri, 29 Aug 2008 21:13:06 +0200 Message-ID: <877i9zljnh.wl%neal@walfield.org> From: "Neal H. Walfield" To: The development of GRUB 2 In-Reply-To: <87d4jrj2uv.fsf@xs4all.nl> References: <87d4jsgfpz.fsf@xs4all.nl> <87ljygkl3a.wl%neal@walfield.org> <87d4jrj2uv.fsf@xs4all.nl> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/21.4 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) Subject: Re: Handlers X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2008 19:13:19 -0000 At Fri, 29 Aug 2008 16:46:32 +0200, Marco Gerards wrote: > "Neal H. Walfield" writes: > > > I know know why you call this a handler; it seems to me that it is > > just a semi-generic list package. Am I missing something? > > Perhaps. I can better explain how this can be used and give a small > example. GRUB has several types of handlers. I hope a handler is the > right word, please correct me if it's not. Examples of handlers are > filesystems, terminals, partitioning schemes, commands, etc. A > handler usually consists of a struct with function pointers and a > pointer to the next handler of its kind. I'd call it a factory. See: http://en.wikipedia.org/wiki/Factory_object > So it is not a list in the classical sense, it does not contain data. What about it makes it a list in a non-classical sense? > > You can find a slighly more flexible and generic implementation here: > > > > http://cvs.savannah.gnu.org/viewvc/hurd-l4/viengoos/list.h?root=hurd&view=markup > > > > I've been using that for a while and am quite satisfied with it. > > > > Perhaps you'll find it useful. > > It certainly looks good, thanks for the suggestion. However, I do not > think we have the same goals. For example, I focus on size and do not > need many features. Sure. I guess my concern is that lists are useful and it is also often useful to have an object on multiple lists or to use your struct trick in other scenarios. If either of those might be the case, it might be useful to borrow the list_node idea. Neal