This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] auto-import-dll libtool related patch


Hi Ralf,

> > Note - please take care with the formatting of your code.  I had to
> > fix it up whilst applying the patch.

> To which standard do you refer ?

The GNU Coding standard.  Available online here:

  http://www.gnu.org/prep/standards_toc.html

> I've tried using indent, which seems to me as the prefered tool, but
> this ends up in many indention errors.

Personally I suggest using emacs, since its built in default
indentation is pretty good, but choice of editor tends to be a pretty
personal decision.  Besides even emacs will not catch all the
problems.

> There should only be 1 patch for each file (my patches) and the only
> way is to follow your advise is to indent by hand, which isn't very
> effectiv (especially when someone isn't VERY familiar with this
> detailed indention stuff).

The best advice I can give is to try to make your code look like the
test of the code in the file.  (By which measure your patch was fine,
since the rest of the code in deffile.y was badly formatted as well.
*sigh*)

> My question: Why wasn't indent used as tool for indention ?

It is not powerful enough.  The reason for GNU Coding standard is to
try to make the style of code in GNU projects uniform, so that code is
readable and consistent.  Since patches can come from almost anyway,
accepting any old style of formatting would soon produce almost
unreadable code.

Cheers
        Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]