diff options
author | rmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2012-02-08 15:09:03 +0000 |
---|---|---|
committer | rmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2012-02-08 15:09:03 +0000 |
commit | b8f0aadde580fbd8e6a5be31e7bfff141d6f7b7a (patch) | |
tree | a9ba64c7acbd6444678c280947207dc06556561d | |
parent | 706259a078d326a746f62b3b03e0b080b8770f8a (diff) |
Make it clear that this is integer byte-order.
git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@127 2592e710-e01b-42a5-8df0-11608a6cc53d
-rw-r--r-- | mcon/U/byteorder.U | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mcon/U/byteorder.U b/mcon/U/byteorder.U index 52dbb44..930374b 100644 --- a/mcon/U/byteorder.U +++ b/mcon/U/byteorder.U @@ -16,7 +16,7 @@ ?S: cannot figure it out. ?S:. ?C:BYTEORDER: -?C: This symbol hold the hexadecimal constant defined in byteorder, +?C: This symbol holds the hexadecimal constant defined in byteorder, ?C: i.e. 1234 for little-endian or 4321 for big-ending. ?C:. ?H:#define BYTEORDER 0x$byteorder /* large digits for MSB */ @@ -28,7 +28,7 @@ ?X: without actually executing code, which allows cross-compiling. ?X: echo " " -$echo $n "Checking byte-ordering...$c" >&4 +$echo $n "Checking integer byte-ordering...$c" >&4 $cat >try.c <<'EOCP' short ascii_be[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short ascii_le[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; @@ -49,8 +49,11 @@ fi case "$order" in '') echo " cannot compute it." >&4 - rp="Is byte-order big-endian?" - dflt=y + rp="Are integers stored in big-endian format?" + case "$byteorder" in + 1234) dflt=n;; + *) dflt=y;; + esac . ./myread case "$ans" in y*) order=4321;; |