MT_REPLACE
mtype = patlen ? MT_REPLACE : MT_INSERT;
if (mtype == MT_REPLACE || *patbeg == '\0')
if (mtype == MT_REPLACE)