ENIGMA Forums

Contributing to ENIGMA => Proposals => Topic started by: RetroX on October 15, 2011, 04:20:27 pm

Title: Laziness Buffer
Post by: RetroX on October 15, 2011, 04:20:27 pm
typedef signed char byte;
typedef unsigned char ubyte;
typedef signed char schar;
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef long long llong;
typedef unsigned long long ullong;
Title: Re: Laziness Buffer
Post by: luiscubal on October 15, 2011, 04:42:36 pm
Quote
typedef signed char byte;
typedef unsigned char ubyte;
Oh, no you didn't.

byte is(as of newest standards) required to be at least 8 bits, but not necessarily.
For precise sizes, see <stdint.h>(which does include int8_t and uint8_t)

Also, some languages(e.g. C#) have "byte" unsigned, and then have "sbyte", which is signed.
Title: Re: Laziness Buffer
Post by: RetroX on October 15, 2011, 04:49:39 pm
Quote
typedef signed char byte;
typedef unsigned char ubyte;
Oh, no you didn't.

byte is(as of newest standards) required to be at least 8 bits, but not necessarily.
For precise sizes, see <stdint.h>(which does include int8_t and uint8_t)

Also, some languages(e.g. C#) have "byte" unsigned, and then have "sbyte", which is signed.
Quote
laziness buffer

Also, I probably would swap those two.