diff options
author | Thomas Bushnell, BSG <tb@debian.org> | 2007-12-28 16:25:32 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:39 -0800 |
commit | d8ae23691ed6392b7f320f5fa7d4dd78ae52c10e (patch) | |
tree | b20b8bc02e854c4c86d39ee22a0638a8b06e01af /gambit.init | |
parent | edd1ebef3ad774e7cbcc2f5918d555bfb0b44091 (diff) | |
parent | 64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34 (diff) | |
download | slib-d8ae23691ed6392b7f320f5fa7d4dd78ae52c10e.tar.gz slib-d8ae23691ed6392b7f320f5fa7d4dd78ae52c10e.zip |
Import Debian changes 3a5-1debian/3a5-1
slib (3a5-1) unstable; urgency=low
* New upstream release.
* slib.texi (Library Catalogs): Repeat change from 3a3-3.
* Makefile: Repeat $(htmldir)slib_toc.html changes from 3a2-1.
* guile.init: (library-vicinity): Repeat change from 3a4-2.
* debian/rules (binary-indep): Don't hide .init files in a separate
subdirectory, thus conforming better to the usual slib practice. Put a
symlink in place to ease transitions. (Closes: #407370).
Diffstat (limited to 'gambit.init')
-rw-r--r-- | gambit.init | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gambit.init b/gambit.init index 07841e6..e431160 100644 --- a/gambit.init +++ b/gambit.init @@ -243,6 +243,38 @@ (define (offset-time caltime offset) (seconds->time (+ (time->seconds caltime) offset))) +;; procedure: input-port-byte-position port [position [whence]] +;; procedure: output-port-byte-position port [position [whence]] +;; +;; When called with a single argument these procedures return the +;; byte position where the next I/O operation would take place in the +;; file attached to the given port (relative to the beginning of the +;; file). When called with two or three arguments, the byte position +;; for subsequent I/O operations on the given port is changed to +;; position, which must be an exact integer. When whence is omitted +;; or is 0, the position is relative to the beginning of the file. +;; When whence is 1, the position is relative to the current byte +;; position of the file. When whence is 2, the position is relative +;; to the end of the file. The return value is the new byte position. +;; On most operating systems the byte position for reading and writing +;; of a given bidirectional port are the same. +;; +;; When input-port-byte-position is called to change the byte +;; position of an input-port, all input buffers will be flushed so +;; that the next byte read will be the one at the given position. +;; +;; When output-port-byte-position is called to change the byte +;; position of an output-port, there is an implicit call to +;; force-output before the position is changed. + +;;@ (FILE-POSITION <port> . <k>) +(define (file-position port . k) + (apply (if (output-port? port) + output-port-byte-position + input-port-byte-position) + port + k)) + ;;; (OUTPUT-PORT-WIDTH <port>) ;; (define (output-port-width . arg) 79) |