- 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);
- }
+ if (mp->m_ingrp) {
+ if (mp->m_gname != NULL) {
+ cp = mh_xstrdup(mp->m_gname);
+ cp = add(";", cp);
+ linepos = putone(cp, linepos, namelen);
+ mh_free0(&cp);
+ cp = NULL;