a bit more work to match sdlwork.c and winwork.c (nw)