1 /*****************************************************************************
2 Major portions of this software are copyrighted by the Medical College
3 of Wisconsin, 1994-2000, and are released under the Gnu General Public
4 License, Version 2. See the file README.Copyright for details.
5 ******************************************************************************/
6
7 #include "mrilib.h"
8
main(int argc,char * argv[])9 int main( int argc , char *argv[] )
10 {
11 int bb = mri_short_order() ;
12
13 if( argc > 1 && strcmp(argv[1],"-help") == 0 ){
14 printf("Usage: byteorder\n"
15 "Prints out a string indicating the byte order of the CPU on\n"
16 "which the program is running. For this computer, we have:\n\n" ) ;
17 }
18
19 if( bb == LSB_FIRST )
20 printf("CPU byte order = LSB_FIRST\n") ;
21 else
22 printf("CPU byte order = MSB_FIRST\n") ;
23 exit(0) ;
24 }
25