This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: demangle.h and ucase enums?
- To: ac131313 at cygnus dot com
- Subject: Re: demangle.h and ucase enums?
- From: Eli Zaretskii <eliz at delorie dot com>
- Date: Sat, 24 Mar 2001 04:02:18 -0500 (EST)
- CC: gdb at sources dot redhat dot com
- References: <3ABA364A.BCB09EA4@cygnus.com>
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
> Date: Thu, 22 Mar 2001 12:28:42 -0500
> From: Andrew Cagney <ac131313@cygnus.com>
>
> http://gcc.gnu.org/codingconventions.html
> http://www.gnu.org/prep/standards_25.html#SEC25
>
> ``Please use underscores to separate words in a name, so that the Emacs
> word commands can be useful within them. Stick to lower case; reserve
> upper case for macros and enum constants, and for name-prefixes that
> follow a uniform convention.''
>
> Does anyone know how this should be interpreted?
I think you need to take a good look at Emacs sources to understand
what is meant by ``name-prefixes that follow a uniform convention'' ;-).
Emacs sources use the_lower_case_with_underscores for naming functions
and variables. They use upper-case letters in functions and variables
which have special meaning. For example, each primitive whose name in
Lisp is primitive-function is defined in C as Fprimitive_function, and
each variale known in Lisp as built-in-variable is defined in C as
Vbuilt_in_variable.
These F and V prefixes are certainly following a uniform convention.
> I've been working on the simplistic interpretation of ``enums are in
> upper case'' but, looking at demangle.h other interpretations are
> possible.
Err... what do you see in demangle.h that is pertinent to the above
issue? I don't see anything except that they use lower case for
enums, which AFAIK is quite a wide-spread habit, including in Emacs.