This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: better name for var_integer et.al.
- From: Joel Brobecker <brobecker at gnat dot com>
- To: Andrew Cagney <cagney at gnu dot org>
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 15 Sep 2004 11:19:00 -0700
- Subject: Re: better name for var_integer et.al.
- References: <414883EC.9000500@gnu.org>
> /* Unsigned Integer. *VAR is an unsigned int. The user can type 0
> to mean "unlimited", which is stored in *VAR as UINT_MAX. */
> var_uinteger,
Ada calls such numbers "Positive". var_positive might be a good name.
> /* Like var_uinteger but signed. *VAR is an int. The user can type 0
> to mean "unlimited", which is stored in *VAR as INT_MAX. */
> var_integer,
I can't see any use for this semantics, but maybe it's due to my limited
experience. I looked at the current code, and most if not all of them
where just misuses of this kind. Some of them are really booleans (so I
suspect var_zinteger would be better), or postive numbers (so
var_positive would be better).
I not useful, I would consider just removing it.
> /* ZeroableInteger. *VAR is an int. Like Unsigned Integer except
> that zero really means zero. */
> var_zinteger,
var_integer? (assuming we get rid of the non-zero signed integer)
--
Joel