From: Alan Modra <amodra@bigpond.net.au>
To: binutils@sources.redhat.com, gdb@sources.redhat.com
Subject: Re: [RFA] Replace strdup with xstrdup in tic30-dis.c
Date: Thu, 28 Nov 2002 21:04:00 -0000 [thread overview]
Message-ID: <20021129050413.GI949@bubble.sa.bigpond.net.au> (raw)
In-Reply-To: <3DE6A57E.9020704@redhat.com>
On Thu, Nov 28, 2002 at 06:23:42PM -0500, Andrew Cagney wrote:
> >OK, OK. :) "typedef int bfd_boolean" it is. Plain 0 and 1 for values.
>
> You ment 0 and !0 right? :-^
Actually, having started to do the edit, I'm having second thoughts
about using plain old 0 and 1. I think I'll use FALSE and TRUE, and
#undef and #define these macros in bfd-in.h. Besides being consistent
with a "boolean" type, it means less formatting changes. Anyone
have any objections?
A whinge. This style of function declaration is a pain:
boolean function_with_a_long_name_or_lots_of_params PARAMS ((type1 arg1,
type2 arg2,
typen argn));
This is much better:
boolean function_with_a_long_name_or_lots_of_params
PARAMS ((type1 arg1, type2 arg2, typen argn));
The first style means more editing when changing the return type or
function name as all the following lines need re-indenting.
Same goes for definitions. This is a pain:
int some_func (a, b, c)
boolean a;
all_lined_up_sweetly * b;
int c;
Writing code this way almost guarantees that over time your code will
end up looking like:
int some_func (a, b, c)
bfd_boolean a;
not_lined_up * b;
int c;
Ditto local vars.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
next prev parent reply other threads:[~2002-11-29 5:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <555D137A-FB43-11D6-84AF-00039396EEB8@apple.com>
[not found] ` <20021119071305.GM997@bubble.sa.bigpond.net.au>
2002-11-19 8:26 ` Andrew Cagney
2002-11-19 13:42 ` Alan Modra
2002-11-19 14:09 ` Andrew Cagney
2002-11-19 18:05 ` Klee Dienes
2002-11-20 8:05 ` Andrew Cagney
2002-11-20 15:09 ` Alan Modra
2002-11-20 22:56 ` Klee Dienes
2002-11-26 14:03 ` Andrew Cagney
2002-11-26 14:37 ` Alan Modra
2002-11-26 15:28 ` Ian Lance Taylor
2002-11-26 15:57 ` Alan Modra
2002-11-26 16:15 ` Andrew Cagney
2002-11-27 16:44 ` Hans-Peter Nilsson
2002-11-27 21:55 ` Ian Lance Taylor
2002-11-28 14:39 ` Alan Modra
2002-11-28 15:23 ` Andrew Cagney
2002-11-28 21:04 ` Alan Modra [this message]
2002-11-29 0:41 ` Doug Evans
2002-11-29 4:02 ` Ben Elliston
2002-11-26 15:58 ` Klee Dienes
2002-11-27 11:37 ` David O'Brien
2002-11-26 16:23 Doug Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021129050413.GI949@bubble.sa.bigpond.net.au \
--to=amodra@bigpond.net.au \
--cc=binutils@sources.redhat.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox