public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* demangle.h and ucase enums?
@ 2001-03-21 15:59 Andrew Cagney
  2001-03-24  1:02 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2001-03-21 15:59 UTC (permalink / raw)
  To: GDB Discussion

Hello,

The coding standard contains:

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've been working on the simplistic interpretation of ``enums are in
upper case'' but, looking at demangle.h other interpretations are
possible.

Something else to document.  Next I'll be going the Ada manual route
where the notes tell you to interpret ``do'' as ``don't'' :-)

	Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: demangle.h and ucase enums?
  2001-03-21 15:59 demangle.h and ucase enums? Andrew Cagney
@ 2001-03-24  1:02 ` Eli Zaretskii
  2001-05-10  8:33   ` Andrew Cagney
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2001-03-24  1:02 UTC (permalink / raw)
  To: ac131313; +Cc: gdb

> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: demangle.h and ucase enums?
  2001-03-24  1:02 ` Eli Zaretskii
@ 2001-05-10  8:33   ` Andrew Cagney
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2001-05-10  8:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

>> 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.

Ok, in that case, I'd like to propose (1) that new GDB enum's be _lower_ 
case.  Upper case be largely reserved for macro's.

	Andrew

(1) A total about face on my part :-/.  My execuse is that someone taught

me to use upper case.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-05-10  8:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-21 15:59 demangle.h and ucase enums? Andrew Cagney
2001-03-24  1:02 ` Eli Zaretskii
2001-05-10  8:33   ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).