Added new `port-position' procedure. On a port created using
authorArthur Gleckler <edu/mit/csail/zurich/arthur>
Wed, 9 Aug 2006 05:48:53 +0000 (05:48 +0000)
committerArthur Gleckler <edu/mit/csail/zurich/arthur>
Wed, 9 Aug 2006 05:48:53 +0000 (05:48 +0000)
commit450744bbed0cf7ed5100790ee4301a707e0f8dac
treee1370daccfb5a5cdde309e8640bb4589bbf15e19
parent0e3d004b3be5e6af3d0815ca17ac53a55c6f2e70
Added new `port-position' procedure.  On a port created using
`open-output-string', e.g. through `with-output-to-string', this
procedure returns the current position in the output buffer.  For
example:

  1 ]=> (define foo)

  ;Value: foo

  1 ]=> (with-output-to-string
  (lambda ()
    (write-string "foo")
    (set! foo (port-position (current-output-port)))
            (write-string "bar")))
  ;Value 1: "foobar"

  1 ]=> foo

  ;Value: 3

  1 ]=>
v7/src/runtime/runtime.pkg
v7/src/runtime/strout.scm