|
Last change
on this file since 118 was 81, checked in by rosiere, 18 years ago |
- Finish Environment (and test)
- Continue predictor_unit
- Add external tools
- svn keyword "Id" set
|
-
Property svn:keywords
set to
Id
|
|
File size:
326 bytes
|
| Line | |
|---|
| 1 | #include <stdio.h>
|
|---|
| 2 | #include "func_endianness.h"
|
|---|
| 3 |
|
|---|
| 4 | bool endianness ()
|
|---|
| 5 | {
|
|---|
| 6 | union TestEndian test_endian;
|
|---|
| 7 |
|
|---|
| 8 | test_endian.total = 0xFF;
|
|---|
| 9 |
|
|---|
| 10 | if (test_endian.octets.octet1 == 0xFF)
|
|---|
| 11 | {
|
|---|
| 12 | printf("Little Endian\n");
|
|---|
| 13 | return LittleEndian;
|
|---|
| 14 | }
|
|---|
| 15 | else
|
|---|
| 16 | {
|
|---|
| 17 | printf("Big Endian\n");
|
|---|
| 18 | return BigEndian;
|
|---|
| 19 | }
|
|---|
| 20 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.