Need a peek for WINDOWS

Started by IVShilov, September 13, 2021, 08:26:43 AM

Previous topic - Next topic

IVShilov

Hello.

It was big PITA when I found that win-version of newlisp have no peek.

But I found a workaround (http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=9&t=5139">http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=9&t=5139) :
(define (peek-pipe fd)
  (letn (pos (seek fd)
    size (seek fd -1))
    (seek fd pos)
    size
    ))

May be it's better place for posting that.