X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-SourceIP: 95.97.163.245 X-Authenticated-Sender: b DOT mykendevelopment AT upcmail DOT nl Message-ID: <55B0D8C4.2090807@iae.nl> Date: Thu, 23 Jul 2015 14:06:28 +0200 From: myken User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: geda-user AT delorie DOT com Subject: Re: [geda-user] PCB development introduction 0.1 References: <55B001A8 DOT 5010501 AT iae DOT nl> <201507222233 DOT t6MMXrJP020776 AT envy DOT delorie DOT com> <55B0D082 DOT 7020306 AT iae DOT nl> In-Reply-To: <55B0D082.7020306@iae.nl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: geda-user AT delorie DOT com Never mind I figured it out. The REGISTER_ACTION(a) macro in hid.h will expand to a function to register an action, while the REGISTER_ACTION(a) macro in dolists.h will expand to the actual calling of these functions. On 23/07/15 13:31, myken wrote: >> dolists.h is our way of implementing C++ constructors. > Ehh now I'm really confused about the dolists.h file. > > dolists.h is included (according to doxygen) by two c files > (hid/batch/batch.c and hid gcode/code.c). > If I look at the hid/batch/batch.c file I see that in line 12 hid.h is > included, moving down I find in line 116 "REGISTER_ACTIONS > (batch_action_list)", so I guess this one is taken from the hid.h file. > The dolists.h file isn't included until line 326, but the function > hid_batch_init () after that doesn't seem to use the RESIGTER_* macros. > The same is true for the gcode.c file, the dolists.h isn't included > until line 1577 just before the hid_gcode_init () function. > > Is there some sophisticated c programming going on that I don't grasp? >