The attached patch fixes some API bugs and implements two new functions.
Feel free to verify, correct & apply.
There is some other similar small breakage, but I forgot to fix that when
I encountered them. I'll probably stumble over it again, though, so no
hurry :)
-- 
                The choice of a
      -----==-     _GNU_
      ----==-- _       generation     Marc Lehmann
      ---==---(_)__  __ ____  __      pcg goof com
      --==---/ / _ \/ // /\ \/ /      http://schmorp.de/
      -=====/_/_//_/\_,_/ /_/\_\      XX11-RIPE
Attachment:
misc.diff
Description: Text document