From: Archie Cobbs (archie@whistle.com)
Date: Fri Dec 11 1998 - 20:59:23 EST
Godmar Back writes:
> > My strategy is to replace "xxx" with "KXXX", eg, write becomes
> > KWRITE. IMHO, macros should ALWAYS BE UPPER CASE :-)
>
> Not really. ANSI C, for instance, allow getchar() to be a macro.
> I don't really care, though. I usually uppercase macros too.
>
> I don't like the k prefix, because there's for instance kprintf
> k is often used in kernels. This will prevent a port of Kaffe as a
> kernel module in Linux. But I don't think 'j' would be better.
> kaffe_ or KAFFE_ would definitely be unambiguous, but may be too long.
Well, that's why it's all upper case. Linux doesn't have KPRINTF.
Upper case is good because:
- More obvious that you're looking at a macro
- Less likely to collide with real functions namespacewise
So "MALLOC" instead of "KMALLOC" is fine with me. In fact, the
FreeBSD kernel defines "MALLOC", "FREE", etc.
-Archie
___________________________________________________________________________
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:12 EDT