d_msg() renamed $APPNAME to $DMSG_APPNAME, updated doc