[haiku-commits] Re: r38920 - haiku/trunk/src/system/boot/platform/amiga_m68k

  • From: Oliver Tappe <zooey@xxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 10 Oct 2010 22:11:54 +0200

On 2010-10-10 at 13:34:14 [+0200], François Revol <revol@xxxxxxx> wrote:
> 
> Le 10 oct. 2010 à 13:28, Axel Dörfler a écrit :
> 
> > revol@xxxxxxx wrote:
> >> Added:
> >>   haiku/trunk/src/system/boot/platform/amiga_m68k/amicalls.cpp
> >>   haiku/trunk/src/system/boot/platform/amiga_m68k/amicalls.h
> > 
> > Should probably be called rom_calls.* instead.
> > 
> >> +extern "C" status_t
> >> +exec_error(int32 err)
> >> +{
> >> +    switch (err) {
> >> +    case IOERR_OPENFAIL:    return B_DEV_BAD_DRIVE_NUM;
> >> +    case IOERR_ABORTED:        return EINTR;
> >> +    case IOERR_NOCMD:        return EINVAL;
> > 
> > Coding style...
> > Also, that would be B_INTERRUPTED, and B_BAD_VALUE  as native error
> > code (as the comment suggests).
> 
> B_TOO_LAZY :p

B_EXCUSE_NOT_ACCEPTED

> > 
> >> + * Contains prototypes & macros from the Amiga SDK:
> >> +**
> > 
> > Eeek.
> > 
> >> +#ifndef __ASSEMBLER__
> >> +
> >> +typedef void           *APTR;        /* 32-bit untyped pointer */
> >> +
> >> +typedef long            LONG;       /* signed 32-bit quantity */
> >> +typedef unsigned long   ULONG;      /* unsigned 32-bit quantity */
> >> +typedef unsigned long   LONGBITS;   /* 32 bits manipulated
> >> individually */
> >> +typedef short           WORD;       /* signed 16-bit quantity */
> > 
> > That is really quite ugly.
> > Why not just rewrite the headers with the native types instead? (that
> > would also get rid of the copyright)
> 
> B_TOO_LAZY :p
> 
> Will see, but I want to have something working :p

There's simply no excuse for committing code that possibly has copyright 
problems or that violates the styleguide. If you want to experiment with 
code in rough state, fair enough, but you can do that in a private 
git/mercurial or whatever repo.

It doesn't make sense if we force every external patch to conform to the 
styleguide before looking at it closely if people with commit rights 
violate the style on a more or less regular basis and put forward pretty 
much lame excuses ...

cheers,
        Oliver

Other related posts: