nwtcfunction.c merged with mapapi.c