nanogui: Pending patches/bug/requests ... list available on the FTP
Subject:
Re: [nanogui] Pending patches/bug/requests ... list available on the FTP
From:
Alain Volmat ####@####.####
Date:
1 Jun 2005 14:48:10 +0100
Message-Id: <20050601134803.GA10327@pop.mail.yahoo.com>
Hi,
since nobody have send any comment about this method (and I'm now updating
the patch_092 folder to add recent discussions/patch) I give my opinion
about it.
> * At compile time, scan all the driver sources for DEFDRIVER() and have
> a tiny sed+awk/whatever script construct a .c file with the driver
> table.
I'm a bit worrying about such solution actually. Of course that's only
my feeling and others should also give their opinion on it.
The idea of the dynamically generated .c file is a bit frightening to me,
wouldn't it becomes a bit harder to really see what is being compiled ?
Regards,
Alain
* Jachym Holecek [Sat, 28 May 2005 at 18:15 +0200]
<quote>
> Hello,
>
> > I'd like to see this one go in, I was about to start writing the same kind of
> > patch. Another option would be to have all drivers register themselves.
> > So in each driver file something like
> >
> > static void register_me() __attribute__ ((constructor))
> > {
> > global_driver_table_append(&my_driver_struct);
> > }
> >
> > Then the driver selection code in fb.c would turn from a big switch to an
> > iteration over the list of drivers and choose the matching one. This would
> > get rid of the ifdefs in this file.
> >
> > Would you consider this a better option ?
>
> In case portability is of concern, you can avoid the __attribute__ quite
> easily:
>
> * Have each driver contain "DEFDRIVER(my_driver_struct)", where DEFDRIVER
> is a no-op macro.
>
> * At compile time, scan all the driver sources for DEFDRIVER() and have
> a tiny sed+awk/whatever script construct a .c file with the driver
> table.
>
> That's what I do in a private project of mine, and it works reasonable
> well. If people think this would be a good way, I'd volunteer to implement
> it.
>
> Regards,
> -- Jachym Holecek
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>
</quote>
_____________________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com