version 1.8, 2004/03/15 02:50:29 |
version 1.9, 2005/08/23 13:43:53 |
|
|
struct tm *tp; |
struct tm *tp; |
int oddfield; |
int oddfield; |
char *t, *tzn; |
char *t, *tzn; |
|
struct storage *mem = NULL; |
|
|
cpr = 0; |
cpr = 0; |
/* |
/* |
|
|
* mail status |
* mail status |
*/ |
*/ |
(void)printf("Login: %-15s\t\t\tName: %s\nDirectory: %-25s", |
(void)printf("Login: %-15s\t\t\tName: %s\nDirectory: %-25s", |
pn->name, pn->realname, pn->dir); |
vs(&mem, pn->name), vs(&mem, pn->realname), pn->dir); |
(void)printf("\tShell: %-s\n", *pn->shell ? pn->shell : _PATH_BSHELL); |
(void)printf("\tShell: %-s\n", *pn->shell ? pn->shell : _PATH_BSHELL); |
|
|
/* |
/* |
|
|
strlen(pn->office) + strlen(pn->officephone) + |
strlen(pn->office) + strlen(pn->officephone) + |
sizeof(OFFICE_TAG) + 2 <= 5 * TAB_LEN) { |
sizeof(OFFICE_TAG) + 2 <= 5 * TAB_LEN) { |
(void)snprintf(tbuf, sizeof(tbuf), |
(void)snprintf(tbuf, sizeof(tbuf), |
"%s: %s, %s", OFFICE_TAG, pn->office, |
"%s: %s, %s", OFFICE_TAG, vs(&mem, pn->office), |
prphone(pn->officephone)); |
vs(&mem, prphone(pn->officephone))); |
oddfield = demi_print(tbuf, oddfield); |
oddfield = demi_print(tbuf, oddfield); |
} else { |
} else { |
if (pn->office) { |
if (pn->office) { |
(void)snprintf(tbuf, sizeof(tbuf), |
(void)snprintf(tbuf, sizeof(tbuf), |
"%s: %s", OFFICE_TAG, pn->office); |
"%s: %s", OFFICE_TAG, vs(&mem, pn->office)); |
oddfield = demi_print(tbuf, oddfield); |
oddfield = demi_print(tbuf, oddfield); |
} |
} |
if (pn->officephone) { |
if (pn->officephone) { |
(void)snprintf(tbuf, sizeof(tbuf), |
(void)snprintf(tbuf, sizeof(tbuf), |
"%s: %s", OFFICE_PHONE_TAG, |
"%s: %s", OFFICE_PHONE_TAG, |
prphone(pn->officephone)); |
vs(&mem, prphone(pn->officephone))); |
oddfield = demi_print(tbuf, oddfield); |
oddfield = demi_print(tbuf, oddfield); |
} |
} |
} |
} |
if (pn->homephone) { |
if (pn->homephone) { |
(void)snprintf(tbuf, sizeof(tbuf), "%s: %s", "Home Phone", |
(void)snprintf(tbuf, sizeof(tbuf), "%s: %s", "Home Phone", |
prphone(pn->homephone)); |
vs(&mem, prphone(pn->homephone))); |
oddfield = demi_print(tbuf, oddfield); |
oddfield = demi_print(tbuf, oddfield); |
} |
} |
|
free_storage(mem); |
if (oddfield) |
if (oddfield) |
putchar('\n'); |
putchar('\n'); |
|
|