source: project/release/4/s11n/trunk/constants.scm @ 15282

Last change on this file since 15282 was 15282, checked in by felix winkelmann, 12 years ago

imported r4 version

File size: 1.0 KB
RevLine 
[15282]1;;;; constants.scm
2
3(define-constant +version+ 0.7)
4
5(define-constant void-tag 0)
6(define-constant null-tag 1)
7(define-constant eof-tag 2)
8(define-constant fixnum-tag 3)
9(define-constant bytevector-tag 4)
10(define-constant vector-tag 5)
11(define-constant special-tag 6)
12(define-constant true-tag 7)
13(define-constant false-tag 8)
14(define-constant char-tag 9)
15(define-constant backref-tag 10)
16(define-constant gensym-tag 11)
17(define-constant procedure-tag 12)
18(define-constant symbol-tag 13)
19(define-constant stdport-tag 14)
20(define-constant hash-table-tag 15)
21(define-constant big-endian-tag 16)
22(define-constant little-endian-tag 17)
23(define-constant thirtytwo-bit-tag 18)
24(define-constant sixtyfour-bit-tag 19)
25
26(define +sizeof-ulong+ (foreign-value "sizeof(unsigned long)" int))
27(define +sizeof-word+ (foreign-value "sizeof(C_word)" int))
28(define +sizeof-header+ (foreign-value "sizeof(C_header)" int))
29
30#>
31static int check_endianness()
32{
33  int i = 99;
34  return *((char *)&i) != 99 ? 16 : 17;
35}
36<#
37
38(define +endianness-tag+ (foreign-value "check_endianness()" int))
Note: See TracBrowser for help on using the repository browser.