interface.scm 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ; Part of Scheme 48 1.9. See file COPYING for notices and license.
  2. ; Authors: Richard Kelsey, Jonathan Rees, Mike Sperber
  3. (define-interface prescheme-interface
  4. (export ((if begin lambda letrec quote set!
  5. define define-syntax let-syntax letrec-syntax
  6. and cond case do let let* or
  7. quasiquote
  8. syntax-rules
  9. ) :syntax) ; no delay
  10. (goto :syntax)
  11. (external :syntax)
  12. ((define-enumeration define-external-enumeration enum) :syntax)
  13. ((name->enumerand enumerand->name) :syntax) ; loadtime only
  14. not
  15. eq?
  16. + - * = < ; /
  17. <= > >=
  18. abs
  19. expt
  20. quotient remainder
  21. ; floor numerator denominator
  22. ; real-part imag-part
  23. ; exp log sin cos tan asin acos atan sqrt
  24. ; angle magnitude make-polar make-rectangular
  25. min max
  26. char=? char<?
  27. ;; Data manipulation
  28. make-vector vector-length
  29. vector-ref vector-set!
  30. make-string string-length
  31. string-ref string-set!
  32. deallocate
  33. null-pointer
  34. null-pointer?
  35. values call-with-values
  36. current-input-port current-output-port current-error-port
  37. open-input-file open-output-file
  38. close-output-port close-input-port
  39. read-char peek-char read-integer
  40. write-char newline write-string write-integer
  41. force-output
  42. (errors :syntax)
  43. error-string
  44. ascii->char char->ascii
  45. shift-left arithmetic-shift-right logical-shift-right
  46. bitwise-and bitwise-ior bitwise-xor bitwise-not
  47. unspecific
  48. error
  49. ))
  50. ; memory (malloc and free)
  51. (define-interface ps-memory-interface
  52. (export allocate-memory
  53. deallocate-memory
  54. unsigned-byte-ref unsigned-byte-set!
  55. word-ref word-set!
  56. flonum-ref flonum-set!
  57. address?
  58. null-address null-address?
  59. address+ address- address-difference
  60. address= address< address<= address> address>=
  61. address->integer integer->address
  62. copy-memory! memory-equal?
  63. char-pointer->string char-pointer->nul-terminated-string
  64. read-block write-block))
  65. (define-interface ps-flonums-interface
  66. (export fl+ fl- fl* fl/ fl= fl< fl> fl<= fl>=))
  67. (define-interface ps-unsigned-integers-interface
  68. (export un+ un- un* unquotient unremainder un= un< un> un<= un>=
  69. unsigned->integer integer->unsigned))
  70. (define-interface ps-receive-interface
  71. (export receive))