On Thu, 04 Feb 2010, [email protected] wrote:

Hi,

>     ; QUESTION1: What to do with BYTE in hb_fs*Drv() calls?
>                  Should it be int or unsigned int?

Change it to 'int'

But maybe it will be good to also change also the meaning of drive numbers.
Now we have:

   /* NOTE: 0 = current drive, 1 = A, 2 = B, 3 = C, etc. */
   const char * hb_fsCurDir( USHORT uiDrive );
   HB_ERRCODE hb_fsCurDirBuff( USHORT uiDrive, char * pszBuffer, HB_SIZE ulSize 
);

and:

   /* NOTE: 0=A:, 1=B:, 2=C:, 3=D:, ... */
   HB_ERRCODE hb_fsIsDrv( BYTE nDrive )
   HB_ERRCODE hb_fsChDrv( BYTE nDrive )
   BYTE hb_fsCurDrv( void )

Above is strictly compatible with Clipper _fs*() functions but if we are
dropping Clipper types then maybe we should also change the drive number
meaning in above functions and every where use 1 = A, 2 = B, 3 = C, ...
?

>     ; QUESTION2: What to do with BYTE types in checksum calculations and 
>                  low level color storage, is HB_U8 type good?

it will depend on context and internal implementation.
For external API I usually use 'const void *' pointers to not force
any casting.
Harbour does not work on machines which do not use 8bit based types
so it's less important what you will choice. If algorithm is strictly
8bit character cell oriented then you can use HB_U8.

best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to