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