From: Simone Piccardi Date: Sat, 16 Aug 2003 18:22:25 +0000 (+0000) Subject: rirpova X-Git-Url: https://gapil.gnulinux.it/gitweb/?a=commitdiff_plain;h=17f2a5e09bfbb9bd8b897de4fbf701fd1dc4e861;p=gapil.git rirpova --- diff --git a/sources/endian.c b/sources/endian.c index be14e09..0505b36 100644 --- a/sources/endian.c +++ b/sources/endian.c @@ -23,7 +23,7 @@ * Author: S. Piccardi * May. 2003 * - * $Id: endian.c,v 1.3 2003/08/16 18:11:24 piccardi Exp $ + * $Id: endian.c,v 1.4 2003/08/16 18:22:25 piccardi Exp $ * ***************************************************************/ #include @@ -33,18 +33,14 @@ int main(int argc, char *argv[]) /* * Variables definition */ - int i, val; - char buf[sizeof(int)]; - int * int_ptr; + short magic, test; + char * ptr; - val = 0xABCDEF01; /* endianess magic number */ - int_ptr = (int *) buf; - *int_ptr = val; - val = 0; - for (i=0; i