$Log$
+ Revision 590.152 2002/03/13 04:11:11 nbryant
+ fix up minor gotcha introduced by fgets change
+
Revision 590.151 2002/03/13 03:58:29 ajc
* Site-configurable option "Allow system Aides to gain access to mailboxes"
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
fprintf(nodefp, "%s|", d->d_name);
printf("Enter shared secret: ");
- fgets(buf, sizeof buf, stdin);
+ myfgets(buf, sizeof buf, stdin);
if (buf[0] == 0) strcpy(buf, config.c_net_password);
fprintf(nodefp, "%s|", buf);
printf("Enter host name/IP : ");
- fgets(buf, sizeof buf, stdin);
+ myfgets(buf, sizeof buf, stdin);
if (buf[0] == 0) snprintf(buf, sizeof buf, "%s.citadel.org",
d->d_name);
fprintf(nodefp, "%s|", buf);
}
}
+
+char *myfgets(char *s, int size, FILE *stream) {
+ char *ret = fgets(s, size, stream);
+ char *nl;
+
+ if (ret != NULL) {
+ nl = strchr(s, '\n');
+
+ if (nl != NULL)
+ *nl = 0;
+ }
+
+ return ret;
+}
#define num_parms(source) num_tokens(source, '|')
void stripout(char *str, char leftboundary, char rightboundary);
void stripallbut(char *str, char leftboundary, char rightboundary);
+
+char *myfgets(char *s, int size, FILE *stream);