mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-06 04:36:36 +02:00
Added (reading-from-file?)
This commit is contained in:
parent
2adabbc052
commit
4038df9b00
1 changed files with 9 additions and 0 deletions
9
read.scm
9
read.scm
|
@ -672,6 +672,15 @@
|
|||
(parse fp '() '() #f #f 0 (reg-port fp)))))
|
||||
|
||||
|
||||
(define-c reading-from-file?
|
||||
"(void *data, int argc, closure _, object k, object port)"
|
||||
" object result = boolean_f;
|
||||
Cyc_check_port(data, port);
|
||||
if (((port_type *)port)->flags == 1) {
|
||||
result = boolean_t;
|
||||
}
|
||||
return_closcall1(data, k, result);")
|
||||
|
||||
; ;; Test code
|
||||
; ;(let ((fp (open-input-file "tests/begin.scm")))
|
||||
; ;(let ((fp (open-input-file "tests/strings.scm")))
|
||||
|
|
Loading…
Add table
Reference in a new issue