2 get_auth_data_fn(const char * pServer
,
14 fprintf(stdout
, "Workgroup: [%s] ", pWorkgroup
);
15 fgets(temp
, sizeof(temp
), stdin
);
17 if (temp
[strlen(temp
) - 1] == '\n') /* A new line? */
19 temp
[strlen(temp
) - 1] = '\0';
24 strncpy(pWorkgroup
, temp
, maxLenWorkgroup
- 1);
27 fprintf(stdout
, "Username: [%s] ", pUsername
);
28 fgets(temp
, sizeof(temp
), stdin
);
30 if (temp
[strlen(temp
) - 1] == '\n') /* A new line? */
32 temp
[strlen(temp
) - 1] = '\0';
37 strncpy(pUsername
, temp
, maxLenUsername
- 1);
40 fprintf(stdout
, "Password: ");
41 fgets(temp
, sizeof(temp
), stdin
);
43 if (temp
[strlen(temp
) - 1] == '\n') /* A new line? */
45 temp
[strlen(temp
) - 1] = '\0';
50 strncpy(pPassword
, temp
, maxLenPassword
- 1);