1
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1993 by Claus Gittinger
|
300
|
3 |
All Rights Reserved
|
1
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
ByteArray subclass:#UninterpretedBytes
|
1266
|
14 |
instanceVariableNames:''
|
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
|
17 |
category:'Kernel-Objects'
|
1
|
18 |
!
|
|
19 |
|
68
|
20 |
!UninterpretedBytes class methodsFor:'documentation'!
|
1
|
21 |
|
88
|
22 |
copyright
|
|
23 |
"
|
|
24 |
COPYRIGHT (c) 1993 by Claus Gittinger
|
300
|
25 |
All Rights Reserved
|
88
|
26 |
|
|
27 |
This software is furnished under a license and may be used
|
|
28 |
only in accordance with the terms of that license and with the
|
|
29 |
inclusion of the above copyright notice. This software may not
|
|
30 |
be provided or otherwise made available to, or used by, any
|
|
31 |
other person. No title to or ownership of the software is
|
|
32 |
hereby transferred.
|
|
33 |
"
|
|
34 |
!
|
|
35 |
|
68
|
36 |
documentation
|
|
37 |
"
|
|
38 |
this class has been added for ST-80 compatibility.
|
300
|
39 |
Notice, that in ST/X all functionality is inherited from
|
68
|
40 |
ByteArray - have a look at this for more.
|
1294
|
41 |
|
|
42 |
[author:]
|
|
43 |
Claus Gittinger
|
68
|
44 |
"
|
|
45 |
! !
|
1
|
46 |
|
|
47 |
!UninterpretedBytes class methodsFor:'queries'!
|
|
48 |
|
|
49 |
isBigEndian
|
77
|
50 |
"return true, if words/shorts store the most-significant
|
|
51 |
byte first (MSB), false if least-sign.-first (LSB).
|
|
52 |
I.e. false for vax, intel; true for m68k, sun."
|
1
|
53 |
|
|
54 |
%{ /* NOCONTEXT */
|
|
55 |
|
|
56 |
/*
|
|
57 |
* I dont like ifdefs - you always forget some ...
|
|
58 |
* therefore we look into a structure at run-time
|
|
59 |
*/
|
|
60 |
union {
|
300
|
61 |
unsigned int u_l;
|
|
62 |
char u_c[sizeof(int)];
|
1
|
63 |
} u;
|
|
64 |
|
|
65 |
u.u_l = 0x87654321;
|
77
|
66 |
if (u.u_c[0] == 0x21) RETURN (false);
|
|
67 |
RETURN (true);
|
1
|
68 |
%}
|
77
|
69 |
"UninterpretedBytes isBigEndian"
|
1
|
70 |
! !
|
695
|
71 |
|
|
72 |
!UninterpretedBytes class methodsFor:'documentation'!
|
|
73 |
|
|
74 |
version
|
1294
|
75 |
^ '$Header: /cvs/stx/stx/libbasic/UninterpretedBytes.st,v 1.16 1996-04-25 16:51:57 cg Exp $'
|
695
|
76 |
! !
|