diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:38 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:38 -0800 |
commit | 64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34 (patch) | |
tree | 1b23b8e8005328194e2fb4bf653806c85050933f /bigloo.init | |
parent | 5bea21e81ed516440e34e480f2c33ca41aa8c597 (diff) | |
download | slib-64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34.tar.gz slib-64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34.zip |
Import Upstream version 3a5upstream/3a5
Diffstat (limited to 'bigloo.init')
-rw-r--r-- | bigloo.init | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/bigloo.init b/bigloo.init index dfe8e2f..13ad86d 100644 --- a/bigloo.init +++ b/bigloo.init @@ -215,6 +215,33 @@ ;;; OBJ->STRING returns strings with control characters. ;;(define (object->string x) (obj->string x)) +;; input-port-position port bigloo procedure +;; output-port-position port bigloo procedure +;; +;; Returns the current position (a character number), in the port. +;; +;; set-input-port-position! port pos bigloo procedure +;; set-output-port-position! port pos bigloo procedure +;; +;; These functions set the file position indicator for port. The new +;; position, measured in bytes, is specified by pos. It is an error to +;; seek a port that cannot be changed (for instance, a string or a +;; console port). The result of these functions is unspecified. An error +;; is raised if the position cannot be changed. + +;;@ (FILE-POSITION <port> . <k>) +(define (file-position port . k) + (if (null? k) + ((if (output-port? port) + output-port-position + input-port-position) + port) + (apply + (if (output-port? port) + set-output-port-position! + set-input-port-position!) + port k))) + ;;@ (OUTPUT-PORT-WIDTH <port>) (define (output-port-width . arg) 79) |