tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Support for multi-position electro-mechanical keylocks

Am 06.08.2009 um 12:46 schrieb Anders Magnusson:

Marc Balmer wrote:

Am 03.08.2009 um 16:58 schrieb Peter Seebach:

In message <>, Marc Balmer writes:

Am 03.08.2009 um 16:23 schrieb David Holland:

On Mon, Aug 03, 2009 at 03:45:34AM +0000, David Holland wrote:
On Sun, Aug 02, 2009 at 11:54:09AM +0200, Marc Balmer wrote:
While preparing a hardware workshop and playing with multi- position
keylocks, [...]

+       int                     __map[GPIOLOCK_MAXPINS];

Er. That was supposed to say "why the underscores?"

They are in the original code.  So why not?

As a general rule, you shouldn't prefix things with underscores in C.
(C9x 7.1.3:  "All identifiers that begin with an underscore and
either an uppercase letter or another underscore are always reserved
for any use.")

This section applies to identifiers in header files, i.e. to exported APIs, not to structure members.
Exactly, so a header file connected to the system that includes containing '#define __map :32'
will cause your C code to fail compilation... :-)

__Only __if __I __include __it ;) (of course, you can still hose me by putting it into a system header...)

-- Ragge

Home | Main Index | Thread Index | Old Index