partially-written draft of fmemopen, still in #if 0