- if (mp->m_nohost) {
- /* a local name - see if it's an alias */
- cp = akvalue(mp->m_mbox);
- if (cp == mp->m_mbox) {
- /* wasn't an alias - use what the user typed */
- linepos = putone(mp->m_text, linepos, namelen);
- } else {
- /* an alias - expand it */
- while ((cp = getname(cp))) {
- if (linepos > MAX_SM_FIELD) {
- fprintf(out, "\n%s: ", name);
- linepos = namelen;
- }
- mp2 = getm(cp, NULL, 0, AD_HOST, NULL);
- if (akvisible()) {
- mp2->m_pers = getcpy(mp->m_mbox);
- linepos = putone(adrformat(mp2), linepos, namelen);
- } else {
- linepos = putone(mp2->m_text,
- linepos,
- namelen);
- }
- mnfree(mp2);
- }
- }
- } else {
- /* not a local name - use what the user typed */
- linepos = putone(mp->m_text, linepos, namelen);
- }