File: interface.scm

package info (click to toggle)
scheme48 1.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 14,980 kB
  • ctags: 14,127
  • sloc: lisp: 76,272; ansic: 71,514; sh: 3,026; makefile: 637
file content (96 lines) | stat: -rw-r--r-- 2,226 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
; Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees. See file COPYING.

(define-interface prescheme-interface
  (export ((if begin lambda letrec quote set!
	       define define-syntax let-syntax letrec-syntax
	       and cond case do let let* or
	       quasiquote
	       syntax-rules
	       ) :syntax)  ; no delay
	  
	  (goto :syntax)
	  (external :syntax)

	  ((define-enumeration define-external-enumeration enum) :syntax)
	  ((name->enumerand enumerand->name) :syntax)  ; loadtime only

	  not

	  eq?
	  + - * = <  ; /
	  <= > >=
	  abs
	  expt
	  quotient remainder
	  ; floor numerator denominator
	  ; real-part imag-part
	  ; exp log sin cos tan asin acos atan sqrt
	  ; angle magnitude make-polar make-rectangular
	  min max
	  char=? char<?

	  ;; Data manipulation
	  make-vector vector-length
	  vector-ref vector-set!

	  make-string string-length
	  string-ref string-set!

	  deallocate
	  null-pointer
	  null-pointer?

	  values call-with-values

	  current-input-port current-output-port current-error-port
	  open-input-file open-output-file
	  close-output-port close-input-port

	  read-char peek-char read-integer
	  write-char newline write-string write-integer
	  force-output

	  (errors :syntax)
	  error-string

	  ascii->char char->ascii
	  
	  shift-left arithmetic-shift-right logical-shift-right
	  bitwise-and bitwise-ior bitwise-xor bitwise-not
	  unspecific
	  error
	  ))

; memory (malloc and free)

(define-interface ps-memory-interface
  (export allocate-memory
	  deallocate-memory

	  unsigned-byte-ref unsigned-byte-set!
	  word-ref word-set!
	  flonum-ref flonum-set!

	  address?
	  null-address null-address?

	  address+ address- address-difference
	  address= address< address<= address> address>=
	  address->integer integer->address

	  copy-memory! memory-equal?

	  char-pointer->string char-pointer->nul-terminated-string

	  read-block write-block))

(define-interface ps-flonums-interface
  (export fl+ fl- fl* fl/ fl= fl< fl> fl<= fl>=))

(define-interface ps-unsigned-integers-interface
  (export un+ un- un* unquotient unremainder un= un< un> un<= un>=
	  unsigned->integer integer->unsigned))

(define-interface ps-receive-interface
  (export receive))