Ejemplo n.º 1
0
static void
list_users(void)
{
	struct xpasswd *pwd;
	unsigned int i;

	for (i = 0, pwd = pwds; i < npwds; ++i, ++pwd)
		if (pwd->pw_selected)
			display_user(pwd);
}
Ejemplo n.º 2
0
int main(void){
    int i, null, num_users;
    CLEAR;
    printf("Enter number of user entries: ");
    scanf("%d", &num_users);
    while((null = getchar()) != '\n' && null != EOF);
    CLEAR;
    user user_list[num_users];
    for(i=0;i<num_users;i++){
	user_list[i] = new_user();
    }
    for(i=0;i<num_users;i++)
	display_user(user_list[i]);
    return 0;
}