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

  • From: François Revol <revol@xxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 10 Oct 2010 13:34:14 +0200

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

> 
>> + * 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

François.

Other related posts: