branch and importing it gives some anachronisms. tn3270.c is still on the vendor branch and importing it just changes a memcpy to memmove.