interface.scm 2.2 KB

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