MMC Hex (more)

Joerg Schilling schilling at fokus.gmd.de
Thu Jan 3 07:37:20 PST 2002


* From the T10 Reflector (t10 at t10.org), posted by:
* Joerg Schilling <schilling at fokus.gmd.de>
*
>From owner-t10 at t10.org Wed Jan  2 19:01:02 2002

>Assume a C/C++ environment where:

> char is 8-bit
> short is 16-bits
> long is 32-bits

>and assume all of these default to signed.

>Many programmers will use typedef's such as:

> typedef unsigned char UI8
> typedef char SI8
> typedef unsigned short UI16
> typedef short SI16
> typedef unsigned long UI32
> typedef long SI32
> typedef ??? HEX   // please complete this typedef 
>                   // so that it works with MMC-2/-3

A better method is to use the standard include file

inttypes.h

and to use the types:

int8_t, uint8_t, int16_t, ...

This will work with all compilers if you assume thwos complement
machines.

Jorg

 EMail:joerg at schily.isdn.cs.tu-berlin.de (home) Jorg Schilling D-13353 Berlin
       js at cs.tu-berlin.de		(uni)  If you don't have iso-8859-1
       schilling at fokus.gmd.de		(work) chars I am J"org Schilling
 URL:  http://www.fokus.gmd.de/usr/schilling   ftp://ftp.fokus.gmd.de/pub/unix
*
* For T10 Reflector information, send a message with
* 'info t10' (no quotes) in the message body to majordomo at t10.org




More information about the T10 mailing list