#!/bin/sh #------------------------------------------------------------------------------- # Determine the byte-ordering scheme used by the local machine. cat > endiantest.c << ENDIANTEST #include #define Order(x)\ fill((char *)&x, sizeof(x)); \ for (i=1; i<=sizeof(x); i++) { \ c=((x>>(byte_size*(sizeof(x)-i)))&mask); \ putchar(c==0 ? '?' : (char)c); \ } \ printf("\n"); void fill(p, size) char *p; int size; { char *ab= "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; int i; for (i=0; i $bnf #-------------------------------------------------------------------------------