From owner-freebsd-current@FreeBSD.ORG Sat Dec 22 21:30:32 2007 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4784D16A41B; Sat, 22 Dec 2007 21:30:32 +0000 (UTC) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4]) by mx1.freebsd.org (Postfix) with ESMTP id D27A313C458; Sat, 22 Dec 2007 21:30:31 +0000 (UTC) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4]) by freebsd.czest.pl (8.13.4/8.12.9) with ESMTP id lBMMJrsA088027; Sat, 22 Dec 2007 22:19:53 GMT (envelope-from dunstan@freebsd.czest.pl) Received: (from dunstan@localhost) by freebsd.czest.pl (8.13.4/8.12.9/Submit) id lBMMJrxA088024; Sat, 22 Dec 2007 22:19:53 GMT (envelope-from dunstan) Date: Sat, 22 Dec 2007 22:19:52 +0000 From: "Wojciech A. Koszek" To: Marcel Moolenaar Message-ID: <20071222221952.GA87350@FreeBSD.czest.pl> Mail-Followup-To: "Wojciech A. Koszek" , Marcel Moolenaar , freebsd-current@FreeBSD.ORG, emax@FreeBSD.ORG References: <20071222040156.GA87017@FreeBSD.czest.pl> <75E13C5B-F31A-4EA0-BE1E-2E909364064F@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <75E13C5B-F31A-4EA0-BE1E-2E909364064F@mac.com> User-Agent: Mutt/1.4.2.1i X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-2.0.2 (freebsd.czest.pl [80.48.250.4]); Sat, 22 Dec 2007 22:19:53 +0000 (UTC) Cc: freebsd-current@FreeBSD.ORG, emax@FreeBSD.ORG Subject: Re: [RFC, PATCH] Getting rid of direct calls to keyboard's methods via kbdsw[] array X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Dec 2007 21:30:32 -0000 On Sat, Dec 22, 2007 at 10:56:45AM -0800, Marcel Moolenaar wrote: > > On Dec 21, 2007, at 8:01 PM, Wojciech A. Koszek wrote: > > >My proposal is to unify a way in which we call such specialized > >methods, so that instead of direct array indexing used to call > >specific > >keyboard method: > > > > (*kbdsw[(kbd)->kb_index]->enable)((kbd)) > > > >We would use unified interface: > > > > kbdd_enable(kbd) > > > >Proposed patch is here: > > > > http://people.freebsd.org/~wkoszek/patches/tty/kbdcleanup.patch > > > >Suggestions are welcome. > > I like it. It would be nice to be able to get rid of the 2nd 'd' > in the kbdd_ prefix though... Thanks. I didn't go to kbd_* because I wanted to know if function is strictly kbd.c-related or is rather indirect call throught keyboard dispatcher; and do it just by seeing function's name. -- Wojciech A. Koszek wkoszek@FreeBSD.org http://FreeBSD.czest.pl/dunstan/