Well, that one is a bit complicated in the context of the Norm.
enum e_endian
{
LITTLE,
BIG
};
enum e_endian which_endian(void)
{
union
{
unsigned char var2[2];
unsigned short var1;
} u_endian;// This should be the correct indentation
// } u_endian;
u_endian.var1 = 1;
if (u_endian.var1 == u_endian.var2[0])
return (LITTLE);
else
return (BIG);
}
I assume that the indentation and the alignment of the union should be as it is. Not sure of it's name's though.
It returns many errors, and a variable scope inside a function breaks norminette.
Well, that one is a bit complicated in the context of the Norm.
I assume that the indentation and the alignment of the union should be as it is. Not sure of it's name's though. It returns many errors, and a variable scope inside a function breaks norminette.