version 1.10, 2009/10/27 23:59:38 |
version 1.11, 2014/10/17 20:19:15 |
|
|
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", |
vs(&mem, pn->name), vs(&mem, pn->realname), pn->dir); |
pn->name, 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); |
|
|
/* |
/* |
|
|
if (pn->office && pn->officephone && |
if (pn->office && pn->officephone && |
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", |
"%s: %s, %s", OFFICE_TAG, vs(&mem, pn->office), |
OFFICE_TAG, 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", |
"%s: %s", OFFICE_TAG, vs(&mem, pn->office)); |
OFFICE_TAG, 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", |
"%s: %s", OFFICE_PHONE_TAG, |
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", |
vs(&mem, prphone(pn->homephone))); |
"Home Phone", prphone(pn->homephone)); |
oddfield = demi_print(tbuf, oddfield); |
oddfield = demi_print(tbuf, oddfield); |
} |
} |
free_storage(mem); |
|
if (oddfield) |
if (oddfield) |
putchar('\n'); |
putchar('\n'); |
|
|