2 get_auth_data_fn(const char * pServer
,
13 fprintf(stdout
, "Workgroup: [%s] ", pWorkgroup
);
14 fgets(temp
, sizeof(temp
), stdin
);
16 if (temp
[strlen(temp
) - 1] == '\n') /* A new line? */
18 temp
[strlen(temp
) - 1] = '\0';
23 strncpy(pWorkgroup
, temp
, maxLenWorkgroup
- 1);
26 fprintf(stdout
, "Username: [%s] ", pUsername
);
27 fgets(temp
, sizeof(temp
), stdin
);
29 if (temp
[strlen(temp
) - 1] == '\n') /* A new line? */
31 temp
[strlen(temp
) - 1] = '\0';
36 strncpy(pUsername
, temp
, maxLenUsername
- 1);
39 fprintf(stdout
, "Password: ");
40 fgets(temp
, sizeof(temp
), stdin
);
42 if (temp
[strlen(temp
) - 1] == '\n') /* A new line? */
44 temp
[strlen(temp
) - 1] = '\0';
49 strncpy(pPassword
, temp
, maxLenPassword
- 1);